Additional notifications for service template

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
jkinning
Posts: 747
Joined: Wed Oct 09, 2013 2:54 pm

Additional notifications for service template

Post by jkinning »

I think I am overthinking this but not sure how to accomplish what I need to do. I have a Windows Prod Hostgroup and a Windows NonProd Hostgroup. I have several service checks for common server items like CPU, RAM, Disk, etc. I have these service checks tied to a service template. The service template is then tied to the hostgroup. My NonProd stuff is checked less often and the notifications are only sent once per day. I have a Business Unit that would like to be notified for services on servers they support. They want to start with just the disk checks. I created a new hostgroup for them, CAD Hostgroup and placed all the CAD servers in this hostgroup. I kept them in the NonProd and Prod so the scheduled maintenance would be easier. We can disable notifications per Hostgroup and know we got all the right machines. When I look at the Hostgroup Overview for the CAD hostgroup I see all the servers and they have the same 7 service checks. So, here is my question. How can I include a contact group to the disk service check for these CAD servers? Will I have to create a new service check for the drives and setup the notifications for just this contact group and assign these checks to all the CAD servers? Is there a way I can add the CAD contact group to the existing service check and they get notified for just the CAD server disk space issues? Otherwise, they would get all server disk space notifications if I added them to the existing service check right?

I guess I am trying to figure out the best method to include additional contact groups to a service check that is tied to a service template and host group? I hope this all makes sense.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Additional notifications for service template

Post by tmcdonald »

I've tried drawing this out a few times to get a better understanding, but it's kinda complicated to follow. If I understand correctly, you want a single service, on a single hostgroup, to have different contacts that the rest of the services on that hostgroup?
Former Nagios employee
jkinning
Posts: 747
Joined: Wed Oct 09, 2013 2:54 pm

Re: Additional notifications for service template

Post by jkinning »

You must be an artist. :D You made it sound so much simpler than I did but yes that is what I am trying to do.

I already have a service that is check disk space and it is tied to a service template for a hostgroup. I created a new hostgroup and added hosts to it which are still being monitored by using the service template. I am wondering if I could just add this additional contact group to the disk service check or since I only want it to apply to the hosts in this new hostgroup will a new service disk check be required? If doing this will there be any negative side effects of having the disk checks hit a host twice? I would make it a different time like hourly or something. Today the service template for the services check every 7 minutes.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Additional notifications for service template

Post by ssax »

If you define the contact groups on the host and don't set them in the template or on the service they would be inherited from the individual hosts that way you could just add or remove at the host level, will that work for you?
jkinning
Posts: 747
Joined: Wed Oct 09, 2013 2:54 pm

Re: Additional notifications for service template

Post by jkinning »

Would they then get and see all the service notifications for these hosts? So just add the contact group to each host using the +?
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Additional notifications for service template

Post by lmiltchev »

I believe ssax was suggesting that you use "Implied Inheritance", where the values of some service variables ("contact_groups" in your case) will be copied from the host.

What you are talking about is an "Additive Inheritance", which is different. Instead of having "local" variables overriding the ones defined in a template, you would use both values (by using the "+" sign).

You can probably use either method, depending on your specific environment. Read more about the additive and implied inheritance here:
https://assets.nagios.com/downloads/nag ... tance.html
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked