<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://t2bwiki.iihe.ac.be/index.php?action=history&amp;feed=atom&amp;title=NagiosEventHandles</id>
	<title>NagiosEventHandles - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://t2bwiki.iihe.ac.be/index.php?action=history&amp;feed=atom&amp;title=NagiosEventHandles"/>
	<link rel="alternate" type="text/html" href="https://t2bwiki.iihe.ac.be/index.php?title=NagiosEventHandles&amp;action=history"/>
	<updated>2026-04-20T16:59:56Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://t2bwiki.iihe.ac.be/index.php?title=NagiosEventHandles&amp;diff=186&amp;oldid=prev</id>
		<title>Maintenance script: Created page with &quot; == Nagios Event Handlers implementation at IIHE ==  *Usefull link: http://nagios.sourceforge.net/docs/3_0/eventhandlers.html *Using nagios event handlers with nrpe **http...&quot;</title>
		<link rel="alternate" type="text/html" href="https://t2bwiki.iihe.ac.be/index.php?title=NagiosEventHandles&amp;diff=186&amp;oldid=prev"/>
		<updated>2015-08-26T12:28:50Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot; == Nagios Event Handlers implementation at IIHE ==  *Usefull link: http://nagios.sourceforge.net/docs/3_0/eventhandlers.html *Using nagios event handlers with nrpe **http...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
== Nagios Event Handlers implementation at IIHE ==&lt;br /&gt;
&lt;br /&gt;
*Usefull link: http://nagios.sourceforge.net/docs/3_0/eventhandlers.html&lt;br /&gt;
*Using nagios event handlers with nrpe&lt;br /&gt;
**http://blog.gnucom.cc/2009/event-handlers-in-nagios-using-nrpe/&lt;br /&gt;
&lt;br /&gt;
=== An example ===&lt;br /&gt;
&lt;br /&gt;
*The example described here is to restart the dcap service on maite in case is stops. This is somewhat a complex case since it will trigger the restart of dcap over ssh from a script on egon&lt;br /&gt;
&lt;br /&gt;
*Make sure event handlers are enabled&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
enable_event_handlers=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Add this line in the service config file eg. objects/services.cfg in the check_dccp nagios check&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
event_handler		        handler_restartdcap&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*And define the event handler command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define command{&lt;br /&gt;
	command_name	handler_restartdcap&lt;br /&gt;
	command_line	/usr/lib64/nagios/plugins/handler_restartdcap $SERVICESTATE$ $SERVICESTATETYPE$ &amp;#039;$SERVICEOUTPUT$&amp;#039;&lt;br /&gt;
	}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*This script on egon will be executed when the check_dccp on m0 goes into critical state&lt;br /&gt;
*Remark: the quotes around serviceoutput are there so that the whole output is sent to the script. When they are not there the output is truncated after the first space&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{TracNotice|{{PAGENAME}}}}&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>