check_nrpe command giving wrong value
Hi team,
I have written a small plugin to check vidispine realm authorisation using the wget command as follows . #!/bin/sh WGET=/usr/bin/wget URL=http://localhost:8080/API/version $WGET --user=admin --password=admin123 $URL 2> /dev/null if [ $? = "0" ]; then rm -rf version; echo "Vidispine realm ok" ; exit 0 else rm -rf version; echo "Vidispine realm not working" ;exit 1 fi if I run this script in remote server(192.168.0.237 ), working fine #/usr/local/nagios/libexec/check_vidispinerealm 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. Code:
curl --user name:password http://www.example.com Code:
# su - nagios |
Quote:
|
Quote:
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. cd /usr/local/nagios Now it is working fine .Thanks for pointing out this . |
All times are GMT -5. The time now is 02:15 AM. |