Cell Phone notification
Brian Hendrix
bhendrix at stthomas.org
Thu Jun 17 23:22:21 CEST 2004
I have nagios currently using sendpage to send pages to pagers. This is
done the typical way via contacts.cfg configuration below:
###################################################################
# 'contactperson' contact definition
define contact{
contact_name contactperson
alias Contact Person
service_notification_period 24x7
host_notification_period 24x7
service_notification_options c,r
host_notification_options d,r
service_notification_commands notify-by-sendpage
host_notification_commands host-notify-by-sendpage
service_notification_commands notify-by-email
host_notification_commands host-notify-by-email
email contactperson at domain.com
pager contactperson
}
I have created in misccommands.cfg, the following notify-by-sendpage
definition:
###################################################################
# 'notify-by-sendpage' command definition
define command{
command_name notify-by-sendpage
command_line /usr/bin/snpp -m "Nagios ALERT: Service:
$SERVICEDESC$ Host: $HOSTNAME$ Address: $HOSTADDRESS$ State:
$SERVICESTATE$ Info: $OUTPUT$ Date: $DATETIME$" $CONTACTPAGER$
}
# 'host-notify-by-sendpage' command definition
define command{
command_name host-notify-by-sendpage
command_line /usr/bin/snpp -m "Nagios ALERT: Service:
$SERVICEDESC$ Host: $HOSTNAME$ Address: $HOSTADDRESS$ State:
$SERVICESTATE$ Info: $OUTPUT$ Date: $DATETIME$" $CONTACTPAGER$
}
I want to now create an additional method of paging still using
sendpage but to their cell phone (SMS, text message). Sendpage is
configured correctly for this to work. However, how do I add an
additional method of notification into the contacts.cfg and the
misccommands.cfg?
Currently, email notification will interpret the variable
$CONTACTEMAIL$ as the email address after email in contacts.cfg. Also
pager notification will interpret the variable $CONTACTPAGER$ as the
pager ID for sendpage to page to. I want to create a
notify-by-textmessage entry in misccommands.cfg using
$CONTACTTEXTMSG$ as a variable to be interpreted as textmsg from the
contacts.cfg file.
Example:
(from contacts.cfg)
.....
service_notification_commands notify-by-textmsg
host_notification_commands host-notify-by-textmsg
.....
(from misccommands.cfg)
# 'notify-by-textmsg command definition
define command{
command_name notify-by-textmsg
command_line /usr/bin/snpp -m "Nagios ALERT: Service:
$SERVICEDESC$ Host: $HOSTNAME$ Address: $HOSTADDRESS$ State:
$SERVICESTATE$ Info: $OUTPUT$ Date: $DATETIME$" $CONTACTTEXTMSG$
}
Will this work? Does the variable $CONTACTTEXTMSG$ work correctly?
Thanks for your assistance,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ><> ~~~
Brian Hendrix
Team Leader
DTR Services
Saint Thomas Health Services
2000 Church Street
Nashville, TN 37236
bhendrix at stthomas.org
(615) 284-5297 (work)
(615) 222-1704 (fax)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Whatever you do, do your work heartily,
as for the Lord rather than for men
- Colossians 3:23
~~~ ><> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Confidentiality Notice: This email message, including any attachments, contains
information that is confidential and/or legally privileged. The information is intended
only for the individual(s) named above. If you are not the intended recipient or the
person responsible for delivering the email to the intended recipient, be advised that
you have received this email in error and that any use, dissemination, distribution,
forwarding, printing, or copying of this email is strictly prohibited. If you have received
this email in error, please purge it immediately and notify the sender.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20040617/7afa7231/attachment.html>
More information about the Users
mailing list