|
Hi all, I have decided that I would write my own bash script to send
notification via sms and incorporate it into an existing Nagios script. When I
run the script from the command prompt as the nagios user it works like a dream
and I get my sms. As soon as I activate it in Nagios I get the following error
in the nagios.log file [1143218696] SERVICE NOTIFICATION: george;test-server;Current
Users;WARNING;notify-by-sms;USERS WARNING - 1 users currently logged in [1143218696] Warning: Attempting to execute the command
"/usr/bin/printf "***** Nagios *****\n\nNotification Type:
PROBLEM\n\nService: Current Users\nHost: test-server\nIP: 10.0.0.200\nState:
WARNING\nDate/Time: Fri Mar 24 18:44:56 SAST 2006\n\nAdditional Info:\n\nUSERS
WARNING - 1 users currently logged in" | pipesend" resulted in a
return code of 127. Make sure the script or binary you are trying to
execute actually exists... Pipesent code: #!/bin/bash echo "" > /opt/tools/pipesend/send.out while read line do echo "$line" >> /opt/tools/pipesend/send.out done sendSMS "1234567890" "$(cat /opt/tools/pipesend/send.out)" If I remove the ‘pipesend’ and replace it with ‘mail’
and execute it via Nagios it works. So the question is, does Nagios only work with special
scripts and/or binaries? Thanks in advance George -- |
- [Nagios-users] Nagios specific scripts and/or binaries George Rushby
- Re: [Nagios-users] Nagios specific scripts and/or binar... Arno Lehmann
- Re: [Nagios-users] Nagios specific scripts and/or binar... Arno Lehmann
- RE: [Nagios-users] Nagios specific scripts and/or b... George Rushby
- Re: [Nagios-users] Nagios specific scripts and/... Arno Lehmann
