VMware VM
Overviewβ
VMware is an software compagny based in USA. VMware provides cloud computing and virtualization software and services.
The Centreon Plugin and Monitoring Connectors rely on the Centreon VMWare Connector to request the vCenter SDK.
Monitoring Connector Assetsβ
Monitored Objectsβ
- Virtual Machine
Discovery Rulesβ
- Hosts
Rule name | Description |
---|---|
Virt-VMWare2-VM-HostDiscovery | Discover the VMs bound to a vCenter or ESXi |
Collected Metricsβ
In addition to modes and metrics described here, it is also possible to monitor the following indicators:
- VM-Cpu: Advanced monitoring of the CPU (CPU ready)
- VM-Datastores-Iops: VM Iops usage on the Datastore
- VM-Swap: VM swap usage
- VM-Device: Check VM's devices status (e.g. VirtualCdrom)
- Vm-Tools
- Vm-Thinprovisioning
- Vm-Status
- Vm-Snapshot
- Vm-Limit
Metric name | Description | Unit |
---|---|---|
status | Status of the VMware Tools (installed, running and up-to-date) |
Metric name | Description | Unit |
---|---|---|
status | Status of the Thinprovisoning virtualdisks |
Metric name | Description | Unit |
---|---|---|
status | Overall status of the VM |
Metric name | Description | Unit |
---|---|---|
vm.snapshots.warning.current.count | Number of VM's snapshot older than 3 days (default threshold) | Count |
vm.snapshots.critical.current.count | Number of VM's snapshot older than 5 days (default threshold) | Count |
Metric name | Description | Unit |
---|---|---|
vm.limit.cpu.alerts.count | Alerts on CPU limit | Count |
vm.limit.memory.alerts.count | Alerts on Memory limit | Count |
vm.limit.disk.alerts.count | Alerts on Disk limit | Count |
Prerequisitesβ
Centreon VMWare Connectorβ
For the VMWare monitoring, Centreon use daemon to connect and request the vCenter.
Install this daemon on each needed poller:
yum install centreon-plugin-Virtualization-VMWare-daemon
To configure the access to your infrastructure, edit the "/etc/centreon/centreon_vmware.pm" configuration file:
%centreon_vmware_config = (
vsphere_server => {
default => {
url => 'https://<ip_hostname>/sdk',
username => '<username>',
password => '<password>'
}
}
);
1;
Make sure to replace variables with needed information:
- ip_hostname: IP address or hostname of the vCenter or ESX (if standalone),
- username: username with at least "read only" access to the vCenter or ESX (you can use domain user),
- password: password of the username.
You can configure multiple vCenter or ESXi connections using this structure:
%centreon_vmware_config = (
vsphere_server => {
'my_first_vcenter' => {
url => 'https://<ip_hostname>/sdk',
username => '<username>',
password => '<password>'
},
'my_other_vcenter' => {
url => 'https://<ip_hostname>/sdk',
username => '<DOMAIN>\<username>',
password => '<password>'
},
},
port => 5700
);
1;
Each entry is called a container.
You can also define the "port" attribute to change listening port.
Then start the daemon and make sure it is configured to start at server boot:
systemctl start centreon_vmware
systemctl enable centreon_vmware
Make sure that the daemon configuration works fine by looking for errors in "/var/log/centreon/centreon_vmware.log".
Tags and Custom Attributesβ
To discover Tags and Custom Attributes, you must :
- use version 3.2.5 of centreon-vmware-daemon
- add --tags in the additional discovery options: go to the Configuration > Hosts > Discovery page, and to the 3rd step (Set discovery parameters), in the section Additional parameters, in the Additional options field, type --tags.
Network flowsβ
The Poller with the Centreon VMware Connector installed need to access in TCP/443 HTTPS to the Vcenter.
The Pollers that request the Centreon VMWare Connector host need to access in TCP/5700 to the Centreon VMWare Connector host.
Installationβ
- Online License
- Offline License
- Install the Vmware2 Connector Centreon Plugin on every poller expected to monitor the devices:
yum install centreon-plugin-Virtualization-Vmware2-Connector-Plugin
- Install the 'Vmware VM' Centreon Monitoring Connector on the Configuration > Monitoring Connectors Manager page
- Install the Vmware VM Centreon Plugin on every poller expected to monitor the devices:
yum install centreon-plugin-Virtualization-Vmware2-Connector-Plugin
- Install the Centreon Monitoring Connector RPM:
yum install centreon-pack-virtualization-vmware2-vm
- Install the 'Vmware VM' Centreon Monitoring Connector on the Configuration > Monitoring Connectors Manager page
Configurationβ
- Log into Centreon and add a new Host through "Configuration > Hosts".
- Apply the relevant Host Template "VVirt-VMWare2-Vm-custom", and configure the mandatory Macros:
Mandatory | Name | Description |
---|---|---|
X | CENTREONVMWARECONTAINER | Name of your container in the file centreon_vmware.pm |
X | CENTREONVMWAREHOST | The Centreon server that launches the connection |
X | CENTREONVMWAREPORT | By default: 5700 |
X | VMNAME | Name of the VM (defined in your VMWare infrastructure) |
VMUUID | Specify The VM UUID | |
VMWAREEXTRAOPTIONS | Customize it with your own if needed |
FAQβ
How do I run my plugin through the CLI and what do the main parameters stand for ?β
Once you've installed the plugin, you can test it logging with centreon-engine user:
/usr/lib/centreon/plugins//centreon_vmware_connector_client.pl
--plugin=apps::vmware::connector::plugin
--mode=tools-vm
--custommode=connector
--connector-hostname='localhost'
--connector-port='5700'
--container='vcenter01'
--vm-hostname='SRV-LIN-TLS'
--filter-uuid=''
--tools-notinstalled-status='critical'
--tools-notrunning-status='critical'
--tools-notup2date-status='warning'
Expected command output is shown below:
OK: VMTools are OK
This command above checks the status of the VMTools (--plugin=apps::vmware::connector::plugin --mode=tools-vm
) of the VM SRV-LIN-TLS (--vm-hostname='SRV-LIN-TLS'
).
It connects to the VMWare daemon on localhost (--connector-hostname='localhost'
) on the port 5700 (--connector-port='5700'
).
Then the command requests the container vcenter01 (--container='vcenter01'
) because the VM SRV-LIN-TLS is managed by vcenter01.
It will trigger :
- WARNING alarm if the VMTools are not up-to-date (
--tools-notup2date-status='warning'
) - CRITICAL alarm if the VMTools are not running or installed (
--tools-notinstalled-status='critical' --tools-notrunning-status='critical'
)
All available modes with the plugin can be displayed with:
/usr/lib/centreon/plugins/./centreon_vmware_connector_client.pl \
--plugin=apps::vmware::connector::plugin \
--list-mode
The available options for a mode can be displayed using the --help
parameter:
/usr/lib/centreon/plugins/./centreon_vmware_connector_client.pl \
--plugin=apps::vmware::connector::plugin \
--mode=tools-vm \
--help
Why do I get the following error:β
UNKNOWN: Unknown container name 'default' |β
This error message means that the container invoked in the command doesn't exist in your VMWare connector configuration. Check your macro CENTREONVMWARECONTAINER on your host or check the file /etc/centreon/centreon_vmware.pm
UNKNOWN: Cannot get response (timeout received)β
This error message means that the Plugin didn't get a response off the VMWare Daemon. Check your connection parameters and the macros CENTREONVMWAREHOST and CENTREONVMWAREPORT.
UNKNOWN: Container connection problem |β
This error message means that you have a issue with the credentials provided for your Container. Check your credentials in /etc/centreon/centreon_vmware.pm. You can also take a look into the log for more information: /var/log/centreon/centreon_vmware.log
UNKNOWN: Cannot find 'VirtualMachine' object |β
This error message means that the Plugin didn't find the Virtual Machine. Check the Virtual Machine name in the macro HOSTVMNAME, it's must fit the name defined in your VMWare infrastructure.