<?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[Alerts based on custom attribute, is this right? And how to set repeat interval?]]></title><description><![CDATA[<p dir="auto">I want to create some additional alerting based on custom attributes<br />
i.e. an example right now is I have a container, i've assigned a custom attribute to it "UpDownCheck" and set the value to true, and inheritable. So all nodes inside this container have that custom attribute<br />
I want any nodes with that custom attribute to send a SLACK alert. So what i've done so far is this</p>
<p dir="auto">Event Processing Policy -&gt; New Event</p>
<p dir="auto">Condition-&gt;Events = SYS_NODE_DOWN<br />
Filtering Script = return GetCustomAttribute($node, "UpDownCheck");<br />
Server Actions = SLACK Notification</p>
<p dir="auto">I 'think' this is correct, any node that is 'down' and has that custom attribute should result in 'true' and the slack notification posted right?<br />
But what I need is for this to re-trigger every 2 hours, so if the node is still down it again sends a new SLACK alert</p>
<p dir="auto">As far as I can tell, in order to have it repeat the event I would have to create a DCI, then set a threshold, and in the threshold I can set the 'repeat event' timer to 7200 seconds<br />
But theres a problem, I can't see any way in a DCI to actually check for 'node down'? I can use DCI Internal-&gt;Status but theres no status code for 'down'<br />
0 = Normal<br />
1 = Warning<br />
2 = Minor<br />
3 = Major<br />
4 = Critical<br />
5 = Unknown<br />
6 = Unmanaged<br />
7 = Disabled<br />
8 = Testing<br />
Node down is 'critical/4' but other events can also make it code 4 but the node is still up, so i'll get a false alert. I can't use that. I can't see anything to poll for nodes 'up/down' status</p>
<p dir="auto">So whats the best method to go about this?</p>
]]></description><link>https://forum.netxms.org/topic/6394/alerts-based-on-custom-attribute-is-this-right-and-how-to-set-repeat-interval</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 20:44:06 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/6394.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 13 Feb 2020 04:17:55 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Alerts based on custom attribute, is this right? And how to set repeat interval? on Fri, 20 Mar 2020 06:07:07 GMT]]></title><description><![CDATA[<p dir="auto">Bump</p>
<p dir="auto">Any update to this? Specifically for 'node down' as I still can't find a way to do that outside of the built in 'node-down' event</p>
<p dir="auto">I've managed to get alerts based on custom attributes working for other things such as SNR or Ethernet speed<br />
I.e. in the case of ethernet speed, I want alerts on any core/distribution equipment in our network running at 100mbit as 99% of the time that will indicate a wire has gone bad. However that other 1% are ones I don't care about, edge networks with no more than i.e. 20mbit/s of bandwidth. Or something we inherited from a company acquisition. So it doesn't matter, and I want to suppress the alerts</p>
<p dir="auto">So I just create my DCI's as I would. I set up thresholds like so...</p>
<p dir="auto">DCI - Ethernet Speed (reported in megabits/sec)<br />
Thresholds</p>
<ol>
<li>script<br />
 if ($1 &lt; GetCustomAttribute($node, "Target_EthSpeed")) return true<br />
 activation event: slack alert (with relevant details)<br />
 repeat every 86400 seconds</li>
<li>script<br />
 if ($1 &gt;= GetCustomAttribute($node, "Target_EthSpeed")) return true;<br />
 activation event: sys_threshold_rearmed<br />
 repeat every 86400 seconds</li>
<li>last polled value<br />
 &lt;1000<br />
 activation event: send slack alert (with relevant details)<br />
 repeat every 86400 seconds</li>
</ol>
<p dir="auto">If the custom attribute of 'Target_EthSpeed' exists, the first 2 are checked, and one of them will always trigger. The second one means it will never check the third one. So I can add Target_EthSpeed of 100 to a node<br />
If the custom attribute doesn't exist, it ignores those first 2 conditions entirely and will use the third, in which case if its less than 1000mbit/s it will still trigger an alert</p>
<p dir="auto">If there is a cleaner and more appropriate method i'm all ears. Either way I still need 'node down' alerts setup. As far as I can tell there is no DCI for 'node down' only 'node status' which isn't appropriate as the status code is shared with other events</p>
]]></description><link>https://forum.netxms.org/post/27606</link><guid isPermaLink="true">https://forum.netxms.org/post/27606</guid><dc:creator><![CDATA[Millenium7]]></dc:creator><pubDate>Fri, 20 Mar 2020 06:07:07 GMT</pubDate></item></channel></rss>