I have a script that automatically generates host and hostgroup definitons based on our configuration management system. This runs every 30 minutes on a cronjob, and runs systemctl reload icinga2 on completion. It seems that only the manually written hostgroups (in another file) are shown in Icingaweb2 - even though the config check says that 39 have been instantiated?
As far as I can tell the automatically generated files have valid configuration by running icinga2 daemon -C - and these files are located in the same directory as the manually written ones in zones.d/ with a HA setup.
[2020-02-27 10:13:42 +0000] information/ConfigItem: Instantiated 39 HostGroups.
[2020-02-27 10:13:42 +0000] information/ConfigItem: Instantiated 1215 Hosts.
I’ve checked with different accounts and browsers and only these two show.
What could be causing this behaviour? Restarting (systemctl restart icinga2) the daemon shows the host groups - but I’d rather not restart every 30 mins.
I’ve looked in the icinga IDO database and can see the hostgroups there (well - these and much older ones that no longer exist).