Trouble with VMware monitoring Wizard
Posted: Wed May 02, 2012 4:07 pm
Nagios 2011R2.4 32bit Centos VM
I've read through the "Monitoring_VMware_With_Nagios_XI" guide and followed the instructions closely, everything from this aspect appears to have gone as it should. I am able to select "VMware" from the monitoring wizard and am presented with the checkboxes for services I would like to monitor, when I select finish the configuration verification fails and the log displays the following:
Error: Invalid max_check_attempts value for host 'vmhost-us2'
Error: Could not register host (config file '/usr/local/nagios/etc/hosts/vmhost-us2.cfg', starting on line 14)
Error processing object config files!
***> One or more problems was encountered while processing the config files...
Check your configuration file(s) to ensure that they contain valid
directives and data defintions.
The only thing that is then monitored is whether or not the host is up. Here is what the config file for this particular ESX host looks like:
define service {
host_name vmhost-us2
service_description CPU Usage for VMHost
use xiwizard_generic_service
check_command check_esx3_host!/usr/local/nagiosxi/etc/components/vmware/vmhost_us2_auth.txt!CPU!
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts nagiosadmin
_xiwizard vmware
register 1
}
define service {
host_name vmhost-us2
service_description Memory for VMHost
use xiwizard_generic_service
check_command check_esx3_host!/usr/local/nagiosxi/etc/components/vmware/vmhost_us2_auth.txt!MEM!
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts nagiosadmin
_xiwizard vmware
register 1
}
define service {
host_name vmhost-us2
service_description Networking for VMHost
use xiwizard_generic_service
check_command check_esx3_host!/usr/local/nagiosxi/etc/components/vmware/vmhost_us2_auth.txt!NET!
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts nagiosadmin
_xiwizard vmware
register 1
}
define service {
host_name vmhost-us2
service_description Services for VMHost
use xiwizard_generic_service
check_command check_esx3_host!/usr/local/nagiosxi/etc/components/vmware/vmhost_us2_auth.txt!SERVICE!
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts nagiosadmin
_xiwizard vmware
register 1
}
define service {
host_name vmhost-us2
service_description VM Status for VMHost
use xiwizard_generic_service
check_command check_esx3_host!/usr/local/nagiosxi/etc/components/vmware/vmhost_us2_auth.txt!RUNTIME!
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts nagiosadmin
_xiwizard vmware
register 1
}
Of course it tells you not to manually edit this file, but I am also not sure if there are errors here or not? I saw a suggestion from a few other threads to try and manually run a service check from the command line of Nagios which I did and this seems to run without issue...It returns CPU and MEM just fine from the command line (./checkesx3.pl -h <host> -u <user> -p <pwd> -l CPU, etc). Any input as to what I am missing here?
I've read through the "Monitoring_VMware_With_Nagios_XI" guide and followed the instructions closely, everything from this aspect appears to have gone as it should. I am able to select "VMware" from the monitoring wizard and am presented with the checkboxes for services I would like to monitor, when I select finish the configuration verification fails and the log displays the following:
Error: Invalid max_check_attempts value for host 'vmhost-us2'
Error: Could not register host (config file '/usr/local/nagios/etc/hosts/vmhost-us2.cfg', starting on line 14)
Error processing object config files!
***> One or more problems was encountered while processing the config files...
Check your configuration file(s) to ensure that they contain valid
directives and data defintions.
The only thing that is then monitored is whether or not the host is up. Here is what the config file for this particular ESX host looks like:
define service {
host_name vmhost-us2
service_description CPU Usage for VMHost
use xiwizard_generic_service
check_command check_esx3_host!/usr/local/nagiosxi/etc/components/vmware/vmhost_us2_auth.txt!CPU!
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts nagiosadmin
_xiwizard vmware
register 1
}
define service {
host_name vmhost-us2
service_description Memory for VMHost
use xiwizard_generic_service
check_command check_esx3_host!/usr/local/nagiosxi/etc/components/vmware/vmhost_us2_auth.txt!MEM!
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts nagiosadmin
_xiwizard vmware
register 1
}
define service {
host_name vmhost-us2
service_description Networking for VMHost
use xiwizard_generic_service
check_command check_esx3_host!/usr/local/nagiosxi/etc/components/vmware/vmhost_us2_auth.txt!NET!
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts nagiosadmin
_xiwizard vmware
register 1
}
define service {
host_name vmhost-us2
service_description Services for VMHost
use xiwizard_generic_service
check_command check_esx3_host!/usr/local/nagiosxi/etc/components/vmware/vmhost_us2_auth.txt!SERVICE!
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts nagiosadmin
_xiwizard vmware
register 1
}
define service {
host_name vmhost-us2
service_description VM Status for VMHost
use xiwizard_generic_service
check_command check_esx3_host!/usr/local/nagiosxi/etc/components/vmware/vmhost_us2_auth.txt!RUNTIME!
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts nagiosadmin
_xiwizard vmware
register 1
}
Of course it tells you not to manually edit this file, but I am also not sure if there are errors here or not? I saw a suggestion from a few other threads to try and manually run a service check from the command line of Nagios which I did and this seems to run without issue...It returns CPU and MEM just fine from the command line (./checkesx3.pl -h <host> -u <user> -p <pwd> -l CPU, etc). Any input as to what I am missing here?