<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Script SNMP on event processing policy]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">I'm monitoring my backup servers with netxms by SNMP and I well receive the result of jobs on the event monitor but they are catched by SNMP_UNMATCHED_TRAP.<br />
But I don't know if that matters to do what I want to do;</p>
<p dir="auto">I would like to apply severity on the job results like:</p>
<ul>
<li>Success -&gt; Normal</li>
<li>Failed -&gt; critical</li>
</ul>
<p dir="auto"> </p>
<p dir="auto">'Failed' and 'success' are in 3rd position on parameters varbind (I think):</p>
<p dir="auto">.1.3.6.1.4.1.31023.1.1.1.0.1	.1.3.6.1.4.1.31023.1.1.101 == '1109f400-0d24-4895-abb8-d298211314b2'; .1.3.6.1.4.1.31023.1.1.102 == 'BAckup Zabbix Serveur'; .1.3.6.1.4.1.31023.1.1.103 == 'Failed'; .1.3.6.1.4.1.31023.1.1.104 == ''<br />
 <br />
What is the script that could catch the word 'Failed', 'Success' or else on Event Processing Policy?<br />
 <br />
Or what is the simplest way to do that?</p>
<p dir="auto">Thanks</p>
]]></description><link>https://forum.netxms.org/topic/3728/script-snmp-on-event-processing-policy</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 09:44:41 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/3728.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 24 Apr 2015 13:19:11 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Script SNMP on event processing policy on Tue, 28 Apr 2015 13:14:18 GMT]]></title><description><![CDATA[<p dir="auto">That script worked for me:</p>
<p dir="auto">sub main()<br />
{<br />
    if ( index($event-&gt;message, "Success"))return 1;<br />
         else return 0;<br />
 }</p>
]]></description><link>https://forum.netxms.org/post/16641</link><guid isPermaLink="true">https://forum.netxms.org/post/16641</guid><dc:creator><![CDATA[sergio]]></dc:creator><pubDate>Tue, 28 Apr 2015 13:14:18 GMT</pubDate></item><item><title><![CDATA[Reply to Script SNMP on event processing policy on Tue, 28 Apr 2015 07:36:12 GMT]]></title><description><![CDATA[<p dir="auto">On #Netxms ?</p>
]]></description><link>https://forum.netxms.org/post/16639</link><guid isPermaLink="true">https://forum.netxms.org/post/16639</guid><dc:creator><![CDATA[sergio]]></dc:creator><pubDate>Tue, 28 Apr 2015 07:36:12 GMT</pubDate></item><item><title><![CDATA[Reply to Script SNMP on event processing policy on Tue, 28 Apr 2015 07:21:32 GMT]]></title><description><![CDATA[<p dir="auto">Come and visit us in the support IRC channel, it will be much faster to get this resolved <img src="https://forum.netxms.org/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=72b86a538fc" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:1.4em;width:auto;vertical-align:middle" title=":)" alt="🙂" /></p>
]]></description><link>https://forum.netxms.org/post/16638</link><guid isPermaLink="true">https://forum.netxms.org/post/16638</guid><dc:creator><![CDATA[tomaskir]]></dc:creator><pubDate>Tue, 28 Apr 2015 07:21:32 GMT</pubDate></item><item><title><![CDATA[Reply to Script SNMP on event processing policy on Mon, 27 Apr 2015 11:07:32 GMT]]></title><description><![CDATA[<p dir="auto">Create your own event for your SNMP trap.<br />
In that event %2 and %3 will be accessible for the parameters you map from your Trap.</p>
<p dir="auto">Dont use the default SNMP_UNMATCHED_TRAP event.</p>
<p dir="auto">Then create your own EPP to catch that event.<br />
You can test and just see if you catch it properly without filtering for FAIL/SUCCESS.</p>
<p dir="auto">Then when you have that working, you can start playing with the scripting.</p>
<p dir="auto">Do it step-by-step, dont do everything at once, because you then dont know what isnt working.</p>
]]></description><link>https://forum.netxms.org/post/16627</link><guid isPermaLink="true">https://forum.netxms.org/post/16627</guid><dc:creator><![CDATA[tomaskir]]></dc:creator><pubDate>Mon, 27 Apr 2015 11:07:32 GMT</pubDate></item><item><title><![CDATA[Reply to Script SNMP on event processing policy on Mon, 27 Apr 2015 10:20:37 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/tomaskir" aria-label="Profile: tomaskir">@<bdi>tomaskir</bdi></a> said in <a href="/post/16620">Script SNMP on event processing policy</a>:</p>
<blockquote>
<p dir="auto">As I mentioned, create 2 Event Processing policies.</p>
<p dir="auto">1st will catch the event with 'Fail' in Event message; and create a critical alarm on the node and send the email.<br />
2nd will catch the event with 'Success' in Event message; terminate/resolve the previous alarm, and also send email.</p>
</blockquote>
<p dir="auto">Thank you for your help but i'm stuck right here.<br />
How can I catch the event with 'Fail' in the event? What is the script code?</p>
<p dir="auto">What I've done:<br />
sub main()<br />
{<br />
transport = CreateSNMPTransport(FindObject(".1.3.6.1.4.1.31023.1.1.1.0.1"));    // Create SNMP transport for node</p>
<p dir="auto"> value = SNMPGetValue(transport, ".1.3.6.1.4.1.31023.1.1.103");<br />
 <br />
 if(value == "Failed") return 1;<br />
 <br />
 else retun 0;<br />
 <br />
 }</p>
