Quote from: cme on August 17, 2007, 01:47:55 AM
One task of NetXMS will be to inform the admin about any (already added in NetXMS) PC of the net which has a
CPU usage of more than 80%.
I already know that I can add the usage in "data collection" --> then add a rule in event processing policy editor with
action "SYS_THRESHOLD_REACHED" that send an static text via email to the admin.
Now do I have to do these steps for every host?
I want to do that dynamically that in the mail the hostname will be shown like
"CPU of PC23 is above 80%..."
Hello!
You can achieve this using templates:
1. Create template object (in Templates subtree)
2. In data collection configuration for template object, create DCI for CPU utilization as usual
3. Apply template to nodes where you wish to check CPU utilization
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:
CPU utilization on node %n is %4%%
%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:
https://www.netxms.org/documentation/macros.shtml
Best regards,
Victor
Должен был быть параметр --with-oracle, но я забыл его добавить. Исправлю в 0.2.19.
У каждого threshold'a есть два события - одно генерируется когда threshold активируется (условие выполняется), второе - когда деактивируется (условие больше не выполняется). Соответственно в качестве реакции на первый event делаем аларм с неким ключом, а на второй - terminate alarm по тому-же ключу. Я обычно поступаю следующим образом: в качестве activate event'ов на разные threshold'ы использую разные event'ы но когда делаю из них алармы то использую одинаковый шаблон для ключа: DC_%i_%5; как deactivation event использую всегда только стандартный SYS_THRESHOLD_REARMED, и в качестве реакции делаю terminate alarm по ключу DC_%i_%3. Таким образом, при нарушении порогового значения аларм создается, а при возврате к нормальному уровню - удаляется.