Re: Simple wrapper plugin gets "return code of 127" error
Posted: Wed Nov 05, 2014 11:26 am
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
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