notifications based upon thresholds

Carroll, Jim P [Contractor] jcarro10 at sprintspectrum.com
Fri Apr 25 03:40:43 CEST 2003


Snippets from config files follow.  Some data obfuscated.

--------------- contactgroups.cfg --------------------------
define contactgroup{
        contactgroup_name       unix-admins
        alias                   UNIX Administrators
        members                 pager-devunix,jcarro10,otheradmin
        }
--------------- contactgroups.cfg --------------------------

--------------- contacts.cfg --------------------
define contact{
        contact_name                    pager-devunix
        alias                           DEVUNIX on-call pager
        host_notification_period        24x7
        service_notification_period     24x7
        host_notification_options       d,r
        service_notification_options    c,r
        host_notification_commands      host-notify-by-epager
        service_notification_commands   notify-by-epager
        pager                           pager-devunix
        }
define contact{
        contact_name                    jcarro10
        alias                           Jim Carroll
        host_notification_period        24x7
        service_notification_period     24x7
        host_notification_options       d,r
        service_notification_options    c,w,r
        host_notification_commands      host-notify-by-email
        service_notification_commands   notify-by-email
        email                           jcarro10 at example.com
        }
define contact{
        contact_name                    otheradmin
        alias                           Another Administrator
        host_notification_period        24x7
        service_notification_period     24x7
        host_notification_options       d,r
        service_notification_options    c,w,r
        host_notification_commands      host-notify-by-email
        service_notification_commands   notify-by-email
        email                           otheradmin at example.com
        }
--------------- contacts.cfg --------------------

NB:  pager-devunix is resolved in /etc/aliases:

--------------- /etc/aliases --------------------
pager-devunix:  :include:/home/somepath/oncall/DEVUNIX
--------------- /etc/aliases --------------------

The file DEVUNIX is maintained by a script I wrote.  You can handle this however you want; my script is a menu which updates this file (a different file for each group).  It's a cute script, but might be nicer as a PHP-based app, eg, authenticate to Nagios, choose the on-call, commit.  A "you're on call for group BLAH" msg gets sent to the new on-call person's pager, and a "you've been removed from group BLAH on-call support" msg gets sent to the previous on-call person's pager.

Anyway, I trust that I've provided enough detail for you to work with.

jc


> -----Original Message-----
> From: Ben.Farris at key3media.com [mailto:Ben.Farris at key3media.com]
> Sent: Thursday, April 24, 2003 5:59 PM
> To: Carroll, Jim P [Contractor]
> Cc: nagios-users at lists.sourceforge.net
> Subject: RE: [Nagios-users] notifications based upon thresholds
> 
> 
> 
> Jim,
> 
> Thanks...This is exactly what I want to do...
> 
> -Ben
> 
> 
> 
>                                                               
>                                                           
>                     "Carroll, Jim P                           
>                                                           
>                     [Contractor]"             To:     
> <Ben.Farris at key3media.com>, <nagios-users at lists.sourceforge.net>  
>                     <jcarro10 at sprintspe       cc:             
>                                                           
>                     ctrum.com>                Subject:     
> RE: [Nagios-users] notifications based upon thresholds       
>                                                               
>                                                           
>                     04/24/2003 03:40 PM                       
>                                                           
>                                                               
>                                                           
>                                                               
>                                                           
> 
> 
> 
> 
> The short answer is:  Create 2 contacts (eg, jim (for e-mail) and
> jim-pager).  Make sure they're both in the same contact_group.
> 
> In our particular environment, the SAs are in their appropriate
> contact_group, and a virtual contact (eg, unix-oncall-pager) 
> is a member of
> all the Unix-related contact groups.  The SAs get only e-mail 
> notifications
> on warning/critical/unknown/recovery, and the virtual contact 
> gets only
> pager notifications on critical/unknown/recovery.
> 
> I could send you snippets of my configs, but it doesn't sound 
> like it's
> exactly the same as what you're trying to do.
> 
> jc
> 
> 
> > -----Original Message-----
> > From: Ben.Farris at key3media.com [mailto:Ben.Farris at key3media.com]
> > Sent: Thursday, April 24, 2003 5:05 PM
> > To: nagios-users at lists.sourceforge.net
> > Subject: [Nagios-users] notifications based upon thresholds
> >
> >
> > Is it possible to setup notifications where emails are sent
> > out on warnings
> > for a service and paging is done on critical events. I would
> > think so but I
> > havent been able to get my config to do this. I either get
> > both emails and
> > pages or no notifications fail. Can someone send me an example.
> >
> > Thanks,
> > Ben
> >
> >
> >
> > -------------------------------------------------------
> > This sf.net email is sponsored by:ThinkGeek
> > Welcome to geek heaven.
> > http://thinkgeek.com/sf
> > _______________________________________________
> > Nagios-users mailing list
> > Nagios-users at 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
> >
> 
> 
> 
> 
> 


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Nagios-users mailing list
Nagios-users at 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





More information about the Users mailing list