Page 1 of 1

box293_check_vmware

Posted: Mon Feb 09, 2015 2:46 pm
by jkinning
If I run this as nagios from the nagios XI server it works:

Code: Select all

/usr/local/nagios/libexec/check_by_ssh -E 1 -l vi-admin -H 10.131.90.21 -C "~/box293_check_vmware.pl --server vcenter.app.wsfgrp.net --check vCenter_Name_Version" 
OK: VMware vCenter Server 5.5.0 build-2183111
When I try to create the command and test I get this:

Code: Select all

COMMAND: /usr/local/nagios/libexec/check_by_ssh -E 1 -l vi-admin -H 10.131.90.21 -C "~/box293_check_vmware.pl --server vcenter.app.wsfgrp.net --check vCenter_Name_Version  \"\" \"\" \"\" \"\" \"\" \"\""
OUTPUT: UNKNOWN - check_by_ssh: Remote command '~/box293_check_vmware.pl --server vcenter.app.wsfgrp.net --check vCenter_Name_Version  "" "" "" "" "" ""' returned status 255

Re: box293_check_vmware

Posted: Mon Feb 09, 2015 2:56 pm
by tmcdonald
The test check command works most of the time but it does have flaws, in particular related to escaping input. The true test is to save the check, apply config, and either force an immediate check in the web interface or wait for one to occur naturally.

Re: box293_check_vmware

Posted: Mon Feb 09, 2015 3:18 pm
by jkinning
That was the problem. I spent almost half the day fooling around and all I needed to do was just apply and commit everything.

Working. Thanks!

Re: box293_check_vmware

Posted: Mon Feb 09, 2015 3:23 pm
by cmerchant
Great! We'll go ahead and close the thread. Thanks.