<br />
<b>Warning</b>:  preg_replace() [<a href='function.preg-replace'>function.preg-replace</a>]: Unknown modifier '$' in <b>/home/twinsword/domains/bottrell.com.au/public_html/matt/plugins/serendipity_event_geshi/geshi.php</b> on line <b>1954</b><br />
<br />
<b>Warning</b>:  preg_replace() [<a href='function.preg-replace'>function.preg-replace</a>]: Unknown modifier '$' in <b>/home/twinsword/domains/bottrell.com.au/public_html/matt/plugins/serendipity_event_geshi/geshi.php</b> on line <b>1954</b><br />
<br />
<b>Warning</b>:  preg_replace() [<a href='function.preg-replace'>function.preg-replace</a>]: Unknown modifier '$' in <b>/home/twinsword/domains/bottrell.com.au/public_html/matt/plugins/serendipity_event_geshi/geshi.php</b> on line <b>1954</b><br />
<br />
<b>Warning</b>:  preg_replace() [<a href='function.preg-replace'>function.preg-replace</a>]: Unknown modifier '$' in <b>/home/twinsword/domains/bottrell.com.au/public_html/matt/plugins/serendipity_event_geshi/geshi.php</b> on line <b>1954</b><br />
<br />
<b>Warning</b>:  preg_replace() [<a href='function.preg-replace'>function.preg-replace</a>]: Unknown modifier '$' in <b>/home/twinsword/domains/bottrell.com.au/public_html/matt/plugins/serendipity_event_geshi/geshi.php</b> on line <b>1954</b><br />
<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule">
<channel>
    <title>Bend in the Weather (Entries tagged as nagios)</title>
    <link>http://matt.bottrell.com.au/</link>
    <description>A blog about Linux, Life and the 'Net</description>
    <dc:language>en</dc:language>
    <admin:errorReportsTo rdf:resource="mailto:matt@bottrell.com.au" />
    <generator>Serendipity 1.3.1 - http://www.s9y.org/</generator>
    <pubDate>Sun, 25 May 2008 12:28:36 GMT</pubDate>

    <image>
        <url>http://matt.bottrell.com.au/templates/default/img/s9y_banner_small.png</url>
        <title>RSS: Bend in the Weather - A blog about Linux, Life and the 'Net</title>
        <link>http://matt.bottrell.com.au/</link>
        <width>100</width>
        <height>21</height>
    </image>

<item>
    <title>Nagios 2-way alerting via SMS - Part 3</title>
    <link>http://matt.bottrell.com.au/archives/209-Nagios-2-way-alerting-via-SMS-Part-3.html</link>
            <category>Apps</category>
            <category>Coding</category>
            <category>Hardware</category>
            <category>Linux</category>
            <category>Web</category>
            <category>Work</category>
    
    <comments>http://matt.bottrell.com.au/archives/209-Nagios-2-way-alerting-via-SMS-Part-3.html#comments</comments>
    <wfw:comment>http://matt.bottrell.com.au/wfwcomment.php?cid=209</wfw:comment>

    <slash:comments>19</slash:comments>
    <wfw:commentRss>http://matt.bottrell.com.au/rss.php?version=2.0&amp;type=comments&amp;cid=209</wfw:commentRss>
    

    <author>mbottrell@gmail.com (Matt)</author>
    <content:encoded>
    This is a 3 part posting that covers how you can setup 2-way &lt;a href=&quot;http://www.nagios.org/&quot; title=&quot;An Open Source host, service and network monitoring program&quot;&gt;Nagios&lt;/a&gt; alerting via SMS.&lt;br /&gt;
&lt;br /&gt;
The series is broken down as such:&lt;br /&gt;
 &lt;ol&gt;&lt;li&gt;&lt;strong&gt;Part 1:&lt;/strong&gt; &lt;a href=&quot;http://matt.bottrell.com.au/archives/170-Nagios-2-way-alerting-via-SMS-Part-1.html&quot;&gt;Background and Requirements&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Part 2:&lt;/strong&gt; &lt;a href=&quot;http://matt.bottrell.com.au/archives/205-Nagios-2-way-alerting-via-SMS-Part-2.html&quot;&gt;Sending SMS messages from Nagios&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Part 3: Acknowledging SMS messages&lt;/strong&gt; (this article)&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;
