i have a problem which drives me really crazy since some days, hope someone cann support.
Using:
Nagios Core 4.2.2
Ubuntu 16.04 LTS
i want to use the pyhton script check_esxi_hardware.py to check the health of my ESXi Server.
If i run the command via the shell i get the expected result, do i integrate the check into my nagios i get the error code:
Status Information: (Return code of 255 is out of bounds)
the Event Log show the following entry:
Warning: Return code of 255 for check of service 'Hardware' on host 'winserver' was out of bounds.
Shell command:
Code: Select all
./check_esxi_hardware.py -H esxi-ip -U username -P mypass -V hp
OK - Server: HP Proliant........
Command definition inside commands.cfg:
Code: Select all
# 'check_esxi_hardware' command definition
define command{
command_name check_esxi_hardware
command_line $USER1$/check_esxi_hardware.py -H $HOSTADDRESS$ -U $ARG1$ -P $ARG2$ -V $ARG3$
}
Code: Select all
# Check HP Server hardware
define service{
use generic-service
host_name winserver
service_description Hardware
check_command check_esxi_hardware!root!mypass!hp
}
Thanks in advance for your support