<?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[event process filtering script - catch and break event parameter]]></title><description><![CDATA[<p dir="auto">Hi,<br />
I catch an event using EPP.<br />
I need to catch the event first parameter and regex it to catch relevant data from it.<br />
that create new event where my catched data should be a parameter - will use as event key.</p>
<p dir="auto">any idea how shold I implement it?<br />
I saw this example:<br />
$event-&gt;parameters[1] == %1</p>
<p dir="auto">in my case: the param is: bigipNotifyObjMsg = SNMP_TRAP: Virtual /Common/WEBCMSTEST_VIP-HTTPS has become unavailable<br />
I need to catch "/Common/WEBCMSTEST_VIP-HTTPS" and create new event from it.</p>
<p dir="auto">I assume event filter is the way.<br />
how can I test the results?<br />
whats the best way to do it?<br />
any examples?</p>
]]></description><link>https://forum.netxms.org/topic/6544/event-process-filtering-script-catch-and-break-event-parameter</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 12:28:40 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/6544.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 21 May 2020 08:22:41 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to event process filtering script - catch and break event parameter on Mon, 25 May 2020 07:01:03 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">for event generation you can use PostEvent function. You can put everything into your filter script, but this seems a bit illogical, or create a script action. I would create a rule that matches event and executes script action. Inside that script (either filter script or action script) you can use something like this:</p>
<pre><code>if ($event-&gt;parameters[1] ~= "^SNMP_TRAP: Virtual (.*) has become unavailable")
{
   PostEvent($node, "CUSTOM_EVENT", null, $1);
}
</code></pre>
<p dir="auto">This will generate new event named CUSTOM_EVENT with path extracted from original event passed as first parameter.</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/27937</link><guid isPermaLink="true">https://forum.netxms.org/post/27937</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Mon, 25 May 2020 07:01:03 GMT</pubDate></item></channel></rss>