&lt;strong&gt;Review&lt;/strong&gt;&lt;br /&gt;
&lt;div class=&quot;serendipity_imageComment_right&quot; style=&quot;width: 206px&quot;&gt;&lt;div class=&quot;serendipity_imageComment_img&quot;&gt;&lt;!-- s9ymdb:10 --&gt;&lt;img class=&quot;serendipity_image_right&quot; width=&quot;206&quot; height=&quot;206&quot; src=&quot;http://matt.bottrell.com.au/uploads/NagiosSMS/SMS-Problem.png&quot; alt=&quot;&quot;  /&gt;&lt;/div&gt;&lt;div class=&quot;serendipity_imageComment_txt&quot;&gt;The SMS message Nagios generates when there is a problem.&lt;/div&gt;&lt;/div&gt;As we saw in &lt;a href=&quot;http://matt.bottrell.com.au/archives/205-Nagios-2-way-alerting-via-SMS-Part-2.html&quot; title=&quot;Nagios 2-way alerting via SMS - Part 2&quot;&gt;Part 2&lt;/a&gt; we covered setting up Nagios to send out alerts.&lt;br /&gt;
&lt;br /&gt;
Whilst this is great, it&#039;s not of great value if we can&#039;t do anything with these SMS messages.  In addition, if no-one is sitting in front of the actual Nagios web console to acknowledge the issue, then Nagios will continue sending the SMS messages and will quickly fill up your phone&#039;s message memory.  Not ideal!  &lt;img src=&quot;http://matt.bottrell.com.au/templates/default/img/emoticons/sad.png&quot; alt=&quot;:-(&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
The message is quite straight forward as well to read.  A service problem message contains:&lt;ol&gt;&lt;li&gt;The type of incident: &lt;em&gt;PROBLEM&lt;/em&gt;&lt;/li&gt;&lt;li&gt;The &lt;em&gt;Host&lt;/em&gt; affected&lt;/li&gt;&lt;li&gt;The &lt;em&gt;Service&lt;/em&gt; affected&lt;/li&gt;&lt;li&gt;The &lt;em&gt;Severity&lt;/em&gt; of the incident&lt;/li&gt;&lt;li&gt;Additional &lt;em&gt;Information&lt;/em&gt; about the incident.&lt;/li&gt;&lt;li&gt;The &lt;em&gt;Time&lt;/em&gt; of the incident&lt;/li&gt;&lt;li&gt;A field to &lt;em&gt;Respond/acknowledge&lt;/em&gt; the incident&lt;/li&gt;&lt;/ol&gt;A host problem message is quite similar but does not have a Service or Severity line.&lt;br /&gt;
&lt;br /&gt;
Here is a Host problem message for comparison:&lt;div class=&quot;geshi&quot; style=&quot;text-align: left&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-family: &#039;Courier New&#039;, Courier, monospace; color: black; font-weight: normal; font-style: normal;&quot;&gt;&lt;div style=&quot;font-family: &#039;Courier New&#039;, Courier, monospace; font-weight: normal;&quot;&gt;PROBLEM&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-family: &#039;Courier New&#039;, Courier, monospace; color: black; font-weight: normal; font-style: normal;&quot;&gt;&lt;div style=&quot;font-family: &#039;Courier New&#039;, Courier, monospace; font-weight: normal;&quot;&gt;Host &#039;MyServer&#039; is DOWN&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-family: &#039;Courier New&#039;, Courier, monospace; color: black; font-weight: normal; font-style: normal;&quot;&gt;&lt;div style=&quot;font-family: &#039;Courier New&#039;, Courier, monospace; font-weight: normal;&quot;&gt;I: CRITICAL - Host Unreachable &lt;span style=&quot;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;&quot;&gt;10&lt;/span&gt;.&lt;span style=&quot;&quot;&gt;0&lt;/span&gt;.&lt;span style=&quot;&quot;&gt;0&lt;/span&gt;.&lt;span style=&quot;&quot;&gt;74&lt;/span&gt;&lt;span style=&quot;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-family: &#039;Courier New&#039;, Courier, monospace; color: black; font-weight: normal; font-style: normal;&quot;&gt;&lt;div style=&quot;font-family: &#039;Courier New&#039;, Courier, monospace; font-weight: normal;&quot;&gt;T: &lt;span style=&quot;&quot;&gt;2008&lt;/span&gt;-&lt;span style=&quot;&quot;&gt;05&lt;/span&gt;-&lt;span style=&quot;&quot;&gt;22&lt;/span&gt; &lt;span style=&quot;&quot;&gt;17&lt;/span&gt;:&lt;span style=&quot;&quot;&gt;52&lt;/span&gt;:&lt;span style=&quot;&quot;&gt;33&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-family: &#039;Courier New&#039;, Courier, monospace; color: black; font-weight: normal; font-style: normal;&quot;&gt;&lt;div style=&quot;font-family: &#039;Courier New&#039;, Courier, monospace; font-weight: normal;&quot;&gt;R: &lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;strong&gt;Replying to the Nagios Problem SMS&lt;/strong&gt;&lt;br /&gt;
&lt;div class=&quot;serendipity_imageComment_left&quot; style=&quot;width: 206px&quot;&gt;&lt;div class=&quot;serendipity_imageComment_img&quot;&gt;&lt;!-- s9ymdb:11 --&gt;&lt;img class=&quot;serendipity_image_left&quot; width=&quot;206&quot; height=&quot;206&quot; src=&quot;http://matt.bottrell.com.au/uploads/NagiosSMS/SMS-Reply.png&quot; alt=&quot;&quot;  /&gt;&lt;/div&gt;&lt;div class=&quot;serendipity_imageComment_txt&quot;&gt;Sending a response back to Nagios via SMS.&lt;/div&gt;&lt;/div&gt;When a problem from Nagios is sent to you via SMS it&#039;s quite easy to respond.&lt;br /&gt;
&lt;br /&gt;
All you need to do is reply to the message (and include the text - which most mobile phones on the market provide a feature to do).&lt;br /&gt;
&lt;br /&gt;
Whilst not required, you can append a simple message to your reply.  This will be used in the acknowledgment response and add a comment to the service.&lt;br /&gt;
&lt;br /&gt;
Comments don&#039;t need to be long, but they do help your other team members or interested parties know what is happening with the issue.&lt;br /&gt;
&lt;br /&gt;
Be careful what you write!  &lt;img src=&quot;http://matt.bottrell.com.au/templates/default/img/emoticons/eek.png&quot; alt=&quot;:-O&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;&lt;br /&gt;
The response you send will also be used in a follow-up SMS to everyone notifying them that someone is looking at the issue.  You don&#039;t want to send something that might not be appreciated others that recipients    &lt;img src=&quot;http://matt.bottrell.com.au/templates/default/img/emoticons/wink.png&quot; alt=&quot;;-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Acknowledging SMS messages&lt;/strong&gt;&lt;br /&gt;
Acknowledging messages from Nagios is quite simple now we have our SMS Daemon setup (&lt;a href=&quot;http://matt.bottrell.com.au/archives/205-Nagios-2-way-alerting-via-SMS-Part-2.html&quot;&gt;see Part 2 for details&lt;/a&gt;)&lt;br /&gt;
As a result, any incoming SMS messages get stored into our MySQL database.   &lt;img src=&quot;http://matt.bottrell.com.au/templates/default/img/emoticons/laugh.png&quot; alt=&quot;:-D&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
We just need a process now to read them from the database, interpret them and then update Nagios appropriately.  &lt;img src=&quot;http://matt.bottrell.com.au/templates/default/img/emoticons/cool.png&quot; alt=&quot;8-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt; &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;&lt;a href=&quot;http://matt.bottrell.com.au/archives/209-Nagios-2-way-alerting-via-SMS-Part-3.html#extended&quot;&gt;Continue reading &quot;Nagios 2-way alerting via SMS - Part 3&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Sat, 24 May 2008 02:54:00 +1000</pubDate>
    <guid isPermaLink="false">http://matt.bottrell.com.au/archives/209-guid.html</guid>
    <category>alerting</category>
<category>apps</category>
<category>coding</category>
<category>hardware</category>
<category>linux</category>
<category>monitoring</category>
<category>nagios</category>
<category>sms</category>
<category>web</category>
<category>work</category>
<creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license>
</item>
<item>
    <title>Nagios 2-way alerting via SMS - Part 2</title>
    <link>http://matt.bottrell.com.au/archives/205-Nagios-2-way-alerting-via-SMS-Part-2.html</link>
            <category>Apps</category>
            <category>Coding</category>
            <category>Hardware</category>
            <category>Linux</category>
            <category>Web</category>
            <category>Work</category>
    
    <comments>http://matt.bottrell.com.au/archives/205-Nagios-2-way-alerting-via-SMS-Part-2.html#comments</comments>
    <wfw:comment>http://matt.bottrell.com.au/wfwcomment.php?cid=205</wfw:comment>

    <slash:comments>19</slash:comments>
    <wfw:commentRss>http://matt.bottrell.com.au/rss.php?version=2.0&amp;type=comments&amp;cid=205</wfw:commentRss>
    

    <author>mbottrell@gmail.com (Matt)</author>
    <content:encoded>
    This is a 3 part posting that covers how you can setup 2-way &lt;a href=&quot;http://www.nagios.org/&quot; title=&quot;An Open Source host, service and network monitoring program&quot;&gt;Nagios&lt;/a&gt; alerting via SMS.&lt;br /&gt;
&lt;br /&gt;
The series is broken down as such:&lt;br /&gt;
 &lt;ol&gt;&lt;li&gt;&lt;strong&gt;Part 1:&lt;/strong&gt; &lt;a href=&quot;http://matt.bottrell.com.au/archives/170-Nagios-2-way-alerting-via-SMS-Part-1.html&quot;&gt;Background and Requirements&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Part 2: Sending SMS messages from Nagios&lt;/strong&gt; (this article)&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Part 3:&lt;/strong&gt; &lt;a href=&quot;http://matt.bottrell.com.au/archives/209-Nagios-2-way-alerting-via-SMS-Part-3.html&quot;&gt;Acknowledging SMS messages&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;
&lt;strong&gt;Sending SMS messages from Nagios&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;Introduction&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
To send messages from Nagios, I&#039;m going to assume you already have a working &lt;a href=&quot;http://www.nagios.org/&quot; title=&quot;An Open Source host, service and network monitoring program&quot;&gt;Nagios&lt;/a&gt; environment.&lt;br /&gt;
&lt;br /&gt;
2-way SMS messaging refers to the fact that &lt;em&gt;you can reply&lt;/em&gt; to an SMS message and &lt;em&gt;action is taken based on your response&lt;/em&gt; to the sender.&lt;br /&gt;
In this instance, &lt;em&gt;Nagios will send&lt;/em&gt; a SMS (a Nagios alert), and &lt;em&gt;you can reply&lt;/em&gt; to the SMS (a Nagios alert acknowledgment).&lt;br /&gt;
&lt;br /&gt;
This part will cover sending out the SMS from Nagios once a host or service problem occurs.  Part 3 will deal with how to send the reply and process it within Nagios.&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;Keep reading!&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
Due to the large size of this posting (it contains step-by-step instructions on setting up the SMS gateway), you may find your feed reader only contains the post up to here.  &lt;br /&gt;
&lt;br /&gt;
If that is the case &lt;a href=&quot;http://matt.bottrell.com.au/archives/205-Nagios-2-way-alerting-via-SMS-Part-2.html#extended&quot; title=&quot;Continue reading&quot;&gt;continue reading the post here&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;&lt;a href=&quot;http://matt.bottrell.com.au/archives/205-Nagios-2-way-alerting-via-SMS-Part-2.html#extended&quot;&gt;Continue reading &quot;Nagios 2-way alerting via SMS - Part 2&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Fri, 23 May 2008 01:25:00 +1000</pubDate>
    <guid isPermaLink="false">http://matt.bottrell.com.au/archives/205-guid.html</guid>
    <category>alerting</category>
<category>apps</category>
<category>coding</category>
<category>hardware</category>
<category>linux</category>
<category>monitoring</category>
<category>nagios</category>
<category>sms</category>
<category>web</category>
<category>work</category>
<creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license>
</item>
<item>
    <title>Nagios 2-way alerting via SMS - Part 1</title>
    <link>http://matt.bottrell.com.au/archives/170-Nagios-2-way-alerting-via-SMS-Part-1.html</link>
            <category>Apps</category>
            <category>Coding</category>
            <category>Hardware</category>
            <category>Linux</category>
            <category>Web</category>
            <category>Work</category>
    
    <comments>http://matt.bottrell.com.au/archives/170-Nagios-2-way-alerting-via-SMS-Part-1.html#comments</comments>
    <wfw:comment>http://matt.bottrell.com.au/wfwcomment.php?cid=170</wfw:comment>

    <slash:comments>12</slash:comments>
    <wfw:commentRss>http://matt.bottrell.com.au/rss.php?version=2.0&amp;type=comments&amp;cid=170</wfw:commentRss>
    

    <author>mbottrell@gmail.com (Matt)</author>
    <content:encoded>
    This is a 3 part posting that covers how you can setup 2-way &lt;a href=&quot;http://www.nagios.org/&quot; title=&quot;Nagios OSS based host, service and network monitoring program&quot;&gt;Nagios&lt;/a&gt; alerting via SMS.&lt;br /&gt;
&lt;br /&gt;
The series is broken down as such:&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;&lt;strong&gt;Part 1: Background and Requirements&lt;/strong&gt; (this article)&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Part 2:&lt;/strong&gt; &lt;a href=&quot;http://matt.bottrell.com.au/archives/205-Nagios-2-way-alerting-via-SMS-Part-2.html&quot;&gt;Sending SMS messages from Nagios&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Part 3:&lt;/strong&gt; &lt;a href=&quot;http://matt.bottrell.com.au/archives/209-Nagios-2-way-alerting-via-SMS-Part-3.html&quot;&gt;Acknowledging SMS messages&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;
For those that wish to setup simple, inexpensive monitoring you will find that it is simpler than first thought.  Feel free to grab  the code-snippets provided over the series and make use of it in your own environment.  &lt;img src=&quot;http://matt.bottrell.com.au/templates/default/img/emoticons/smile.png&quot; alt=&quot;:-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt; &lt;br /&gt;
&lt;br /&gt;
The Nagios SMS alert system has been running here now in production for approximately 6 months and works quite well.  The Nagios system manages a range of services/hosts and checks approximately 1,500 items (by no means large); it has however cut down the amount of time I require looking at Nagios alert screens.   &lt;img src=&quot;http://matt.bottrell.com.au/templates/default/img/emoticons/cool.png&quot; alt=&quot;8-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Background and Requirements&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;Background&lt;/u&gt;&lt;br /&gt;
I like to dabble in web development and have now for around 10 years.   As a result I undertake hosting in commercial data centers in order to ensure maximum uptime and good responsiveness.  To offset the cost, I now provide hosting/email and web-development services to a number of clients.  &lt;img src=&quot;http://matt.bottrell.com.au/templates/default/img/emoticons/cool.png&quot; alt=&quot;8-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt; &lt;br /&gt;
&lt;br /&gt;
As a result, it means one cannot easily look at the diagnostic LEDs, or even the console easily to determine when a problem has occurred.  (Whilst I can make use of an &lt;a href=&quot;javascript:void(0);&quot; onmouseover=&quot;return overlib(&#039;IP based Keyboard-Video-Mouse&#039;);&quot; onmouseout=&quot;return nd();&quot;&gt;IP KVM&lt;/a&gt;; it is normally a PITA and best avoided!)&lt;br /&gt;
&lt;br /&gt;
Ideally I was after a monitoring system that alerted me &lt;em&gt;prior to a problem&lt;/em&gt; so that I can deal with it before it became a bigger issue.&lt;br /&gt;
&lt;br /&gt;
Nagios was chosen as it provided all the features we required, had support for a large number of items we wished to monitor, and was simple to extend to check custom services based on being written in &lt;a href=&quot;http://www.perl.org/&quot; title=&quot;Cross-platform scripting programming language&quot;&gt;Perl&lt;/a&gt;.  Nagios comes with a swag of documentation making it easy to write simple checks or extend on as was seen fit.  As I&#039;ve coded a fair amount in Perl over the years for various System Administration tasks, Nagios was seen as a good fit.   Being an Open-Source project ensured that it was an added bonus of both being free-to-use, but also I had access to the source code to understand better how the system worked.  &lt;img src=&quot;http://matt.bottrell.com.au/templates/default/img/emoticons/cool.png&quot; alt=&quot;8-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt; &lt;br /&gt;
&lt;br /&gt;
I have used Nagios for years now, and historically have relied on web/email alerts.   However, being human means I can&#039;t always be in front of my computer 24x7.  This worked the majority of the time, though as luck would have it we ended up with a system failure that occurred early one mid-week morning. &lt;img src=&quot;http://matt.bottrell.com.au/templates/default/img/emoticons/cry.png&quot; alt=&quot;:&#039;(&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;   As a result it was decided we needed to put a system in place that alerted when something occurred when I wasn&#039;t in front of the computer.&lt;br /&gt;
&lt;br /&gt;
We already had a working Nagios monitoring environment, so we wanted to make use of this system going forward.&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;Requirements&lt;/u&gt;&lt;br /&gt;
I wrote down our requirements for a paging system.  I wanted to ensure whatever solution was put in place that it could grow with us, but also that we weren&#039;t locked into a solution for years or even worse, that we embarked upon a solution that would ultimately restrict any future requirements we might have.&lt;br /&gt;
&lt;br /&gt;
There were several ways we could be alerted:&lt;ol type=a&gt;&lt;br /&gt;
&lt;li&gt;Telephone:  Have the system &#039;call us&#039;.  Possibly play a standard recorded message.&lt;/li&gt;&lt;li&gt;Pager: Make use of an alpha-numeric pager.&lt;/li&gt;&lt;li&gt;SMS: Send a text message.&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;
We ruled out a telephone, as a recorded message wouldn&#039;t provide us any real details of what the issue was, unless we actually started recording exactly what the issue was.  It was beginning to look too complicated for a simple requirement.  I really thought a Voice-IVR was an overkill for what we required.  (Whilst it may of indeed been fun to hack/configure!)  &lt;img src=&quot;http://matt.bottrell.com.au/templates/default/img/emoticons/wink.png&quot; alt=&quot;;-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt; &lt;br /&gt;
&lt;br /&gt;
A pager was then looked into.  Whilst pagers work well in ensuring a message is delivered we saw this as a drawback, in the sense it meant carrying around another device on us.  (We already carried a mobile phone and the prospect of carrying a pager didn&#039;t appeal).  Also pagers traditionally send one-way messages; and we wanted a system where we could acknowledge an alert.&lt;br /&gt;
&lt;br /&gt;
We settled on a alert delivery system to be used via SMS.  Whilst SMS doesn&#039;t have the guaranteed delivery system of that of a pager, it did open up the possibility of being able to respond to an alert.  It had the added bonus that we already carried our mobiles close by 24x7 so there was no need to carry an additional device.   Using a SMS to deliver a text based message also ensured we could then place useful information in the message to assist in the problem diagnosis.&lt;br /&gt;
&lt;br /&gt;
We had now determined our delivery system  (SMS), it was time to find technical solutions that would fit in with the existing Nagios monitoring platform.&lt;br /&gt;
&lt;br /&gt;
Nagios by default has the ability to alert via various means.   Pagers, SMS and Emails are handled quite easily within the standard configuration that ships with the software.&lt;br /&gt;
&lt;br /&gt;
It would make the integration of SMS quite easily.  However, it was only by default a 1-way system.  There was no provision to handle a 2-way message.  ( Alert Message then acknowledgment message)&lt;br /&gt;
&lt;br /&gt;
A 2-way SMS alert system was preferred as it could be setup to stop alerting us continually via SMS once the alert had been acknowledged.  It also had the added benefit that whilst the message was sent to other parties, it could also ensure that they were aware the problem was being investigated and avoid duplication of work.&lt;br /&gt;
&lt;br /&gt;
We also wanted to run the SMS alert system as close as possible to the Nagios monitoring host.  This would ensure that if we had a physical network or IP link down, we could still get messages out.  This cut out using a 3&lt;sup&gt;rd&lt;/sup&gt; party SMS service.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Coming Up In the next part of the series...&lt;/strong&gt;&lt;br /&gt;
In the next part, I&#039;ll describe the components that make up our 2-way SMS solution using OSS software and some of the scripts we hacked together to &#039;glue&#039; the solution together.&lt;br /&gt;
&lt;br /&gt;
It&#039;s now been running without a hitch now for about 6 months.&lt;br /&gt;
&lt;br /&gt;
We also use it as a Web2SMS gateway locally, as well as being open enough that I can utilize it via the CLI to send out alerts.   &lt;img src=&quot;http://matt.bottrell.com.au/templates/default/img/emoticons/cool.png&quot; alt=&quot;8-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt; &lt;br /&gt;
&lt;br /&gt;
Looking back the solution was quite simple, and met all our requirements. 
    </content:encoded>

    <pubDate>Mon, 19 May 2008 18:09:00 +1000</pubDate>
    <guid isPermaLink="false">http://matt.bottrell.com.au/archives/170-guid.html</guid>
    <category>alerting</category>
<category>apps</category>
<category>coding</category>
<category>hardware</category>
<category>linux</category>
<category>monitoring</category>
<category>nagios</category>
<category>sms</category>
<category>web</category>
<category>work</category>
<creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license>
</item>

</channel>
</rss>