Issue on ESXi hardware monitoring plugin in Nagios.

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
rohithroki
Posts: 138
Joined: Mon Nov 30, 2015 6:12 am

Issue on ESXi hardware monitoring plugin in Nagios.

Post 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
Attachments
error image.PNG
error image.PNG (1.43 KiB) Viewed 3908 times
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Issue on ESXi hardware monitoring plugin in Nagios.

Post 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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
rohithroki
Posts: 138
Joined: Mon Nov 30, 2015 6:12 am

Re: Issue on ESXi hardware monitoring plugin in Nagios.

Post 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
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Issue on ESXi hardware monitoring plugin in Nagios.

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
rohithroki
Posts: 138
Joined: Mon Nov 30, 2015 6:12 am

Re: Issue on ESXi hardware monitoring plugin in Nagios.

Post 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
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Issue on ESXi hardware monitoring plugin in Nagios.

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
rohithroki
Posts: 138
Joined: Mon Nov 30, 2015 6:12 am

Re: Issue on ESXi hardware monitoring plugin in Nagios.

Post by rohithroki »

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

Regards,
Simbu
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Issue on ESXi hardware monitoring plugin in Nagios.

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
rohithroki
Posts: 138
Joined: Mon Nov 30, 2015 6:12 am

Re: Issue on ESXi hardware monitoring plugin in Nagios.

Post 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
Attachments
check_command.PNG
check_command.PNG (8.9 KiB) Viewed 3802 times
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Issue on ESXi hardware monitoring plugin in Nagios.

Post 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
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked