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.<br>
<br>regards<br>ranjib<br><br><div class="gmail_quote">On Wed, May 11, 2011 at 1:28 AM, Ryan Davis <span dir="ltr"><<a href="mailto:ryan@acceleration.net">ryan@acceleration.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div text="#000000" bgcolor="#ffffff">
You might be able to do this with an event handler: <a href="http://nagios.sourceforge.net/docs/3_0/eventhandlers.html" target="_blank">http://nagios.sourceforge.net/docs/3_0/eventhandlers.html</a><br>
<br>
But I'm not sure if the handler will be run when someone
acknowledges. <br>
<br>
I can think of one round-about way to do it:<br>
<ul>
<li>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.<br>
</li>
<li>make a nagios command to call your wrapper program<br>
</li>
<li>make a nagios contact for your fix-it script, tell it to use
the above nagios command as the service notification command<br>
</li>
<li>make a nagios service escalation to notify your fix-it contact
all the time</li>
</ul>
When the service is acknowledged, nagios will notify your dummy
fix-it contact, who will call your fix-it script.<br>
<br>
I *think* that would work.<br>
<br>
HTH,<br>
<pre cols="72">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</pre><div class="im">
<br>
On 5/10/2011 3:20 PM, dave stern - e-mail.pluribus.unum wrote:
</div><blockquote type="cite">
<pre>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.
<div class="im"><a href="http://p.sf.net/sfu/intel-dev2devmay" target="_blank">http://p.sf.net/sfu/intel-dev2devmay</a>
_______________________________________________
Nagios-users mailing list
<a href="mailto:Nagios-users@lists.sourceforge.net" target="_blank">Nagios-users@lists.sourceforge.net</a>
<a href="https://lists.sourceforge.net/lists/listinfo/nagios-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-users</a>
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
</div></pre>
</blockquote>
</div>
<br>------------------------------------------------------------------------------<br>
Achieve unprecedented app performance and reliability<br>
What every C/C++ and Fortran developer should know.<br>
Learn how Intel has extended the reach of its next-generation tools<br>
to help boost performance applications - inlcuding clusters.<br>
<a href="http://p.sf.net/sfu/intel-dev2devmay" target="_blank">http://p.sf.net/sfu/intel-dev2devmay</a><br>_______________________________________________<br>
Nagios-users mailing list<br>
<a href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/nagios-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-users</a><br>
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.<br>
::: Messages without supporting info will risk being sent to /dev/null<br></blockquote></div><br>