This has been asked a few times in the past by others in here.
I have 3 main groups of hosts, hosts1, hosts2 and hosts3.
I have a HG1 and HG2 created and all the proper hosts assigned. I want to create a HG3 but don't want to have to remember to update it when adding new hosts. Ideally I'd add ALL 50 hostgroups into HG3 and EXCLUDE HG1 and HG2 from it. I can't think of any possible way to do this since you can't exclude a HG in a HG Members definition.
Anyone have any ideas?
Excluding hostgroup from hostgroup!
Excluding hostgroup from hostgroup!
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: Excluding hostgroup from hostgroup!
My only thought right now is to write a script that creates a static config file. Adds * for hosts as members and also pulls from the api all the members of the other two hostgroups. It then writes them as members but excluded. Put this script in cron so it runs 1 or 2 times a day and I'll have my automatically updated hostgroup.
Anyone think of a better method?
Anyone think of a better method?
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: Excluding hostgroup from hostgroup!
This is really about the best I can think of as you cannot exclude hostgroups from other hostgroups..BanditBBS wrote:My only thought right now is to write a script that creates a static config file. Adds * for hosts as members and also pulls from the api all the members of the other two hostgroups. It then writes them as members but excluded. Put this script in cron so it runs 1 or 2 times a day and I'll have my automatically updated hostgroup.
Anyone think of a better method?
Re: Excluding hostgroup from hostgroup!
OK Scott, just wanted to hear that...thanks! Umm, feature request???? LOLscottwilkerson wrote:This is really about the best I can think of as you cannot exclude hostgroups from other hostgroups..BanditBBS wrote:My only thought right now is to write a script that creates a static config file. Adds * for hosts as members and also pulls from the api all the members of the other two hostgroups. It then writes them as members but excluded. Put this script in cron so it runs 1 or 2 times a day and I'll have my automatically updated hostgroup.
Anyone think of a better method?
You can lock this!
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: Excluding hostgroup from hostgroup!
BanditBBS wrote:OK Scott, just wanted to hear that...thanks! Umm, feature request???? LOLscottwilkerson wrote:This is really about the best I can think of as you cannot exclude hostgroups from other hostgroups..BanditBBS wrote:My only thought right now is to write a script that creates a static config file. Adds * for hosts as members and also pulls from the api all the members of the other two hostgroups. It then writes them as members but excluded. Put this script in cron so it runs 1 or 2 times a day and I'll have my automatically updated hostgroup.
Anyone think of a better method?
You can lock this!
Locking thread