on-call pager rotation

Jason Marshall jasonm at kelman.com
Wed Aug 14 17:00:10 CEST 2002


> The crude way of doing this would, of course, to be editing
> escalations.cfg once a week, changing who gets to be the primary
> on-call.  But I'd like to think there's a better way of doing this,
> preferably web-based.

We're looking at the same thing here.  What I came up with was replacing
the actual qpage notification with a simple wrapper that looks in a
directory that contains files named by on-call person.  For instance, in
/opt/nagios/notifications/dbase, you'd have three empty files, rob, bill
and stef (or whatever).  They'd be world-writable.  All that someone has
to do is touch the appropriate file to change who's on-call.  The person
going OFF-call is always the best choice here, as he or she has a vested
interest in the rotation happening, or else his or her pager keeps going
off!

orion:(jasonm):/opt/nagios/notifications/dbase$ ls -1rt
rob
stef
bill

Now, if bill's coming off-call and it's rob's turn, bill would "touch"
rob, and now:

orion:(jasonm):/opt/nagios/notifications/dbase$ touch rob 
orion:(jasonm):/opt/nagios/notifications/dbase$ ls -1rt
bill
stef
rob

Rob is listed last, so he'd be the one on call.  The notification wrapper
just does a ls -1rt in that directory, does a tail -1 on the result, and
voila, you get the name of the new on-call person.  

You can rig up a CGI script to do this, so if Bill gets off work and
goes to the grocery store and the stupid pager goes off, he can get out
his wireless PDA and click on "make rob the on-call guy".  You get the
idea.

---
Jason Marshall, Unix Geek, Kelman Technologies, Inc., Calgary, AB, Canada.

  From a Sun Microsystems bug report (#4102680):
    "Workaround: don't pound on the mouse like a wild monkey."

  "I have great faith in fools: 
     Self confidence my friends call it."  -Edgar Allan Poe




-------------------------------------------------------
This sf.net email is sponsored by: Dice - The leading online job board
for high-tech professionals. Search and apply for tech jobs today!
http://seeker.dice.com/seeker.epl?rel_code=31




More information about the Users mailing list