BaldMansMojo / check_vmware_esx

chech_vmware_esx Fork of check_vmware_api.pl
GNU General Public License v2.0
124 stars 67 forks source link

No status returned... #39

Closed swissgiant closed 10 years ago

swissgiant commented 10 years ago

Hi When I try to get any Status on any of the checks vom the check_vmware_esx i dont get a status back. the old plug in got a status which i could use in my nagios3 to get a status...

example: old: check_esx3 -H 111.111.111.111 - u user - p password -l cpu - s usage - w 80 -c 90 CHECK_ESX3 OK - cpu usage =0.75 % | cpu_usage=0.75%;80;90

new: check_vmware_esx.pl -H 111.111.111.111 - u user - password -S cpu -s usage -w 80 -c 90 CPU usage=0.74%|'cpu_usage'=0.74%;80;90;;

so in my opinion the Status is missing.... using the latest Version of the scrypt. Ubuntu 12.04 - CLI 5.5 - Perl 5.14.2 - libwww-perl-5.837

Greetings from Switzerland Alex

BaldMansMojo commented 10 years ago

Hi,

sorry - but you are completely wrong. The status is the returncode of the script. You can check as with every commandline program wicht echo $?: 0 = ok/up 1 = warning 2 = critical/down CHECK_ESX3 OK is only part of the text string. So displaying the name of the plugin makes no sense. It only wastes space on the display. And for the overview window you should waste as less as possible. Look at most of your other checks. None (or nearly none) will display the name of the plugin. It's the same with OK. It's only a text string and not needed because ok should be the default a check has. Most plugins won't display ok, but for better readability (and for the messages sent which are conatining the string) warning and critical is displayed as part of the message text.

So when testing from the commandline check the return code of the plugin with echo $? . Greeting from Munich Martin

swissgiant commented 10 years ago

The Problem is.....Nagios 3 does not read out the Status correkt.....actually it does Report "Service does not Exit properly.....and i dont get any Status...with the new plugin on about 10 checks...where i get a correct Status on the old Version.....

BaldMansMojo commented 10 years ago

I think you have a setup problem. Does it work well from the commandline? If yes - with wich user have you tested? If it is root make a su to your Nagios user and test again. If it works from the commandline the plugin is ok. For helping you with the setup send your contact data to martin.fuerstenau@oce.com. I will call you back. Martin

BaldMansMojo commented 10 years ago

This was fixed. It was a setup problem. Martin