Setting up monitoring using templates

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Setting up monitoring using templates

Post by dwhitfield »

chelch wrote:I have a service template named "Check Host Alive".
Is this applied to any services? That seems to be the missing step in what you've outlined above.
chelch
Posts: 29
Joined: Mon Aug 14, 2017 4:55 pm

Re: Setting up monitoring using templates

Post by chelch »

When in that service template....

Under common settings, manage host groups, I have the host group added. Check command is populated with "check-host-alive"

Under check settings i have active checks enabled.

Under alert settings, manage contact groups, i have my contact group added. Notifications options enabled are warning,critical, recovery. Notification enabled "on".

I am not sure what you mean by is it applied to any services.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Setting up monitoring using templates

Post by scottwilkerson »

chelch wrote:I am not sure what you mean by is it applied to any services.
Service templates do not become active until you have a Service that the template is applied to.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
chelch
Posts: 29
Joined: Mon Aug 14, 2017 4:55 pm

Re: Setting up monitoring using templates

Post by chelch »

Sounds good.

Next question is then where do I manage the "check settings", "alert settings" and "manage host groups" from? The template or the service? Both the service template and the service have those settings. What takes precedence?

Why does the service template and the service both have a check command dropdown box?
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Setting up monitoring using templates

Post by tmcdonald »

A service that uses a template and defines a value itself will take precedence over that value defined in the template. You can think of it like a stack of transparent sheets - the top-most stack will be entirely visible, and anything underneath it will be covered by the layers above. So to answer your first question, you would make this change wherever it makes sense to - if many services are using the template and you want them all to use a given value, then you set that value in the template and not on the service. If a service using that template needs to have a special value for just itself, then you set it on the service.
Former Nagios employee
chelch
Posts: 29
Joined: Mon Aug 14, 2017 4:55 pm

Re: Setting up monitoring using templates

Post by chelch »

Thanks. I believe I am making progress because now I see my host showing the "Host Alive Check" in service status but everything has been pending for quite a while. I assume this is why still not getting alerts? Not sure what I missed.
1.JPG
2.JPG
You do not have the required permissions to view the files attached to this post.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Setting up monitoring using templates

Post by tgriep »

The Grey Host that says that the check is pending is usually caused by that host not having a check command defined to it or that the check interval is not set.
If you did add a template to the host but the host template does not have a check command or the interval set, that would cause what you are seeing.
Be sure to check out our Knowledgebase for helpful articles and solutions!
chelch
Posts: 29
Joined: Mon Aug 14, 2017 4:55 pm

Re: Setting up monitoring using templates

Post by chelch »

I am not using a host check on the individual host because I am trying to accomplish that with a service template. The service template has a check command populated in the drop down window and has a host group added.

Check settings in template are 5,1,5 and active checks enabled. Check period is 24x7
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Setting up monitoring using templates

Post by tgriep »

What you posted sounds right but we would have to see the how the services are configured to be sure.
Can you open this file up on the server

Code: Select all

/usr/local/nagios/var/objects.cache
Find the services that are not running and post the settings here to we can view them?
Be sure to check out our Knowledgebase for helpful articles and solutions!
chelch
Posts: 29
Joined: Mon Aug 14, 2017 4:55 pm

Re: Setting up monitoring using templates

Post by chelch »

Not experienced with Linux. Is there anyway I can get that for you from the xi web ui?
Locked