Page 1 of 1

Service notification suggestions requested

Posted: Wed Jun 21, 2017 7:48 am
by mvndnburg
Hello,

We have a set of services for monitoring disk space usage (Linux, SNMP) on our application servers. A service per partition (not all hosts have all partitions). For example: a service for '/opt', one for '/var/log', etcetera.

We would like to send alert notifications to the user group that is the primary contact for a certain application server. That is, contactGroupA would get notifications if '/opt' on a host in hostGroupA fills up, and contactGroupB would receive notifications if '/opt' on a host in hostGroupB fills up.

In other words: the notifications for the generic service check on '/opt' should be filtered in such a way that they go only to the *service* contact persons who are also in the contact group for the relevant *host*.

Given that there's no hard connection between hosts and services, and that we do not want to duplicate services and make them specific to a subset of hosts only, is there a way to attain this?


Update: title.

Re: Service notification suggestions requested

Posted: Wed Jun 21, 2017 4:07 pm
by tgriep
Without creating duplicate service checks, you could achieve what you are looking for by using the Object Inheritance Nagios provides.

What you would do is to remove all of the contacts and contactgroups from the service checks.
Also, remove the contacts from the host definitions, leaving the correct contactgroup for that host.
What this does is through Object Inheritance, if the service check does not have a contact or contactgroup assigned to it,
it will use the contactgroup in the host definition to send notifications if the host definition also does not have a contact assigned to it.

For more details on Object Inheritance, take a look at this link under the Implied Inheritance section.
https://assets.nagios.com/downloads/nag ... tance.html

Re: Service notification suggestions requested

Posted: Fri Jun 23, 2017 3:41 am
by mvndnburg
Thanks for this solution, I think that will work for us.

Re: Service notification suggestions requested

Posted: Fri Jun 23, 2017 10:23 am
by tgriep
Your welcome. Let us know if you have any more questions on this topic or that we can close the post.

Re: Service notification suggestions requested

Posted: Fri Jun 23, 2017 10:58 am
by mvndnburg
Go ahead and close the thread, and have a nice weekend :)