[Spam] acknowledge triggers a script

ranjib dey dey.ranjib at gmail.com
Tue May 10 22:31:45 CEST 2011


Im not sure you can invoke a script just by acknowledging it. As the
acknowledgement doesnt change the service state. But you can definitely
submit a passive check when the service went down , thus triggering a soft
to up or hard to up state change.  This will be a cleaner solution. You can
just use the notification route too but in that case you have to hack a bit
(like polling the email/im [whatever you use to notify] and then trigger an
even handler). We have implemented the second one, where a ruby script polls
the email inbox (via cron) and checks of notification and if it finds
certain notification type (like service downtime acknowledgement ) ,
triggers certain handlers.

regards
ranjib

On Wed, May 11, 2011 at 1:28 AM, Ryan Davis <ryan at acceleration.net> wrote:

>  You might be able to do this with an event handler:
> http://nagios.sourceforge.net/docs/3_0/eventhandlers.html
>
> But I'm not sure if the handler will be run when someone acknowledges.
>
> I can think of one round-about way to do it:
>
>    - make a wrapper program for your fix-it script that checks to see if
>    NOTIFICATIONTYPE is "ACKNOWLEDGEMENT", and if so, calls the fix-it script.
>    Any other notification type is ignored.
>     - make a nagios command to call your wrapper program
>     - make a nagios contact for your fix-it script, tell it to use the
>    above nagios command as the service notification command
>     - make a nagios service escalation to notify your fix-it contact all
>    the time
>
> When the service is acknowledged, nagios will notify your dummy fix-it
> contact, who will call your fix-it script.
>
> I *think* that would work.
>
> HTH,
>
> Ryan Davis
> Acceleration.net
> Director of Programming Services
> 2831 NW 41st street, suite B
> Gainesville, FL 32606
>
> Office: 352-335-6500 x 124
> Fax: 352-335-6506
>
>
> On 5/10/2011 3:20 PM, dave stern - e-mail.pluribus.unum wrote:
>
> We have an interesting need. When a particular service goes red on our
> Nagios 3.2.1 server, we'd like to be able to click on "Acknowledge this
> service problem" and have that activate a local script. Anyone have any
> idea how this can be accomplished?
>
> TIA
>
> ------------------------------------------------------------------------------
> Achieve unprecedented app performance and reliability
> What every C/C++ and Fortran developer should know.
> Learn how Intel has extended the reach of its next-generation tools
> to help boost performance applications - inlcuding clusters.
> http://p.sf.net/sfu/intel-dev2devmay
> _______________________________________________
> Nagios-users mailing listNagios-users at lists.sourceforge.nethttps://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
>
>
>
> ------------------------------------------------------------------------------
> Achieve unprecedented app performance and reliability
> What every C/C++ and Fortran developer should know.
> Learn how Intel has extended the reach of its next-generation tools
> to help boost performance applications - inlcuding clusters.
> http://p.sf.net/sfu/intel-dev2devmay
> _______________________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20110511/ffd74fba/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
-------------- next part --------------
_______________________________________________
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