Page 1 of 1

Error trying to monitor ESXI machine

Posted: Thu Aug 01, 2013 10:15 am
by solvisoft
hello im trying to monitor a ESXI 4.1 machine with the http://www.claudiokuenzler.com/nagios-p ... rdware.php plugin.
i got the plugin working , but i dont know how to ad this in Nagios??

i have added the following command in the commands.cfg

# 'check_esxi_hardware' command definition
define command{
command_name check_esxi_hardware
command_line /home/pi/check_esxi_hardware1.py -H 192.168.10.15 -U root -P ********* -V hp -p
}


in the advanced_service.cfg i added the following

define service {
service_description hardware
check_command check_esxi_hardware!root!mypass!hp
host_name esxi
use generic-service
contact_groups +admins
}


i always get the error as seen in te screenshot , can anyone guide / help me with this problem.

Re: Error trying to monitor ESXI machine

Posted: Thu Aug 01, 2013 10:22 am
by yancy
solvisoft,

What version of Core?

-Yancy

Re: Error trying to monitor ESXI machine

Posted: Thu Aug 01, 2013 10:35 am
by StuartHurst
I put this line into my services.cfg check
check_command check_esxi_hardware!username!password!hp!uk

This is in my commands.cfg
define command{
command_name check_esxi_hardware
command_line $USER1$/check_esxi_hardware.py -H $HOSTADDRESS$ -U $ARG1$ -P $ARG2$ -V $ARG3$ -I $ARG4$

The python check script went into my plugins folder. And this worked for me :)

Re: Error trying to monitor ESXI machine

Posted: Thu Aug 01, 2013 10:38 am
by solvisoft
version 3.4.1 nagios core.

with also nconf 1.3 installed.

Re: Error trying to monitor ESXI machine

Posted: Thu Aug 01, 2013 10:46 am
by StuartHurst
I have
define command{
command_name check_esxi_hardware
command_line $USER1$/check_esxi_hardware.py -H $HOSTADDRESS$ -U $ARG1$ -P $ARG2$ -V $ARG3$ -I $ARG4$
in my command.cfg

I use
check_command check_esxi_hardware!root!passwordhere!hp!uk
and this works fine? Does that help as yours looks a little different.

Re: Error trying to monitor ESXI machine

Posted: Thu Aug 01, 2013 12:26 pm
by lmiltchev
@solvisoft

Did StuartHurst's suggestion help you solve your issue?

Re: Error trying to monitor ESXI machine

Posted: Fri Aug 02, 2013 3:14 am
by solvisoft
i am a bit further now except this time i get the following message.

do i have to put the username and password in directly ?
example : check_esxi_hardware!root!password!hp

so root already my username and password ? or just the description?

Re: Error trying to monitor ESXI machine

Posted: Fri Aug 02, 2013 4:01 am
by StuartHurst
You can refer to them using $user$ in resources.cfg but I've kept mine simple.
the root / password is for the VMWare host, don't forget the UK at the end or whatever code is required for your country.

My USER1 has the location of my plugins so i put my script in there.

Re: Error trying to monitor ESXI machine

Posted: Fri Aug 02, 2013 6:13 am
by solvisoft
i got it working , i presume that if something is wrong then there wil be more output to see in nagios core ?
or is there a option to already show the output of the disks , memory , ram?

thank you for the support ;)