<?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[Host polling - exclusion window]]></title><description><![CDATA[<p dir="auto">Greetings,</p>
<p dir="auto">Is there a way to exclude a window of time during which hosts on specific subnets will not be polled?  For instance, I would like to not poll hosts between 6pm-7pm PST, because this is a time when many host machines are automatically restarted.</p>
<p dir="auto">-Kevin</p>
]]></description><link>https://forum.netxms.org/topic/1770/host-polling-exclusion-window</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 16:05:45 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/1770.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 13 Jun 2012 01:11:41 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Host polling - exclusion window on Wed, 24 Oct 2012 21:16:35 GMT]]></title><description><![CDATA[<p dir="auto">Ah, of course.  I did not take into account the 59 minutes, and 59 seconds!  I will also look at the Saturday and Sunday code example you provided.</p>
<p dir="auto">Thank you!</p>
<p dir="auto">-Kevin</p>
]]></description><link>https://forum.netxms.org/post/8788</link><guid isPermaLink="true">https://forum.netxms.org/post/8788</guid><dc:creator><![CDATA[millerpaint]]></dc:creator><pubDate>Wed, 24 Oct 2012 21:16:35 GMT</pubDate></item><item><title><![CDATA[Reply to Host polling - exclusion window on Wed, 24 Oct 2012 20:04:15 GMT]]></title><description><![CDATA[<p dir="auto">Hi!</p>
<p dir="auto">Actually, this script will filter out time from 19:00 to 22:00, not from 18:00 - because even for 18:59 condition now-&gt;hour &lt;= 18 will be true. You either should lost 1 minute, and use now-&gt;hour &lt;= 17, or use condition like</p>
<p dir="auto">(now-&gt;hour &lt; 18 || now-&gt;hour &gt;= 22 || (now-&gt;hour == 18 &amp;&amp; now-&gt;min == 0))</p>
<p dir="auto">If you need to add Saturday and Sunday, you can use script like this:</p>
<pre><code>now = localtime();
if (now-&gt;wday == 0)
   return /* sunday-specific check */
if (now-&gt;wday == 6)
   return /* saturday-specific check */
return (now-&gt;hour &lt; 18 || now-&gt;hour &gt;= 22 || (now-&gt;hour == 18 &amp;&amp; now-&gt;min == 0));
</code></pre>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/8787</link><guid isPermaLink="true">https://forum.netxms.org/post/8787</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Wed, 24 Oct 2012 20:04:15 GMT</pubDate></item><item><title><![CDATA[Reply to Host polling - exclusion window on Tue, 23 Oct 2012 16:03:38 GMT]]></title><description><![CDATA[<p dir="auto">Hi Victor,</p>
<p dir="auto">My goal is to not get any node down alerts between 6pm and 10pm.  I have this filtering script in my event policy - this is my first script, so please bear with me <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>
<p dir="auto">sub main()<br />
{<br />
   now = localtime();<br />
   return (now-&gt;hour &lt;= 18 || now-&gt;hour &gt;= 22);<br />
}</p>
<p dir="auto">It is not working (I receive alerts during the time window).  Also, after I get this working, I will need to specify another time window for the weekends (Saturday and Sunday).</p>
<p dir="auto">Any advice is appreciated!</p>
<p dir="auto">-Kevin</p>
]]></description><link>https://forum.netxms.org/post/8776</link><guid isPermaLink="true">https://forum.netxms.org/post/8776</guid><dc:creator><![CDATA[millerpaint]]></dc:creator><pubDate>Tue, 23 Oct 2012 16:03:38 GMT</pubDate></item><item><title><![CDATA[Reply to Host polling - exclusion window on Fri, 15 Jun 2012 09:27:54 GMT]]></title><description><![CDATA[<p dir="auto">Hi!</p>
<p dir="auto">You cannot exclude hosts from the poll. However, you can ignore down events in specific time interval by using appropriate filter script in event processing policy.</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/7660</link><guid isPermaLink="true">https://forum.netxms.org/post/7660</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Fri, 15 Jun 2012 09:27:54 GMT</pubDate></item></channel></rss>