Issue on ESXi hardware monitoring plugin in Nagios.

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

Issue on ESXi hardware monitoring plugin in Nagios.

Postby rohithroki » Fri Nov 02, 2018 8:31 am

Hi Team,

I have tried the ESXi Hardware monitoring with check_esxi_hardware.py plugin.

I am able to run the check command from nagios server side, it's reporting properly.

Code: Select all
[root@INFSGDCNGOS03 libexec]# ./check_esxi_hardware.py -H <IPAddress> -U <username> -P <password> -C 5989 -V auto
OK - Server: Dell Inc. PowerEdge R320 s/n: xxxx System BIOS: 2.6.0 2018-06-11


but I am unable to report on Nagios check command using the plugin along with service check .

Code: Select all
$USER1$/check_esxi_hardware.py -H $HOSTADDRESS$ -U $AGR1$ -P $AGR2$ -C 5989 -V $AGR3$


Code: Select all
check_esxi_hardware_check!/home/root/.root!auto


Attaching the error screenshot from Nagios monitoring tool.

could you please address the issue and help me to sort the issue.

Thanks in advance

Regards,
Simbu
Attachments
error image.PNG
error image.PNG (1.43 KiB) Viewed 144 times
rohithroki
 
Posts: 138
Joined: Mon Nov 30, 2015 6:12 am

Re: Issue on ESXi hardware monitoring plugin in Nagios.

Postby npolovenko » Fri Nov 02, 2018 2:34 pm

Hello, @rohithroki . If I insert the arguments from here:
/home/root/.root!auto

To this command:
$USER1$/check_esxi_hardware.py -H $HOSTADDRESS$ -U $AGR1$ -P $AGR2$ -C 5989 -V $AGR3$

Then it's going to look like this compiled:
/usr/local/nagios/libexec/check_esxi_hardware.py -H <IPAddress> -U /home/root/.root -P auto -C 5989 -V auto


Doesn't look right. This part
/home/root/.root!auto

Needs to look like this:
username!password!auto
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
npolovenko
Support Tech
 
Posts: 2367
Joined: Mon May 15, 2017 5:00 pm

Re: Issue on ESXi hardware monitoring plugin in Nagios.

Postby rohithroki » Wed Nov 07, 2018 8:40 am

Hi npolovenko,

we tried the username and password ,but still displayed as null output in Nagios montoring tool.

Code: Select all
!nagiosuser!'$U2FsdGVkX1/6fICGCOTr9LEOrtKAZfGc$'!auto


please help me to sort the issue.

Regards,
Simbu S
rohithroki
 
Posts: 138
Joined: Mon Nov 30, 2015 6:12 am

Re: Issue on ESXi hardware monitoring plugin in Nagios.

Postby npolovenko » Wed Nov 07, 2018 11:37 am

@rohithroki, Can you run this command from the command and show me the output?
/usr/local/nagios/libexec/check_esxi_hardware.py -H <IPAddress> -U nagiosuser -P '$U2FsdGVkX1/6fICGCOTr9LEOrtKAZfGc$' -C 5989 -V auto

Your password contains special characters that are not allowed in Nagios configs. I recommend assigning the whole password to a macro and then using that macro as an argument:
$USER8$="$U2FsdGVkX1/6fICGCOTr9LEOrtKAZfGc$"

check_esxi_hardware_check!nagiosuser!$USER8$!auto

https://assets.nagios.com/downloads/nagiosxi/docs/Understanding-User-Macros.pdf

But first, just run the command I gave you from the command line to make sure it's working.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
npolovenko
Support Tech
 
Posts: 2367
Joined: Mon May 15, 2017 5:00 pm

Re: Issue on ESXi hardware monitoring plugin in Nagios.

Postby rohithroki » Mon Nov 12, 2018 8:34 am

Hi ,

please find the output from the command line

Code: Select all
[root@xxx libexec]# ./check_esxi_hardware.py -H <IPADDRESS> -U nagiosuser -P 'U2FsdGVkX1/6fICGCOTr9LEOrtKAZfGc' -C 5989 -V auto
OK - Server: Dell Inc. PowerEdge R320 s/n: xxxx System BIOS: 2.6.0 2018-06-11


I tried with the Macros by adding "$U2FsdGVkX1/6fICGCOTr9LEOrtKAZfGc$" but still showing null output.

please help me to sort out the issue.

Regards,
Simbu
rohithroki
 
Posts: 138
Joined: Mon Nov 30, 2015 6:12 am

Re: Issue on ESXi hardware monitoring plugin in Nagios.

Postby npolovenko » Mon Nov 12, 2018 12:24 pm

@rohithroki, Could you send me your XI system profile so I could review it? To send us your system profile:
Login to the Nagios XI GUI using a web browser.
Click the "Admin" > "System Profile" Menu
Click the "Download Profile" button
Save the profile.zip file and send it in a private message.
After you send the profile please post something in this thread to bring it back up in the support queue.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
npolovenko
Support Tech
 
Posts: 2367
Joined: Mon May 15, 2017 5:00 pm

Re: Issue on ESXi hardware monitoring plugin in Nagios.

Postby rohithroki » Wed Nov 14, 2018 2:34 am

Hi ,
we are using Nagios core 3.5.0 and for defining the service we are using Nconf (graphical tool )

Regards,
Simbu
rohithroki
 
Posts: 138
Joined: Mon Nov 30, 2015 6:12 am

Re: Issue on ESXi hardware monitoring plugin in Nagios.

Postby npolovenko » Wed Nov 14, 2018 3:57 pm

@ rohithroki, Can you navigate to /usr/local/nagios/etc/ folder and upload the .cfg file containing the check esx command, another .cfg file containing the service check definition and finally the resource .cfg file. I haven't had much experience with Nconf but I suspect it may have written the command incorrectly, or used a wrong syntax that broke the command.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
npolovenko
Support Tech
 
Posts: 2367
Joined: Mon May 15, 2017 5:00 pm

Re: Issue on ESXi hardware monitoring plugin in Nagios.

Postby rohithroki » Thu Nov 15, 2018 12:18 am

Hi ,

Please find the service definition for ESXi hardware below and attaching the check command details for the reference.

Code: Select all
define service {
                service_description                   check_esxi_hardware_6.5
                max_check_attempts                    3
                check_interval                        2
                notification_interval                 360
                notification_options                  w,u,c,r,s
                notifications_enabled                 1
                check_command                         check_esxi_hardware_check!nagiosuser!"$U2FsdGVkX1/6fICGCOTr9LEOrtKAZfGc$"!auto
                check_period                          24x7
                notification_period                   24x7
                contact_groups                        +admins
Attachments
check_command.PNG
check_command.PNG (8.9 KiB) Viewed 38 times
rohithroki
 
Posts: 138
Joined: Mon Nov 30, 2015 6:12 am

Re: Issue on ESXi hardware monitoring plugin in Nagios.

Postby scottwilkerson » Thu Nov 15, 2018 10:40 am

While this article is for Nagios XI, the basis is the same. You have special chars in the password you are entering that will need to be escaped, most specifically the $
https://support.nagios.com/kb/article.php?id=580
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 12308
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises


Return to Nagios Core

Who is online

Users browsing this forum: No registered users and 22 guests