SMS Paging with Nagios and GNokii

Rafe Oxley rafe.oxley at moving-edge.net
Fri Oct 17 16:06:34 CEST 2003


Hi Andrew,
have had lots of fun with Gnokii and Nagios. I had problems with the
number of chars being sent exceeding the limit for my phone (in my case
160). Looks like your messages being sent would exceed that, try sending a
long message on the CLI. A hack of sendsms may be best, something like

if ( length $message >= 159 ){$message=substr($message,0,155)."...";}

Also found sending multilple messages a problem so now use a sms queue
handler script from http://www.yty.net/h/gsm/
[had to hack gsmqueue.pl a bit to capture gnokii output but is very useful]

rgds
Rafe
                                                        ^^^^
> Peoples,
> 	I've been using Nagios for quiet some time now and I unfortunately only
> have the system emailing me when a problem occurs. I am hoping to setup
paging for issues that occur after hours using GNokii. Unfortunately my
attempts at getting this working have fallen flat on there face, even
though I can using gnokii --sendsms blah blah blah and send and sms
successfully from console I am still hitting problems when sending from
within Nagios.
>
> My Current Config for sending SMS messages is -
>
> # 'notify-by-sms' command definition
> define command{
>         command_name    notify-by-sms
>         command_line    /usr/bin/printf "%b" "Service:
> $SERVICEDESC$\nHost: $HOSTNAME$\nAddress: $HOSTADDRESS$\nState:
> $SERVICESTATE$\nInfo: $OUTPUT$\nDate: $DATETIME$" |
> /usr/local/bin/gnokii --sendsms ########### -C0 2>/dev/null
>         }
>
> # 'host-notify-by-sms' command definition
> define command{
>         command_name    host-notify-by-sms
>         command_line    /usr/bin/printf "%b" "Host '$HOSTALIAS$' is
> $HOSTSTATE$\nInfo: $OUTPUT$\nTime: $DATETIME$" |
> /usr/local/bin/gnokii --sendsms ########### -C0 2>/dev/null
>         }
>
>         service_notification_commands   notify-by-sms,notify-by-email
host_notification_commands
> host-notify-by-sms,host-notify-by-email
>
>
> I defiantly can send sms's as the existing user, however I cant through
Nagios. Any help would be much appreciated.
>
>
> Regards,
>
>
>
> Andrew Rooke
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: SF.net Giveback Program.
> SourceForge.net hosts over 70,000 Open Source Projects.
> See the people who have HELPED US provide better services:
> Click here: http://sourceforge.net/supporters.php
> _______________________________________________
> 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
>


-- 
Rafe Oxley
Operations Manager
Moving-edge.net
Tel 0845 3455763 : Fax 0845 3455764 : DDI 0870 2250386
http://www.moving-edge.net
"where your business communication meets the internet"




-- 
Rafe Oxley
Operations Manager
Moving-edge.net
Tel 0845 3455763 : Fax 0845 3455764 : DDI 0870 2250386
http://www.moving-edge.net
"where your business communication meets the internet"



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
_______________________________________________
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