<?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[CPU-Usage of more than one PC via Script]]></title><description><![CDATA[<p dir="auto">Hi!</p>
<p dir="auto"><em>*** This is my first post and therefore I want to say "Thank You!" to the developer of NetXMS for his great work ***<br />
I'm going to use the app. for my final-exam preparation in my apprenticeship at Siemens in Paderborn (Germany).</em></p>
<p dir="auto">One task of NetXMS will be to inform the admin about any (already added in NetXMS) PC of the net which has a<br />
CPU usage of more than 80%.<br />
I already know that I can add the usage in "data collection" --&gt; then add a rule in event processing policy editor with<br />
action "SYS_THRESHOLD_REACHED" that send an <strong>static</strong> text via email to the admin.</p>
<p dir="auto">Now do I have to do these steps for every host?</p>
<p dir="auto">I want to do that dynamically that in the mail the hostname will be shown like<br />
"CPU of <strong>PC23</strong> is above 80%..."</p>
<p dir="auto">I just want to have one event for that. Is that possible? How? Other possiblities?<br />
May be a script like message_text="CPU of %hostname% is about cpu.usage(host)" ...</p>
<p dir="auto">I've never written a script in NetXMS.</p>
<p dir="auto">Second question:</p>
<p dir="auto">I have the event SYS_THRESHOLD_REACHED let's say for this CPU monitoring...<br />
If I further want to watch the DiskUsage.. (if it's above 90%)<br />
Do I have to create another new event like this or use another one?<br />
So do I have to create such a event for every "thing" that is watched?<br />
Example:<br />
CPU -&gt; CPU_TOO_HIGH -&gt; action: email "CPU of PC123 too high.."<br />
Disk -&gt; DISK_FULL -&gt; action: "Disk of PC123 too full.."<br />
..</p>
<p dir="auto">greetings -<br />
Christian.</p>
]]></description><link>https://forum.netxms.org/topic/89/cpu-usage-of-more-than-one-pc-via-script</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 06:42:03 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/89.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 16 Aug 2007 22:47:55 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to CPU-Usage of more than one PC via Script on Fri, 17 Aug 2007 06:30:58 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/cme" aria-label="Profile: cme">@<bdi>cme</bdi></a> said in <a href="/post/390">CPU-Usage of more than one PC via Script</a>:</p>
<blockquote>
<p dir="auto">Second question:</p>
<p dir="auto">I have the event SYS_THRESHOLD_REACHED let's say for this CPU monitoring...<br />
If I further want to watch the DiskUsage.. (if it's above 90%)<br />
Do I have to create another new event like this or use another one?<br />
So do I have to create such a event for every "thing" that is watched?<br />
Example:<br />
CPU -&gt; CPU_TOO_HIGH -&gt; action: email "CPU of PC123 too high.."<br />
Disk -&gt; DISK_FULL -&gt; action: "Disk of PC123 too full.."<br />
..</p>
</blockquote>
<p dir="auto">Yes, it's the main idea - you create different events for different thresholds, so you can process them differently. After NetXMS installation you already have some example events for threshold violations - their names starts with <strong>DC_</strong> prefix.</p>
<p dir="auto">Also, you may create different events for different thresholds (for example HIGH_CPU_USAGE and LOW_DISK_SPACE), but handle them identically - for example, write one rule in event processing policy:</p>
<p dir="auto">add both HIGH_CPU_USAGE and LOW_DISK_SPACE to event field;<br />
in alarm generation field as alarm text use %m macro, which will expand to actual event's text.</p>
<p dir="auto">With this approach, you can have relatively simple event processing policy but use meaningful texts in alarms and messages.</p>
]]></description><link>https://forum.netxms.org/post/394</link><guid isPermaLink="true">https://forum.netxms.org/post/394</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Fri, 17 Aug 2007 06:30:58 GMT</pubDate></item><item><title><![CDATA[Reply to CPU-Usage of more than one PC via Script on Fri, 17 Aug 2007 06:26:20 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/cme" aria-label="Profile: cme">@<bdi>cme</bdi></a> said in <a href="/post/390">CPU-Usage of more than one PC via Script</a>:</p>
<blockquote>
<p dir="auto">One task of NetXMS will be to inform the admin about any (already added in NetXMS) PC of the net which has a<br />
CPU usage of more than 80%.<br />
I already know that I can add the usage in "data collection" --&gt; then add a rule in event processing policy editor with<br />
action "SYS_THRESHOLD_REACHED" that send an <strong>static</strong> text via email to the admin.</p>
<p dir="auto">Now do I have to do these steps for every host?</p>
<p dir="auto">I want to do that dynamically that in the mail the hostname will be shown like<br />
"CPU of <strong>PC23</strong> is above 80%..."</p>
</blockquote>
<p dir="auto">Hello!</p>
<p dir="auto">You can achieve this using templates:</p>
<ol>
<li>Create template object (in Templates subtree)</li>
<li>In data collection configuration for template object, create DCI for CPU utilization as usual</li>
<li>Apply template to nodes where you wish to check CPU utilization</li>
</ol>
<p dir="auto">In event processing policy, you can use macros in alarm texts. For example, if you wish to include node name and actual CPU utilization in alarm (or e-mail text, etc.), you may write your text like this:<br />
CPU utilization on node %n is %4%%</p>
<p dir="auto">%n will be replaced by node name, %4 by actual DCI value, and %% with single % character. You can find complete list of available macros in User's Manual (section 8.6) or here:<br />
<a href="https://www.netxms.org/documentation/macros.shtml" rel="nofollow ugc">https://www.netxms.org/documentation/macros.shtml</a></p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/393</link><guid isPermaLink="true">https://forum.netxms.org/post/393</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Fri, 17 Aug 2007 06:26:20 GMT</pubDate></item></channel></rss>