Build precise queries to find exactly what you need
Press ESC to close
@RichardH
Member Since: November 15, 2013
Favorites0
Views
Projects0
This works great when running it from CentOS terminal with root, but when I created the command in /etc/nagios/objects/commands.cfg and called it in services.cfg nagios gives me the following status(Return code of 126 is out of bounds - plugin may not be executable. define command{ command_name check_esxi_hardware command_line $USER1$/check_esxi_hardware.py -H $HOSTADDRESS$ -U $ARG1$ -P $ARG2$ -V $ARG3$ } define service{ use generic-service hostgroup_name VMWare-servers service_description System: ESXi Hardware status check_command check_esxi_hardware!root!mypass!hp } I have verified that the check_esxi_hardware.py is executable, considering I am able to run it from the command line. I used chmod -R 755 root.root /usr/lib64/nagios/plugins/check_esxi_hardware.py. So why am I getting a return code 126 from Nagios when the command is executable?
Reviewed 12 years ago