I saw a thread from about a year ago without a solution. Thought, I try again.
We have Nagios XI 2012 v2.3 running on the Nagios vm (centos 64bit) that you guys created.
I've got a lot of hosts where we check for diskspace (service for diskspace is linked to a hostgroup). However, I've got one hosts that need different thresholds. In the config-files you can normally use !hostname. XI creates them everytime you apply the configuration and the data is overwritten.
Is there a way in the webgui to do this? Can I exclude a host from a service.
I know there is a way to add a host to a service with and -, null, standard host option but I don't know what they mean.
Exclude hosts from a service
Re: Exclude hosts from a service
The negation (!) option does not currently work through the XI web ui. In order to utilize the negation feature, you will need to create a static config for the check. This config should be placed in the /usr/local/nagios/etc/static folder and managed by hand from the cli.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: Exclude hosts from a service
Is there any particular reason the negate function is not coded into XI? There have been cases where that would have really helped me out and I'd definitely prefer to use the Web UI and not static files. If there is no real reason, I'll go throw in a feature request.
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: Exclude hosts from a service
No good reason that I can think of, request away!
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Re: Exclude hosts from a service
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Exclude hosts from a service
There is actually a way to do this in the CCM but it is a hack and does have one caveat I will explain...
You can negate hosts using the free variables settings on the Misc Settings tab.
Add a free variable
Variable Name = host_name
Variable value = !YOUR-HOST.COM,!YOUR-OTHER-HOST.COM
Now for the caveat....
This works perfectly fine if you have a service definition where you are adding hostgroups and want to just exclude a couple hosts. This will fail miserably if you also are adding individual hosts (in addition to hostgroups) because the free variable you set will in fact overwrite the individual hosts you have.
I know this has been on the feature request list for a quite a while, there just hasn't been a good way to get it implemented within the confines of what we have to work with and might require major reworking of the CCM.
You can negate hosts using the free variables settings on the Misc Settings tab.
Add a free variable
Variable Name = host_name
Variable value = !YOUR-HOST.COM,!YOUR-OTHER-HOST.COM
Now for the caveat....
This works perfectly fine if you have a service definition where you are adding hostgroups and want to just exclude a couple hosts. This will fail miserably if you also are adding individual hosts (in addition to hostgroups) because the free variable you set will in fact overwrite the individual hosts you have.
I know this has been on the feature request list for a quite a while, there just hasn't been a good way to get it implemented within the confines of what we have to work with and might require major reworking of the CCM.
Re: Exclude hosts from a service
Ahh, I don't know about the fogier, but that actually will solve the issue 90% of the time for me.
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
Re: Exclude hosts from a service
You've got your +1!
Re: Exclude hosts from a service
We only work with hostgroups so I'm going to give this one a try.. Thanks Scott.
Edit: Works like a charm!
Edit: Works like a charm!