Hi,
I have 1 service called MySQL Service. On that service I had 2 templates applied; 1) Custom - Linux VM - DB Admins 2) Custom - Linux VM - Sys Admins.
One template sends emails to our DB admins and the other to our sys admins. I find the only template that is being applied is the DB admins.
How does multiple templates on a service work?
Multiple Service Templates On One Service
-
brandon.pal
- Posts: 129
- Joined: Wed Feb 19, 2014 10:18 pm
Multiple Service Templates On One Service
You do not have the required permissions to view the files attached to this post.
Re: Multiple Service Templates On One Service
There's a fairly easily-understood set of rules for which templates take precedence in cases like this. The doc is for Core, but since XI runs on Core it still applies:
http://nagios.sourceforge.net/docs/3_0/ ... tance.html
Essentially, templates higher in the list take priority over those lower in the list. Try switching them and you'll see what I mean. The "+", "standard" and "null" options affect how these rules can be overwritten and are explained in the doc as well. It's not too long, and is definitely worth the read if you are going to be using multiple templates.
http://nagios.sourceforge.net/docs/3_0/ ... tance.html
Essentially, templates higher in the list take priority over those lower in the list. Try switching them and you'll see what I mean. The "+", "standard" and "null" options affect how these rules can be overwritten and are explained in the doc as well. It's not too long, and is definitely worth the read if you are going to be using multiple templates.
Former Nagios employee
-
brandon.pal
- Posts: 129
- Joined: Wed Feb 19, 2014 10:18 pm
Re: Multiple Service Templates On One Service
After reading through this I'm confused.
I'd like to apply 2 templates to 1 service.
1 template lays out check intervals, and alert types and has 1 contact group. The second template just has another contact group. In the other template I've told it to use the main template but nothing.
Either group 1 can get the emails or group 2 for some reason I cant get both.
I'd like to apply 2 templates to 1 service.
1 template lays out check intervals, and alert types and has 1 contact group. The second template just has another contact group. In the other template I've told it to use the main template but nothing.
Either group 1 can get the emails or group 2 for some reason I cant get both.
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Multiple Service Templates On One Service
We'll get you to post some config files so we can see what is exactly defined.
In CCM
Once you've done that we can let you know exactly what is happening.
In CCM
- Templates > Service Templates
For any one of the templates click the icon that looks like a floppy disk
Save this text file and upload it to this forum thread
Monitoring > Services
For the service "MySQL Service" click the icon that looks like a floppy disk
Save this text file and upload it to this forum thread
Once you've done that we can let you know exactly what is happening.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
brandon.pal
- Posts: 129
- Joined: Wed Feb 19, 2014 10:18 pm
Re: Multiple Service Templates On One Service
Attached. Thank you.
You do not have the required permissions to view the files attached to this post.
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Multiple Service Templates On One Service
We need to use the + option in the contact groups all the way through the chain.
Also, I don't think you need the service template "Custom - Linux VM - DB Admins" using the other service template "Custom - Linux VM - Sys Admins" as a template.
So do the following:
Also, I don't think you need the service template "Custom - Linux VM - DB Admins" using the other service template "Custom - Linux VM - Sys Admins" as a template.
So do the following:
- CCM
Templates > Service Templates
Edit Custom - Linux VM - DB Admins
Click Manage Templates
Click Remove All so the Assigned Column is empty
Click Close
Click the Alert Settings tab
Click Manage Contactgroups
Under Contactgroup Options select +
Click Close
Click Save
Edit Custom - Linux VM - DB Admins
Click the Alert Settings tab
Click Manage Contactgroups
Under Contactgroup Options select +
Click Close
Click Save
Monitoring > Services
Edit the MySQL Service
Click the Alert Settings tab
Click Manage Contactgroups
Under Contactgroup Options select +
Click Close
Click Save
Click Apply Configuration
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
brandon.pal
- Posts: 129
- Joined: Wed Feb 19, 2014 10:18 pm
Re: Multiple Service Templates On One Service
And it works. Thank you 