check_nrpe command giving wrong value
I have written a small plugin to check vidispine realm authorisation using the wget command as follows .
$WGET --user=admin --password=admin123 $URL 2> /dev/null
if [ $? = "0" ]; then
rm -rf version; echo "Vidispine realm ok" ; exit 0
rm -rf version; echo "Vidispine realm not working" ;exit 1
if I run this script in remote server(192.168.0.237 ), working fine
Vidispine realm ok
but when I am trying the same script using check nrpe from nagios server ,it is giving wrong value
Nagios-server#/usr/local/nagios/libexec/check_nrpe -H 192.168.0.237 -c check_vidispinerealm
Vidispine realm not working
Note :On 192.168.0.237 ,I have copied to script to /usr/local/nagios/libexec folder ,given execute permission to nagios user and added the entry in nrpe.cfg
Any help will be highly appreciable .
Thanks in advance
What does the entry in your nrpe.cfg look like? Also please use [CODE] tags when you're displaying code.
Curl might be a better option for what you're attempting than wget.
Thanks a ton for reply .The problem was , while using wget ,it used to download one file called version .Since no permission was set to the existing folder ,it was giving wrong output .In my plugin script , I have added extra line i.e.
Now it is working fine .Thanks for pointing out this .
|All times are GMT -5. The time now is 06:13 PM.|