Page 1 of 1

Multiple Service Templates On One Service

Posted: Mon Jul 28, 2014 8:25 am
by brandon.pal
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?

Re: Multiple Service Templates On One Service

Posted: Mon Jul 28, 2014 9:55 am
by tmcdonald
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.

Re: Multiple Service Templates On One Service

Posted: Fri Aug 08, 2014 2:26 pm
by brandon.pal
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.

Re: Multiple Service Templates On One Service

Posted: Fri Aug 08, 2014 6:50 pm
by Box293
We'll get you to post some config files so we can see what is exactly defined.

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
NOTE: These files MAY contain sensitive information like passwords, so cast your eyes over them first before uploading!

Once you've done that we can let you know exactly what is happening.

Re: Multiple Service Templates On One Service

Posted: Sat Aug 09, 2014 8:48 pm
by brandon.pal
Attached. Thank you.

Re: Multiple Service Templates On One Service

Posted: Sun Aug 10, 2014 4:48 pm
by Box293
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:
  • 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
Now both the DBA and Linux Administrators groups should be used for alerts.

Re: Multiple Service Templates On One Service

Posted: Mon Aug 11, 2014 3:37 pm
by brandon.pal
And it works. Thank you :)