<?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[Handle varbinds/parameters OID]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">I don't understand how to handle parameters on EPP script, I explain:</p>
<p dir="auto">I've created a trap,</p>
<pre><code> OID: .1.3.6.1.4.1.9789.0.1500
with different parameters like $2 :.1.3.6.1.4.1.9789.1500.1.5 and so on
</code></pre>
<p dir="auto">An event is associated to that trap.</p>
<p dir="auto">Then, I only wanted to compare on EPP the parameter received by the trap like:</p>
<pre><code>if ($2 == ".1.3.6.1.4.1.9789.1500.1.5'") return 1;
</code></pre>
<p dir="auto">How should I do that?</p>
<p dir="auto">Sorry if the subject was already posted.</p>
<p dir="auto">Regards.</p>
]]></description><link>https://forum.netxms.org/topic/3781/handle-varbinds-parameters-oid</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 10:38:26 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/3781.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 20 May 2015 09:51:01 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Handle varbinds/parameters OID on Mon, 25 May 2015 11:53:52 GMT]]></title><description><![CDATA[<p dir="auto">Ok Thanks a lot.</p>
<p dir="auto">Regards</p>
]]></description><link>https://forum.netxms.org/post/16928</link><guid isPermaLink="true">https://forum.netxms.org/post/16928</guid><dc:creator><![CDATA[sergio]]></dc:creator><pubDate>Mon, 25 May 2015 11:53:52 GMT</pubDate></item><item><title><![CDATA[Reply to Handle varbinds/parameters OID on Thu, 21 May 2015 19:42:02 GMT]]></title><description><![CDATA[<p dir="auto">Now I understand. The problem is that when mapping of trap to event happens, only values are copied, not OIDs (value of $event-&gt;parameters[3] will be "[GRE-FW01][INFO][005]" in your example). But, if you have two parameter mappings on different OIDs, and only one of them can be present in actual trap, that means that other parameter will be empty. So, if you have mapped .1.3.6.1.4.1.9789.1500.1.5 to parameter #2 and .1.3.6.1.4.1.9789.1500.2.5 to parameter #3, you can simply check if parameter 2 is empty - if it is, you have .1.3.6.1.4.1.9789.1500.2.5, otherwise .1.3.6.1.4.1.9789.1500.1.5.</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/16915</link><guid isPermaLink="true">https://forum.netxms.org/post/16915</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Thu, 21 May 2015 19:42:02 GMT</pubDate></item><item><title><![CDATA[Reply to Handle varbinds/parameters OID on Thu, 21 May 2015 10:06:51 GMT]]></title><description><![CDATA[<p dir="auto">Thank you Victor but it doesn't work <img src="https://forum.netxms.org/assets/plugins/nodebb-plugin-emoji/emoji/android/1f61e.png?v=72b86a538fc" class="not-responsive emoji emoji-android emoji--disappointed" style="height:1.4em;width:auto;vertical-align:middle" title=":(" alt="😞" /></p>
<p dir="auto">I simplified my problem because there is something that I don't understand:</p>
<p dir="auto">1)My trap<br />
2)My event<br />
3) trap received: FW01	.1.3.6.1.4.1.9789.1500	.1.3.6.1.4.1.9789.1500.2.5 == '[GRE-FW01][INFO][005]'<br />
(That means login error)</p>
<p dir="auto">Then on my epp I only wanted to compare the oid of the parameter/varbind received: .1.3.6.1.4.1.9789.1500.2.5 or .1.3.6.1.4.1.9789.1500.1.5</p>
<p dir="auto">My script:</p>
<pre><code>if ( index($event-&gt;parameter[3], ".1.3.6.1.4.1.9789.1500.2.5") return 1;
 		else return 0;
</code></pre>
<p dir="auto">doesn't work</p>
<hr />
<p dir="auto"><img src="/assets/uploads/files/smf/0000000002295-trap.jpg" alt="trap.jpg" class="img-markdown  img-fluid" width="433" height="395" /></p>
<p dir="auto"><img src="/assets/uploads/files/smf/0000000002297-event.jpg" alt="event.jpg" class="img-markdown  img-fluid" width="478" height="402" /></p>
]]></description><link>https://forum.netxms.org/post/16907</link><guid isPermaLink="true">https://forum.netxms.org/post/16907</guid><dc:creator><![CDATA[sergio]]></dc:creator><pubDate>Thu, 21 May 2015 10:06:51 GMT</pubDate></item><item><title><![CDATA[Reply to Handle varbinds/parameters OID on Wed, 20 May 2015 11:13:20 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">basically you write it correctly (with one type):</p>
<p dir="auto">if ($2 == ".1.3.6.1.4.1.9789.1500.1.5") return 1;</p>
<p dir="auto">or simply</p>
<p dir="auto">return $2 == ".1.3.6.1.4.1.9789.1500.1.5";</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/16899</link><guid isPermaLink="true">https://forum.netxms.org/post/16899</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Wed, 20 May 2015 11:13:20 GMT</pubDate></item></channel></rss>