- Make a hostgroup called CARS
- Put the hosts Chevy, Toyota, Volkswagen, and Ford into CARS
- Run a service check called DO_WE_HAVE_GAS on hostgroup CARS
- Run a service check called EMISSIONS on hostgroup CARS
- Whoops!! Don't want to run EMISSIONS on Volkswagen!
Exclude service check from one host in hostgroup
Exclude service check from one host in hostgroup
Is it possible to put a host into a host group, assign a service to the hostgroup, but then not have that service run on specific hosts? For instance:
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
Re: Exclude service check from one host in hostgroup
Using custom variables.....let me look for the thread...
EDIT: can't find thread, but...
EDIT: can't find thread, but...
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.
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 service check from one host in hostgroup
So, if I get you right, you're saying add a free variable called "host_name" with a value called "!Volkswagen" to my EMISSIONS service check? My understanding is if I do that, then I get a variable called $_SERVICEhost_name$, unless I misunderstand.
And is this the thread you're referring to: https://support.nagios.com/forum/viewto ... 16&t=24170
And is this the thread you're referring to: https://support.nagios.com/forum/viewto ... 16&t=24170
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
Re: Exclude service check from one host in hostgroup
Yeah, that's it! Also, the OP in that thread said it works, so no idea in regards to your question.
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 service check from one host in hostgroup
Yah, I read through it. I'll see if it works for this customer.
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
Re: Exclude service check from one host in hostgroup
Suh-weet. Works. Thanks, Bandit for pointing me at Scott's kludge.


Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
Re: Exclude service check from one host in hostgroup
Thanks Guys! Locking this thread now...
Be sure to check out the Knowledgebase for helpful articles and solutions!