I broke my Icinga backend

Ok so im having trouble getting some windows agents to connect to my master.
While trying to fix the issue i modified my zones.conf and restarted icinga.

Now nothing works anymore. I had backuped the zones.conf before and restored it and tried restarting icinga again, but it doesnt want to anymore.

I see now, that everything was controlled by the director before and its somehow angry, that i tried to usurp the director somewhat.

When i run icinga2 daemon -C it says

warning/ConfigCompiler: Cannot compile file '/etc/icinga2/zones.conf': Error: Function call 'std::ifstream::open' for file '/etc/icinga2/zones.conf' failed with error code 13, 'Permission denied'

Context:

	(0) Compiling configuration file '/etc/icinga2/zones.conf'

[2021-10-08 09:47:48 +0200] warning/config: Ignoring directory '/var/lib/icinga2/api/zones/director-global' for unknown zone 'director-global'.
[2021-10-08 09:47:48 +0200] warning/config: Ignoring directory '/var/lib/icinga2/api/zones/master' for unknown zone 'master'.
[2021-10-08 09:47:48 +0200] information/ConfigItem: Committing config item(s).
[2021-10-08 09:47:48 +0200] critical/config: Error: Validation failed for object 'groupNameThatIUse' of type 'HostGroup'; Attribute 'zone': Object 'director-global' of type 'Zone' does not exist.

And it repeats that last error for all my host groups.

What can i do

Ok. I fixed it already. Sorry for the panicked post, but i was indeed panicking a bit.

After sending the post i reread it and noticed the permission denied part.
I then realised, that i created the backup file and it might not be owned by the right user anymore and indeed it was owned by root and not nagios. after fixing that it worked again.

Sorry again for this :slight_smile:

2 Likes

Please watch your language. Many people access this board from work environments.

You’re right, i’m sorry. I also exclusively come here for work related reasons.
It seems like i can’t edit my posts though or am i missing something?

I edited the subject line, Matthew’s right though, of course.