Trouble with VMware monitoring Wizard

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
mike.wezesa
Posts: 9
Joined: Wed May 02, 2012 2:50 pm

Trouble with VMware monitoring Wizard

Post by mike.wezesa »

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?
agriffin
Posts: 876
Joined: Mon May 09, 2011 9:36 am

Re: Trouble with VMware monitoring Wizard

Post by agriffin »

It looks like the error may actually be in the host definition rather the services, even though the error messages look more like they're complaining about the services. Could you post your host definition?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Trouble with VMware monitoring Wizard

Post by scottwilkerson »

Go to
Configure -> Core Config Manager -> Hosts -> vmhost-us2 -> Modify -> Check Settings Tab

Erase anything in the Max. check attempts* (if exists)
enter 5
Click Save
Apply Configuration
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
mike.wezesa
Posts: 9
Joined: Wed May 02, 2012 2:50 pm

Re: Trouble with VMware monitoring Wizard

Post by mike.wezesa »

Thanks for the responses guys, here is the Host definition:

###############################################################################
#
# Host configuration file
#
# Created by: Nagios QL Version 3.0.3
# Date: 2012-05-02 20:25:02
# Version: Nagios 3.x config file
#
# --- DO NOT EDIT THIS FILE BY HAND ---
# Nagios QL will overwite all manual settings during the next update
#
###############################################################################

define host {
host_name vmhost-us2
use xiwizard_generic_host
address vmhost-us2.eschergroup.com
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
contacts nagiosadmin
notification_interval 60
notification_period xi_timeperiod_24x7
icon_image vmware.png
statusmap_image vmware.png
_xiwizard vmware
register 1
}

###############################################################################
#
# Host configuration file
#
# END OF FILE
#
###############################################################################


Scott, when I view the check settings tab for this host there is no entry for max check attempts (there are no entries at all come to think of it).
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Trouble with VMware monitoring Wizard

Post by scottwilkerson »

That's the problem.

Somehow in the CCM (which is in the database) it has bad values. The config you are showing is the config that is being rolled back to when the configuration fails.

Add the entries through the CCM as I stated, Save then Apply configuration and you should be good. Specifically these should be present:
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
mike.wezesa
Posts: 9
Joined: Wed May 02, 2012 2:50 pm

Re: Trouble with VMware monitoring Wizard

Post by mike.wezesa »

I've added the configuration settings as you described and I am still getting verification failed:

Error: Service check command 'check_esx3_host' specified in service 'Memory for VMHost' for host 'vmhost-us2' not defined anywhere!
Error: Service check command 'check_esx3_host' specified in service 'Networking for VMHost' for host 'vmhost-us2' not defined anywhere!
Error: Service check command 'check_esx3_host' specified in service 'Services for VMHost' for host 'vmhost-us2' not defined anywhere!
Error: Service check command 'check_esx3_host' specified in service 'VM Status for VMHost' for host 'vmhost-us2' not defined anywhere!

I noticed that CPU was not flagged here so I deleted the 4 services above for the host and applied the configuration (just with CPU service check) and it verified successfully...but that is not all that I am looking to monitor obviously. If I go to services and try to add new I do not see anything specific to esx3/vmware checks in the "Check Command" drop down box...is something else missing here?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Trouble with VMware monitoring Wizard

Post by scottwilkerson »

Honestly, I'm startin gto think that the wizard didn't install correctly, because those commands should be created when the wizard installs.

Can you run the procedure outlined here
http://library.nagios.com/library/produ ... -nagios-xi

Then re-upload the wizard.

Once done, go to
Configure -> CCM -> Commands
and put check_esx3 in the search field

You should get 2 commands
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
mike.wezesa
Posts: 9
Joined: Wed May 02, 2012 2:50 pm

Re: Trouble with VMware monitoring Wizard

Post by mike.wezesa »

I ran the permissions script and then re-uploaded the plugin "check_esx3.pl" found in the download here: http://assets.nagios.com/downloads/nagi ... vmware.zip

When I go into CCM and search for "check_esx3" in Commands it only returns 1 "check_esx3_host" which is listed as "not active". When I click on configure it seems to be missing information for the required field "command line" and it is set as command type "unclassified" (I am assuming the missing command line info is the reason for it being not active). I am correct in assuming that the only thing I need to upload from the noted "vmware.zip" file is "check_esx3.pl" found in the plugins folder? Again I really appreciate your input, you have been very helpful and it seems like I am almost there!
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Trouble with VMware monitoring Wizard

Post by scottwilkerson »

mike.wezesa wrote: I am correct in assuming that the only thing I need to upload from the noted "vmware.zip" file is "check_esx3.pl" found in the plugins folder? Again I really appreciate your input, you have been very helpful and it seems like I am almost there!
No you are not correct here.

Go to
Admin -> Manage Config Wizards
Click Browse
select the vmware.zip
Click Upload Wizard
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
mike.wezesa
Posts: 9
Joined: Wed May 02, 2012 2:50 pm

Re: Trouble with VMware monitoring Wizard

Post by mike.wezesa »

scottwilkerson wrote:
mike.wezesa wrote: I am correct in assuming that the only thing I need to upload from the noted "vmware.zip" file is "check_esx3.pl" found in the plugins folder? Again I really appreciate your input, you have been very helpful and it seems like I am almost there!
No you are not correct here.

Go to
Admin -> Manage Config Wizards
Click Browse
select the vmware.zip
Click Upload Wizard
You sir are the man, that solved my problem (after I got rid of the remnants of the improperly uploaded/installed attempts I made prior). Thanks a ton!

Mike
Locked