On Mon, Jun 11, 2012 at 10:45 AM, Isaac Witmer
<isaac.wit...@vistashare.com> wrote:
> On Fri, Jun 8, 2012 at 7:08 PM, Matthew Brooks
> <matt...@sonomatechpartners.com> wrote:
>> On Fri, Jun 8, 2012 at 10:25 AM, Isaac Witmer <isaac.wit...@vistashare.com>
>> wrote:
>>>
>>> Has anyone done any work to try and connect Icinga/Nagios up to a
>>> dynamic calendar? We have 2-3 IT personnel on rotation, and would like
>>> to be flexible about which days we schedule on-call.
>>>
>>> Previously we've used a pager and just handed it back and forth, but
>>> the ideal setup would have a gui calender that was periodically
>>> checked.
>>>
>>> So far the google API might work, and it also looks like downloading
>>> an ical and converting it for remind would work.
>>>
>>> I'm curious what other people have done (if anything) and what their
>>> thoughts are.
>>>
>>
>> Are you just looking to display who are the person(s) scheduled to be
>> notified to make it easy to grok or are you talking about actually
>> manipulating the schedule via the calendar?
>
> Thanks for the clarification. I mean that I would like to manipulate
> the schedule via a calendar of some kind. The "Every other week"
> configuration in icinga is a bit too rigid for us.
>
> I guess some kind of text interface would work also, but I find the
> text interface for entering dates in icinga (downtime etc) to be
> rather... clunky.

This solution requires a bit of testing to see how it works, but I put
a python script together in the last few days that uses the icalendar
module: http://pypi.python.org/pypi/icalendar/
A cronjob regularly downloads the ics file from the private google
calendar address, which is then read in, and processed on each phone
call.

This seemed neater than the remind solution, which required
downloading and then converting the ical before remind could handle
the calendar.

It also seemed more robust than using the google API, which depends on
an internet connection.

There are two flaws with this system:
1) the icalendar module doesn't handle indefinitely repeatable events,
To solve this we fall back into some kind of simple rotation
calculated from the dates. ((days since first day)/7  % people in
roation) when nothing is configured in the calendar.

2) It might scale poorly. I'm worried about the google calendar
growing large, and the script having to process a rather large file
each time a emergency happens. I don't expect this to be a sudden
problem, though, and I should have time to monitor it before it gets
out of hand.

-Isaac

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
icinga-users mailing list
icinga-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/icinga-users

Reply via email to