Page 1 of 1

Issue on ESXi hardware monitoring plugin in Nagios.

Posted: Fri Nov 02, 2018 8:31 am
by rohithroki
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

Re: Issue on ESXi hardware monitoring plugin in Nagios.

Posted: Fri Nov 02, 2018 2:34 pm
by npolovenko
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

Re: Issue on ESXi hardware monitoring plugin in Nagios.

Posted: Wed Nov 07, 2018 8:40 am
by rohithroki
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

Re: Issue on ESXi hardware monitoring plugin in Nagios.

Posted: Wed Nov 07, 2018 11:37 am
by npolovenko
@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/nag ... Macros.pdf

But first, just run the command I gave you from the command line to make sure it's working.

Re: Issue on ESXi hardware monitoring plugin in Nagios.

Posted: Mon Nov 12, 2018 8:34 am
by rohithroki
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

Re: Issue on ESXi hardware monitoring plugin in Nagios.

Posted: Mon Nov 12, 2018 12:24 pm
by npolovenko
@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.

Re: Issue on ESXi hardware monitoring plugin in Nagios.

Posted: Wed Nov 14, 2018 2:34 am
by rohithroki
Hi ,
we are using Nagios core 3.5.0 and for defining the service we are using Nconf (graphical tool )

Regards,
Simbu

Re: Issue on ESXi hardware monitoring plugin in Nagios.

Posted: Wed Nov 14, 2018 3:57 pm
by npolovenko
@ 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.

Re: Issue on ESXi hardware monitoring plugin in Nagios.

Posted: Thu Nov 15, 2018 12:18 am
by rohithroki
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

Re: Issue on ESXi hardware monitoring plugin in Nagios.

Posted: Thu Nov 15, 2018 10:40 am
by scottwilkerson
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