How to access delay timer key in NXSL?
-
Hi All, I am trying to create a filtering script to check if a delay timer key has expired or not. Is there any NXSL Class serves such purpose?
Here is what I am trying to achieve :-
- Delay the email alert by 180 seconds if any node/interface is down [Done]
- When the node/interface is up and the delay timer is still within 180 seconds, no email alert. Otherwise, an email alert on the node/interface is UP.
Any help is greatly appreciated!
Pedro
-
You can configure Processing Policy like in attached image.
Note a difference between variables %i and %I. They are points to a same data - object ID but %i represent it in hex value and %I represent in decimal value. Used in script $node->id returns value in decimal, so the timer key must be generated with decimal value too.

-
-
In addition - a good practice is to use expandString function, e.g.
key = $event->expandString("TIMER_DC_THRESHOLD_%I_%<dciId>");in this case you just use the same string with macros as when specifying timer key, so there's no need to compose the key manually.
-
Also, in 3.5 there's now an ability to skip action, if a particular timer is running. So your condition should now fit into 2 EPP rules.

Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login