Is this applied to any services? That seems to be the missing step in what you've outlined above.chelch wrote:I have a service template named "Check Host Alive".
Setting up monitoring using templates
-
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
Re: Setting up monitoring using templates
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.
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
Service templates do not become active until you have a Service that the template is applied to.chelch wrote:I am not sure what you mean by is it applied to any services.
Re: Setting up monitoring using templates
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?
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?
Re: Setting up monitoring using templates
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
Re: Setting up monitoring using templates
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.
You do not have the required permissions to view the files attached to this post.
Re: Setting up monitoring using templates
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.
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!
Re: Setting up monitoring using templates
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
Check settings in template are 5,1,5 and active checks enabled. Check period is 24x7
Re: Setting up monitoring using templates
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
Find the services that are not running and post the settings here to we can view them?
Can you open this file up on the server
Code: Select all
/usr/local/nagios/var/objects.cacheBe sure to check out our Knowledgebase for helpful articles and solutions!
Re: Setting up monitoring using templates
Not experienced with Linux. Is there anyway I can get that for you from the xi web ui?