Differentiating between events
-
Hey People,
I have a server i monitor and i would like to have this agent report on about 5 different services. However i noticed that the action that takes place (in my case sending an e-mail) is dependent on the type of Event (in my case SYS_SERVICE_DOWN). Is there a way that i can use that same event (SYS_SERVICE_DOWN) for each of my 5 services that i monitor and make it so they send out a different e-mail dependent on the service that they monitor?
I know i can have different events take place such as SYS_THRESHOLD_REACHED or something else for each service but then i will have to keep track of what i assign to each service.
Thanks,
-
Hi!
You can use filter scripts to do advanced filtering. Event SYS_SERVICE_DOWN contains 3 parameters:
1: service name;
2: service object id;
3: service type.
So, for example, if you wish to execute action only for service named "httpd", you can use the following script:$1 == "httpd"or, in full form
sub main() { return $1 == "httpd"; }Best regards,
Victor
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