iam looking for an easy passive check to monitor our esx environment. as i can see, your script support passive check, but i have no success to implement it.
i have an nagios server, a linux server where should excecute the passive checks to our esx hosts, vcenter server and many esx hosts and vm machines.
vSphere SDK for Perl version: 5.1.0
Script 'check_vmware.pl' version: 1.13
vCenter Server is version 5.0, same like esx hosts
my linux server is an rhel 6
what i do and what i can see:
- create dummy service on nagios
- install the sdk, nsca and your script on linux server
- generate a config file (user, pw and vcenter server data inside)
- create a cronjob with some testparameter with your script
check_vmware.pl --config=/etc/nagios/check_vmware.conf --report=cpu --mode=nagios --host=hostname2test --nsca - -nscaserver=thenscaservername
when i enter the things above, ive got the result:
CPU usage at 1%|cpu=1%;80;90;0;100
buuut, i can see nothing in the nagios website. to prove that all is ok on nagios, i enter the following command (in the console of my linux server):
echo -e "esxhostname2test\tservicenameonnagios\t1\tNOK" | /usr/bin/send_nsca -H mynagiosserver -c /etc/nagios/send_nsca.cfg
and got the result:
1 data packet(s) sent to host successfully.
the status of the "service name on nagios" changed to the parameter i enter in the console of my linux server.
so my question/s is:
- is there something i do wrong?
- i think your script works for the result, but send nothing to the nagios. is there a way to check where and what the problem is?
i hope someone can help me.
thanks in advance!