Saturday, May 24. 2008Nagios 2-way alerting via SMS - Part 3Comments
Display comments as
(Linear | Threaded)
Thanks for this, just what I was looking for! Now to figure out how to hack the script so one can respond via email as well for us blackberry users.
2-Way alerting is not working for me. I've followed the whole tutorial and managed to get 1-Way alerting working but not the 2-Way alerting. It seems like the readsms.pl script is not doing much for me. I'm running Ubuntu 7.10 Linux server.
When I acknowledge a fault by way of SMS reply, the reply can be seen in the smsd database's "Inbox" table but the readsms.pl is not updating Nagios by inserting a comment and subsequently sending an acknowledgement sms (via Outbox table) to other contacts who are supposed to get sms alerts. I have a crontab to run the readsms.pl script every minute: # m h dom mon dow command * * * * * perl /usr/local/nagios/readsms.pl When I run the readsms.pl script manually, this is what I get: perl /usr/local/nagios/readsms.pl Lockfile: /var/tmp/smsread.lck exists. Exiting. Anyone who has an idea what I may be doing wrong? Thanks in advance, Lasin
I finally got the whole 2-Way SMS Alerting working some days later after I sent my previous post. Thank you to Matt Bottrell for the excellent tutorial!!!
My next objective is to try and get SMS alerts sent to an SMSC via SMPP instead of going to the GSM phone or GSM Modem Terminal. Is there a Linux app and tutorial that I can use to achieve this??? I'm trying out Kannel at the moment but there isn't much of a tutorial out there on the Net. Anyone reading this post that has done SMPP for Nagios SMS alerts please respond. Thanks, Lasin
I finally got Kannel to connect to SMSC using SMPP. Now all I need to do is modify the scripts as per the tutorials to send Nagios alerts via this SMPP connection.
Anyone with an idea of how I can modify the scripts to do this? I have an idea but am not 100% sure. Thanks in advance!!!
This is great! I've done this also to our Nagios Staging (Test Environment). However, this is very impractical if you have a 24/7 NOC watching all servers and applications alerts. Also, SMS Alerts to Email would be better since you will not be spending lots of cellphone loads or credits. Imagine if you have over a thousand services and let's say each day you are acknowledging tons of alerts. Phewww! Real Expensive right. Unlessm if your company are giving cellphone load allowances. Cheers!
For me, I have free SMS to our other phones, so it's not expensive.
You wouldn't need to use a SMS => Email gateway, as Nagios provides access to an Email alert. Be aware that the use of SMS alerts is primarily a notification and when required an acknowledgement service. Ideally during the day or when in front of the computer you would use Nagios's web-based front end and acknowledge alerts that way. As you mentioned, for a NOC it's probably not ideal. However for smaller setups or even application owners within the Nagios setup (who basically have only a select number of servers/services0 this works extremely well.
It is great!i have a couple of question, I just want Nagios to send SMS to mobile (I am not worry about cost etc we have sms gateway).
Am i connecting mobile to nagios server and let server find the device ? can you elaborate this more as I am a new in this world. coolbro
Hi all,
I think I'll write up a follow up posting that covers many of these questions, and expands a bit further on it. I should get to it in the next week (sorry hectic at the moment, just moved into a new house 4 weeks ago... so it's a little crazy around here).
Hi Matt,
Thanks for the update! Look forward to your follow-up posting. Happy settling into your new house. Rgds, Lasin
Hi LASIN,
Could you show us how you configured your commands.cfg file so as to send SMS via kannel? thanks
Hi,
I'm in the same problem than Phil, my 2-way SMS is not working, I always get the same message "Lockfile: /var/tmp/smsread.lck exists. Exiting" when I launch the readsms.pl script. How did you resolve it? anyone can help me? Thanks in advance, Victor
Hi Victor,
That will occur if you have killed the readsms.pl script unexpectedly. Confirm it's not running... then just delete the /var/tmp/smsread.lck file. It will then work again.
Hi Matt,
but I had already try that. If I delete the /var/tmp/smsread.lck file and launch the script then I get an error saying that the file at line 43 doesn't exist but does generate the file, and the next try it syas again that the file Exists. I'm in a loop, always with error.
Are you running under the Nagios user's crontab?
This is where readsms.pl needs to be executed.
Wow, this really was the easiest part to set up!
Now I have a fully working sms-notifying-sms-replying-problem-acknowledging solution. Thank you very much for these very useful tutorials and scripts. When I come to Australia (I want to see the Great Barrier Reef) I'll check you up and buy you a drink Best of luck, Alex.
Hi Matt,
Thanks for this great howto. Receiving SMS's as never before Only replying to them doesn't work (yet). If i reply to one SMS. It is coming into Nagios but then nothing happens. This is from the Nagios log when inserted via SMS: [1274438230] EXTERNAL COMMAND: ACKNOWLEDGE_SVC_PROBLEM;MCFISA66 ;Check When Mitmanuals SSL Expires ;1;1;1;Wijnand Boon SMS; As you can see, it has carriage returns in it. If i do the same via the Nagios interface then this will be logged: [1274431310] EXTERNAL COMMAND: ACKNOWLEDGE_SVC_PROBLEM;MCFISA66;Check When Mitmanuals SSL Expires;2;1;0;nagiosadmin;WAB But without carriage returns. |
QuicksearchCalendar
My PhotosWhat I've been listening toWe Want More by The Living End on Tue 31 Aug 2010, 03:00:43 PM Headmaster Ritual by Radiohead on Tue 31 Aug 2010, 02:55:50 PM The Beauty Of Gray by Live on Tue 31 Aug 2010, 02:51:34 PM Don't Panic by Coldplay on Tue 31 Aug 2010, 02:49:18 PM Hold Tight London (feat Anna-Lynne Williams) by The Chemical Brothers on Tue 31 Aug 2010, 02:43:18 PM Cantaloupe Island by Kai Winding on Tue 31 Aug 2010, 02:37:33 PM Twosome (Marta et Katalin version) by Deep Forest on Tue 31 Aug 2010, 02:33:25 PM The Big Jump by The Chemical Brothers on Tue 31 Aug 2010, 02:28:41 PM Key to the Highway by Derek and the Dominos on Tue 31 Aug 2010, 02:22:14 PM Isolate by Moby on Tue 31 Aug 2010, 02:18:46 PM Fri 3 Sep 2010, 09:32:49 AM
Recently BookmarkedBlog StatsLast entry: 2010-07-25 10:10
278 entries written
493 comments have been made
Blog Tags accounting advertising alerting apps asterisk australia birthday building coding cricket email entertainment failure family firefox football friends gnome google government hardware health holiday house humour Internet ISP java life linksys Linux marriage microsoft mistake monitoring movies mozilla nagios networking news office openoffice open source opinion oss pets phone photo play politics power relax respect review security shopping sms snom snoring society software spam sport support sysadmin technology telephony tennis terrorism tv twitter ups virtualbox virtualization voip web weekend wildlife windows wine wireless workLicense |
|||||||||||||||||||||||||||||||||||||||||||||||||
This is a 3 part posting that covers how you can setup 2-way Nagios alerting via SMS. The series is broken down as such: Part 1: Background and Requirements (this article)Part 2: Sending SMS messages from NagiosPart 3: Acknowledging SMS messages For
Tracked: May 24, 03:05
This is a 3 part posting that covers how you can setup 2-way Nagios alerting via SMS. The series is broken down as such: Part 1: Background and RequirementsPart 2: Sending SMS messages from Nagios (this article)Part 3: Acknowledging SMS messages Sen
Tracked: May 24, 03:06