<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Eventhandler on ConSol Monitoring</title><link>https://omd.consol.de/tags/eventhandler/</link><description>Recent content in Eventhandler on ConSol Monitoring</description><generator>Hugo</generator><language>en</language><atom:link href="https://omd.consol.de/tags/eventhandler/index.xml" rel="self" type="application/rss+xml"/><item><title>eventhandler</title><link>https://omd.consol.de/docs/plugins/eventhandler/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://omd.consol.de/docs/plugins/eventhandler/</guid><description>&lt;p&gt;The Event Handler Framework provides a streamlined approach for writing event handler scripts in Nagios monitoring environments. With this framework, users can easily define conditions for handling events and specify actions to be taken based on those conditions, leveraging two core components: the Decider and the Runner. These components work together seamlessly to evaluate conditions, prepare parameters, and execute appropriate actions in response to events.&lt;/p&gt;&#10;&lt;pre tabindex="0"&gt;&lt;code&gt;define command{&#10; command_name handle_omd_restart&#10; command_line $USER1$/eventhandler \&#10; --runner ssh \&#10; --runnertag omd_restart \&#10; --runneropt hostname=&amp;#39;$HOSTADDRESS$&amp;#39; \&#10;...&#10; --decider omd_site_self_heal \&#10; --eventopt site_name=&amp;#39;$HOSTNAME$&amp;#39; \&#10; --eventopt HOSTNAME=&amp;#39;$HOSTNAME$&amp;#39; \&#10; --eventopt HOSTSTATE=&amp;#39;$HOSTSTATE$&amp;#39; \&#10; --eventopt HOSTADDRESS=&amp;#39;$HOSTADDRESS$&amp;#39; \&#10; --eventopt SERVICEDESC=&amp;#39;$SERVICEDESC$&amp;#39; \&#10; --eventopt SERVICESTATE=&amp;#39;$SERVICESTATE$&amp;#39; \&#10; --eventopt SERVICEOUTPUT=&amp;#39;$SERVICEOUTPUT$&amp;#39; \&#10; --eventopt LONGSERVICEOUTPUT=&amp;#39;$LONGSERVICEOUTPUT$&amp;#39; \&#10; &amp;gt;&amp;gt; $USER4$/var/log/eventhandler_errors.log 2&amp;gt;&amp;amp;1&#10;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id="decider"&gt;Decider&lt;/h3&gt;&#10;&lt;p&gt;The Decider component evaluates whether an event should be handled based on the specified conditions. It considers factors such as current state, state type, attempt count, downtime, etc., and returns a set of parameters indicating the action to be taken.&#10;The binary &lt;strong&gt;lib/monitoring-plugins/eventhandler&lt;/strong&gt; takes multiple &lt;em&gt;--eventopt KEY=VALUE&lt;/em&gt; arguments, which are usually Naemon macros. These key-value pairs are found in the dict &lt;em&gt;event.eventopts&lt;/em&gt;.&lt;/p&gt;</description></item></channel></rss>