Deleted host still in overview and problems page

Not sure if that’s a problem with Icinga Web 2 or Icinga Director…

Problem

I have deleted two hosts (and with it their respective host checks), but both are still viewable on the overview and the problems page. Viewing the diff of the Director’s deployment gives the info that two host objects and two service objects were removed from the following config files:

  • zones.d/myhostname.example.com/hosts.conf
  • zones.d/myhostname.example.com/services.conf

How can I get rid of the unnecessary checks in the overview/problems pages?

Icinga versions and module info

Hi and welcome,

to be sure: where and how do you deleted the hosts? In the director or from the config files. And from which files/menues? Are these deletes hosts, which should be monitored or are these hosts endpoints from the icinga cluster config?

Hi Stevie Sy

where and how do you deleted the hosts? In the director or from the config files. And from which files/menues?

Icinga Director → Hosts → Hosts → clicked on the host → clicked delete

Are these deletes hosts, which should be monitored or are these hosts endpoints from the icinga cluster config?

Those are hosts that needed to be monitored, but are now shut down completely and are not needed anymore.

Not entirely sure since we don’t work with Director here, but don’t you have to commit changes in order for them to be applied?

Icinga Director → Activity Log → Rollout changes (blue link at the top of the page, not sure about the actual wording in English)

In case your Icingaweb locale is German (looking at your name :slight_smile: )
Icinga Director → Aktivitätslog → X ausstehende Änderungen ausrollen

if the changes are not done, you have to deploy the new config - as @dbodky already noted.

After the deployment the director writes new config files under /var/lib/icinga2/api/… After a reload of icinga with the new config (should happen automatically) you’ll see the changes

… but don’t you have to commit changes in order for them to be applied?

I did that already. I looked at the commits and the diffs. They all seem fine, as mentioned in the OP.

After the deployment the director writes new config files under /var/lib/icinga2/api/… After a reload of icinga with the new config (should happen automatically) you’ll see the changes

That’s very weird…

The file hosts.conf in
/var/lib/icinga2/api/zones/myhostname.example.com/director
has not been changed. :thinking:

Any idea why?

How the other sub directories look like? I’m not 100% sure, but I think the director deploy into /var/lib/icinga2/api/packages/director. Here there should be two stage directories. In the file “active-stage” is written which one is active.

There are 2 stage directories (hash as name) and the modification date of those directories correspond to my 2 times I deployed the changes. The content of active-state is the name of the most recent deployment.

So this seems to be fine. But somehow Icinga Web did not notice the change. How can I finish the deployment?

Did you already try to reload?

What do you mean by “reload”?

systemctl reload icinga2

I totally forgot.

For future reference: That solved the problem. However, I had to wait a minute or so.