Check the permissions of the script you have time:
1- chmod + x scriptname.sh
Also within the main script calling the check_http plugin is done, this should be the absolute path>
2 - /usr/local/nagios/libexec/check_http
----------------------------------
Example
#! / bin / bash
hostname = www.hardcoded.hostname.com
uri = / path.to.file.html? parameter1 = value1 \ parameter2 = value2 & \ & parameter3 = value3
warn = 10
crit = 30
while getopts "w: c:" opt; do
case $ opt in
w)
warn = $ OPTARG
;;
c)
crit = $ OPTARG
esac
donate
/usr/local/nagios/libexec/check_http -H $ uri $ hostname -u -r "\! (This account has-been locked out)" -w -c $ warn $ crit
Simple wrapper plugin gets "return code of 127" error
- Bryan Quesada
- Posts: 6
- Joined: Wed Nov 05, 2014 10:23 am
- Location: Costa Rica
- Contact:
-
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: Simple wrapper plugin gets "return code of 127" error
I believe we covered it being executable, but pathing is a very good point. Especially considering nagios daemon and plugins are generally not started from the libexec directory.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.