nagios+gnokii

Peter Edmonds termx23 at gmail.com
Wed May 9 12:01:07 CEST 2007


On 5/8/07, jjcooljay <jdsurmieda at yahoo.com> wrote:
>
> Hi guys, im new to nagios, I have already installed nagios and gnokii...I dont
> have enought information on how to enable gnokii on nagios...pls help me on its
> command.cfg and contacts.cfg

Hi Jay,

Here is the command I use to send SMS notifications for service checks

notify-by-cit-sms

echo -e "<$HOSTNAME$>\n$SERVICEDESC$\n$SERVICESTATE$\n$SERVICEOUTPUT$\n$LONGDATETIME$"
|gnokii --sendsms $CONTACTPAGER$ >>
/usr/local/groundwork/nagios/var/gnokii.log 2>&1

And for host checks I use this

host-notify-by-cit-sms

echo -e "<$HOSTNAME$>\n$SERVICEDESC$\n$SERVICESTATE$\n$HOSTOUTPUT$\n$LONGDATETIME$"
|gnokii --sendsms $CONTACTPAGER$ >> /usr/local/nagios/var/gnokii.log
2>&1

Your contacts.cfg should have an entry like this

define contact {
                contact_name                    petersms24
                use                             generic-contact-2
                alias                           petersms24
                pager                           04XXXXXXXX
                host_notification_commands      host-notify-by-cit-sms
                service_notification_commands   notify-by-cit-sms
                service_notification_options    u,c,w,r

Note that the above contact is ONLY for SMS notifications (note the
lack of any reference to email). I find it better to seperate email
and SMS notifications - often you want only email notifications for
some services.

Peter Edmonds

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
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