SMS notification commands
Peter Hallam
nagios at inatick.com
Fri Nov 30 06:39:50 CET 2007
On Fri, 30 Nov, 15:24 +1000 Nick Pratley wrote:
> Thanks for the reply Peter, however that isn't what the problem is in my
> case. The /var/spool/sms/outgoing directory on that server is in fact
> world-writable. And as I said I can run it from the command line
> successfully while logged in as the nagios user, which I wouldn't be able to
> do if the permissions were not right.
>
> Keep in mind that SMS Tools is running on a different server, and I'm using
> SCP to copy the file to that server.
Ah I overlooked it was being copied to a remote server. As for running as the user nagios, how did you achieve that - with su or logging in directly? I found that su doesn't work as expected.
Anyhow, as you say the outgoing dir is world-writeable on the remote server, then it should work AFAIK - though why don't you move the notify-by-sms script to the remote server and have a sommand on the nagios server such as:
define command {
command_name notify-host-by-sms
command_line /usr/bin/ssh root at remotemachine "/some/path/notify-by-sms $CONTACTPAGER$ \"$TIME$ $HOSTALIAS$ $HOSTSTATE$ $NOTIFICATIONTYPE$ $HOSTOUTPUT$\""
}
In my mind it's cleaner than the scp method, though whether or not it'll work or not I'm not sure!
Regards,
Peter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://www.monitoring-lists.org/archive/users/attachments/20071130/43659313/attachment.sig>
-------------- next part --------------
-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell. From the desktop to the data center, Linux is going
mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list