News:

We really need your input in this questionnaire

Main Menu

skip modem from monitoring

Started by iwi, March 02, 2010, 04:32:16 PM

Previous topic - Next topic

iwi

Hi,

I am using NetXMS for 2 weeks now and my compliments. Works better and faster than expected with low workload. Good job. 1 thing I miss is a good manual. I made some event policies which works, but 1 thing is driving me crazy.
What I want to achieve is the following:
On a couple of servers I have a tool which creates a virtual modem, so I can use 1 modem over multiple servers.
With scripting I can turn the modem on and off and connect to remote modems...
When I do this I get e-mail that interface blablabla is up..when connection is finished I get mail from the server that the modem is down.
I don't want these e-mails if modem is up or down...
What I tried was. in the event processing policy editor -> rule 1 -> source (subnet modem and server where virtual modem is installed)
event -> any, serverty -> any, script -> EVENT_TEXT = Interface "{5757FA85-B187-42A4-981C-7443B4ECFC90}" alarm none, email none.
I thought when I make above rule as rule 1 that I wouldnt get emails, but I still get e-mail when modem gets turned on...
Any advice or better (the solution) how to keep the virtual modem out of polling?
modem interface "{5757FA85-B187-42A4-981C-7443B4ECFC90}" IP 192.168.1.2/24 <- always the same...

Hope to hear from you soon... ??? ???

Victor Kirhenshtein

If you need to compare two values in NXSL, you should use == operator. Operator = is an assignment. So, if your script really uses = instead of ==, it's one mistake. Also, don't forget that any event passes all rules, except if matching rule contains "stop processing" option. You have to add it to your rule. Also, interface name always passed as parameter number 2 with SYS_IF_DOWN and SYS_IF_UP events, so you can compare just it's value to {5757FA85-B187-42A4-981C-7443B4ECFC90} instead of comparing full message text. So, I suggest the following rule:

event:
SYS_IF_DOWN
SYS_IF_UP

source:
any

severity:
any

script:
$2 == "{5757FA85-B187-42A4-981C-7443B4ECFC90}"

alarm:
none

actions:
none

options:
stop processing


Should work :)

Best regards,
Victor

iwi

Victor,

QuoteIf you need to compare two values in NXSL, you should use == operator. Operator = is an assignment
Doh, I feel stupid...this is like all script languages...
Quoteany event passes all rules, except if matching rule contains "stop processing" option
Didn't know this, but I should...like firewall rules...
Quoteinterface name always passed as parameter number 2
I thought I read the manual, but I only see %1-%99 events parameter numbers 1..99, but how can I determin what which number does? Is this the ID from Event Editor?

I have changed the rule to what u suggested...I will post tomorrow the results...

Thank you and keep up the superb work.

Victor Kirhenshtein

Quote from: iwi on March 03, 2010, 11:43:02 AM
I thought I read the manual, but I only see %1-%99 events parameter numbers 1..99, but how can I determin what which number does? Is this the ID from Event Editor?

Numbered parameters are event-dependent, you can open Control Panel -> Events, open event of interest, and look at the description - for all predefined events there are list of parameters.

Best regards,
Victor

iwi

 ;D
Your advise worked like a charm...
I only narrowed it down to the virtual servers where I have virtual modems (just in case..)

I see now what you mean with the event...This will be no issue anymore, thx...

And now two thumbs up for everyone who reads this forum:
Monitoring 40 locations in the south of the Netherlands throu snmp, netxmsagent and internal, with absolutly no problems running on Hyper-V Windows 2008.
Best and easiest monitoring system I ever used...very scalable...Keep up the good work!
great, fast and perfect reply on questions in the forum, support pokes out the eyes from commercial apps...

Thx