Specific Interfaces send email to another additional address
-
-
I haven't actually tried this with interfaces (done something similar, but not quite the same with nodes), but the following should work:
- add the email address you want as a custom attribute to the interface
- Create a new action using macro %M (the "CUSTOM_MESSAGE" or a filter script, you will set this later) as your email recipient in your action
- Create another event processing policy for the event you want to alert on, above the original. Configure it to use the action above.
- reference the custom attribute you create earlier in the event processing policies filter script and return its value as CUSTOM_MESSAGE. If the custom attribute does not exist, return false in the filter script. Event processing will continue on "normal" interfaces and hit the next rule, alerting as normal, while interfaces with the custom attribute will trigger this policy and use the custom email address for alerting
-
I've done it little different,
What I was trying to do, is from a new event policy I selected the specific interfaces I wanted as source objects, but it was not working for some reason, It excecuted the general policy I had. What I mean, I had that specific policy if it match to send an email to one account. The general policy for interface down has another email account as action.
When the interface changed state it only send email to the general policy.
What I then did is in the event policy I removed the source object and add a filtering script.
What I've written down is:IF ((($node ==Node-Name) && ($object == Interface-Name)) || (($node == Node-Name) && ($object == Interface-Name)))well this works fine as I want, it sends email on both email addresses as I want but netxms gives me a Minor Alarm.
Event: SYS_SCRIPT_ERROR message :Script(EPP::6) execution error: Error 11 in line 1:Function not foundDo you have any idea why this is an error as function not found, despite the fact the the policy works fine.
Also why the policy does not work when I select the source objects from the Source object fieldThank you in advance
1st Problem Found:
the function should be in lowercases: ifif ((($node ==Node-Name) && ($object == Interface-Name)) || (($node == Node-Name) && ($object == Interface-Name)))Well I speaked too soon, the problem is now that for whatever interface that gets down the second emails gets all alerts, so it does not work as expected
Found the solution:
if (($1 == Interface-ID)||($1 == Interface-ID)||($1 == Interface-ID)) return true; return false;So now it works as it should.
When on those interfaces it sends on both emails, on every other interface it sends only on the general email
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