Hello,
I am looking for a way to enable hostgroup inheritance ( at the host level ) for all of our hosts. I thought setting this in the host template would do the trick but it looks like it needs to be set in both places to take affect. I have attached a screen shot for reference.
Bulk modify Hostgroup inheritance
Bulk modify Hostgroup inheritance
You do not have the required permissions to view the files attached to this post.
Re: Bulk modify Hostgroup inheritance
Hostgroups should be inheritable from a template. Did you do the following:
1. Edit the template to include a host group
2. apply the template to a host
?
It's may not be obvious in the UI, but if you look in /var/nagiosramdisk/objects.cache or /usr/local/nagios/var/objects.cache, and search for "hostgroup_name <yourhostgroupname> you should find a definition with all the host members.
1. Edit the template to include a host group
2. apply the template to a host
?
It's may not be obvious in the UI, but if you look in /var/nagiosramdisk/objects.cache or /usr/local/nagios/var/objects.cache, and search for "hostgroup_name <yourhostgroupname> you should find a definition with all the host members.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Bulk modify Hostgroup inheritance
Hello @cdienger, Sorry maybe I wasn't explaining this very clearly. What I am trying to do is enable the additive option for hostgroup inheritance so that I can define a hostgroup in a template as well as within the hostgroups section of the host.
Re: Bulk modify Hostgroup inheritance
Ah. Thanks for the clarification. I'm not seeing a good way to do it in bulk in the web UI, but the setting is in the database:
The value in hostgroups_tploptins controls what is selected - 0 for additive, 1 for Null, 2 for standard.
Updating a current host would look like:
Setting the default value(when adding a new host) to additive can be done too:
We don't usually like making changes via direct sql calls like this since they not really tested and there's a risk of breaking things, so make sure to make a backup as a precaution if you go this route.
Code: Select all
echo "select host_name, hostgroups_tploptions from tbl_host;" | mysql -uroot -pnagiosxi -DnagiosqlUpdating a current host would look like:
Code: Select all
update tbl_host set hostgroups_tploptions = 0 where host_name = localhostCode: Select all
ALTER TABLE tbl_host ALTER hostgroups_tploptions SET DEFAULT 0As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.