<p dir="auto">PS: I forgot to mention that I couldn't find the OID by the MIB Browser, that's why that OID is catch by the trap 'SNMP_UNMATCHED_TRAP' (is that important for that I want to do?)</p>
]]></description><link>https://forum.netxms.org/post/16625</link><guid isPermaLink="true">https://forum.netxms.org/post/16625</guid><dc:creator><![CDATA[sergio]]></dc:creator><pubDate>Mon, 27 Apr 2015 10:20:37 GMT</pubDate></item><item><title><![CDATA[Reply to Script SNMP on event processing policy on Fri, 24 Apr 2015 15:27:33 GMT]]></title><description><![CDATA[<p dir="auto">As I mentioned, create 2 Event Processing policies.</p>
<p dir="auto">1st will catch the event with 'Fail' in Event message; and create a critical alarm on the node and send the email.<br />
2nd will catch the event with 'Success' in Event message; terminate/resolve the previous alarm, and also send email.</p>
]]></description><link>https://forum.netxms.org/post/16620</link><guid isPermaLink="true">https://forum.netxms.org/post/16620</guid><dc:creator><![CDATA[tomaskir]]></dc:creator><pubDate>Fri, 24 Apr 2015 15:27:33 GMT</pubDate></item><item><title><![CDATA[Reply to Script SNMP on event processing policy on Fri, 24 Apr 2015 14:52:30 GMT]]></title><description><![CDATA[<p dir="auto">Thanks but I would like to filtering the snmp containing the string ' Failed ' be marked as ' critical' (in red) and ' succeess ' in green in the event monitor. Is that possible?</p>
<p dir="auto">Moreover in the the Event processing policy I wanted a script that catch the word 'Failed' and send an email.</p>
<p dir="auto">What I've done:</p>
<p dir="auto">sub main()<br />
{</p>
<p dir="auto">if(%3 == 'Failed') return 1;</p>
<p dir="auto">else return 0;</p>
<p dir="auto">}</p>
<p dir="auto">-&gt; I receive an email on the both cases (Fail or success)</p>
]]></description><link>https://forum.netxms.org/post/16617</link><guid isPermaLink="true">https://forum.netxms.org/post/16617</guid><dc:creator><![CDATA[sergio]]></dc:creator><pubDate>Fri, 24 Apr 2015 14:52:30 GMT</pubDate></item><item><title><![CDATA[Reply to Script SNMP on event processing policy on Fri, 24 Apr 2015 14:19:17 GMT]]></title><description><![CDATA[<p dir="auto">Here is how I would do it:</p>
<ol>
<li>
<p dir="auto">Create SNMP Trap with trap OID .1.3.6.1.4.1.31023.1.1.1.0.1<br />
    From the trap, pass parameter from the OID .1.3.6.1.4.1.31023.1.1.103</p>
</li>
<li>
<p dir="auto">Create event for the SNMP trap. In event, you will get that parameter as %2<br />
    You can use %2 to interpret job completion in the event message.</p>
</li>
<li>
<p dir="auto">Create 2x Event processing policy for this event (one for fail, one for success)<br />
    In filtering script filter for the fail or success from event message.</p>
</li>
</ol>
]]></description><link>https://forum.netxms.org/post/16616</link><guid isPermaLink="true">https://forum.netxms.org/post/16616</guid><dc:creator><![CDATA[tomaskir]]></dc:creator><pubDate>Fri, 24 Apr 2015 14:19:17 GMT</pubDate></item></channel></rss>