<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1400" name=GENERATOR></HEAD>
<BODY style="MARGIN: 4px 4px 1px; FONT: 10pt Tahoma">
<DIV><FONT face="Courier New">I have nagios currently using sendpage to send pages to pagers. This is done the typical way via contacts.cfg configuration below:</FONT></DIV>
<DIV><FONT face="Courier New"></FONT> </DIV>
<DIV><FONT face="Courier New">###################################################################</FONT></DIV>
<DIV><FONT face="Courier New"># 'contactperson' contact definition<BR>define contact{<BR> contact_name contactperson<BR> alias Contact Person<BR> service_notification_period 24x7<BR> host_notification_period 24x7<BR> service_notification_options c,r<BR> host_notification_options d,r<BR> service_notification_commands <STRONG>notify-by-sendpage</STRONG><BR> host_notification_commands <STRONG>host-notify-by-sendpage</STRONG><BR> service_notification_commands <STRONG>notify-by-email</STRONG><BR> host_notification_commands <STRONG>host-notify-by-email</STRONG><BR> email </FONT><A href="mailto:contactperson@domain.com"><FONT face="Courier New">contactperson@domain.com</FONT></A></DIV>
<DIV><FONT face="Courier New"> pager contactperson<BR> }<BR></FONT></DIV>
<DIV><FONT face="Courier New"></FONT> </DIV>
<DIV><FONT face="Courier New"></FONT> </DIV>
<DIV><FONT face="Courier New">I have created in <STRONG>misccommands.cfg</STRONG>, the following <STRONG>notify-by-sendpage </STRONG>definition:</FONT></DIV>
<DIV><FONT face="Courier New"></FONT> </DIV>
<DIV><FONT face="Courier New">###################################################################</FONT></DIV>
<DIV><FONT face="Courier New"># 'notify-by-sendpage' command definition<BR>define command{<BR> command_name <STRONG>notify-by-sendpage</STRONG><BR> command_line /usr/bin/snpp -m "Nagios ALERT: Service: $SERVICEDESC$ Host: $HOSTNAME$ Address: $HOSTADDRESS$ State: $SERVICESTATE$ Info: $OUTPUT$ Date: $DATETIME$" $CONTACTPAGER$<BR> }</FONT></DIV>
<DIV><FONT face="Courier New"></FONT> </DIV>
<DIV><FONT face="Courier New"># 'host-notify-by-sendpage' command definition<BR>define command{<BR> command_name host-notify-by-sendpage<BR> command_line /usr/bin/snpp -m "Nagios ALERT: Service: $SERVICEDESC$ Host: $HOSTNAME$ Address: $HOSTADDRESS$ State: $SERVICESTATE$ Info: $OUTPUT$ Date: $DATETIME$" $CONTACTPAGER$<BR> }<BR></FONT></DIV>
<DIV><FONT face="Courier New"></FONT> </DIV>
<DIV><FONT face="Courier New">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 <STRONG>contacts.cfg</STRONG> and the <STRONG>misccommands.cfg</STRONG>?</FONT></DIV>
<DIV><FONT face="Courier New"></FONT> </DIV>
<DIV><FONT face="Courier New">Currently, email notification will interpret the variable <STRONG>$CONTACTEMAIL$</STRONG> as the email address after email in <STRONG>contacts.cfg</STRONG>. Also pager notification will interpret the variable <STRONG>$CONTACTPAGER$</STRONG> as the pager ID for sendpage to page to. I want to create a <STRONG>notify-by-textmessage</STRONG> entry in <STRONG>misccommands.cfg</STRONG> using <STRONG>$CONTACTTEXTMSG$</STRONG> as a variable to be interpreted as <STRONG>textmsg</STRONG> from the <STRONG>contacts.cfg</STRONG> file.</FONT></DIV>
<DIV><FONT face="Courier New"></FONT> </DIV>
<DIV><FONT face="Courier New">Example:</FONT></DIV>
<DIV><FONT face="Courier New"> (from <STRONG>contacts.cfg</STRONG>)</FONT></DIV>
<DIV><FONT face="Courier New"> .....</FONT></DIV>
<DIV><FONT face="Courier New"> service_notification_commands <STRONG>notify-by-textmsg</STRONG><BR> host_notification_commands <STRONG>host-notify-by-textmsg</STRONG><BR>
<DIV><FONT face="Courier New"> .....</FONT></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> (from <STRONG>misccommands.cfg</STRONG>)</DIV>
<DIV>
<DIV><FONT face="Courier New"> # 'notify-by-textmsg command definition<BR> define command{<BR> command_name <STRONG>notify-by-textmsg</STRONG></FONT></DIV>
<DIV><FONT face="Courier New"> command_line /usr/bin/snpp -m "Nagios ALERT: Service: $SERVICEDESC$ Host: $HOSTNAME$ Address: $HOSTADDRESS$ State: $SERVICESTATE$ Info: $OUTPUT$ Date: $DATETIME$" $CONTACTTEXTMSG$<BR> }</FONT></DIV></DIV>
<DIV> </DIV></DIV></FONT>
<DIV><FONT face="Courier New"> </DIV></FONT>
<DIV><FONT face="Courier New"></FONT> </DIV>
<DIV><FONT face="Courier New">Will this work? Does the variable $CONTACTTEXTMSG$ work correctly?</FONT></DIV>
<DIV><FONT face="Courier New"></FONT> </DIV>
<DIV><FONT face="Courier New">Thanks for your assistance,</FONT></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ><> ~~~<BR>Brian Hendrix<BR>Team Leader<BR>DTR Services<BR>Saint Thomas Health Services<BR>2000 Church Street<BR>Nashville, TN 37236</DIV>
<DIV> </DIV>
<DIV><A href="mailto:bhendrix@stthomas.org">bhendrix@stthomas.org</A> <BR>(615) 284-5297 (work)<BR>(615) 222-1704 (fax)<BR>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<BR>Whatever you do, do your work heartily,<BR>as for the Lord rather than for men<BR> - Colossians 3:23<BR>~~~ ><> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</DIV>
<FONT SIZE=3 COLOR=BLUE><PRE>
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.
</PRE></FONT>
</BODY></HTML>