On Fri, 22 May 2009 19:05:20 +0200, "Georg M. Sorst" <georgso...@gmx.de> wrote:
>Hi list! > >I am currently integrating Skype into our monitoring to provide SMS >notifications. It's working pretty fine and if you're interested you can >check out my documentation in the Nagios wiki [1]. > >However, I had one tiny problem with the configuration that I would like >to sort out if possible. The problem is: When the HTTPs are down for >more than 20 minutes I want to be notified by SMS, but I still want to >use the regular mail notifications (currently set to occur after I >believe 3 Minutes). My solution to this was to duplicate the service >definitions for HTTP to provide different check intervals / max check >attempts (coming out at 10 minutes and 20 minutes respectively) and >contact groups / contacts (the contacts in the first group use mail >notifications, the contacts in the second group use SMS notifications, >but are essentially the same users as in the first group, just >duplicated). Have a look at the wiki page if this description is unclear. > >So, in essence my question is if there is any way to tell Nagios to >"switch" to a different notification command after a certain downtime or >any other way to avoid this duplication. > >Thanks and best regards, >Georg > > >[1] http://community.nagios.org/wiki/index.php/SkypeSmsNotification Instead of duplicating the service, you can use service escalations, as defined in the docs [2]. This will esentially do the same thing you have with the duplicated commands, however you'll still need new contacts to send the notifications to the SMS rather than the regular emails. The other way to handle it would be a custom notification script which you use for notifications, and pass in the arguments for the SMS number, the email address, the usual macros, and the notification count [3]. Then you can throw some logic in the script that does something like this: if ($HOSTNOTIFICATIONNUMBER > 5) { send_sms_message(); } send_email_message(); [2]: http://nagios.sourceforge.net/docs/3_0/objectdefinitions.html#serviceescalation [3]: http://nagios.sourceforge.net/docs/3_0/macrolist.html -- Jonathan Angliss <j...@netdork.net> ------------------------------------------------------------------------------ Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers & brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, & iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian Group, R/GA, & Big Spaceship. http://www.creativitycat.com _______________________________________________ Nagios-users mailing list Nagios-users@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