I can't deploy anything anymore - Error: Validation failed for object

But still I can not change in the icinga:

ritical/config: Error: Validation failed for object

icinga2 daemon -C
[2020-10-23 20:04:19 +0200] information/cli: Icinga application loader (version: r2.12.0-1)
[2020-10-23 20:04:19 +0200] information/cli: Loading configuration file(s).
[2020-10-23 20:04:19 +0200] information/ConfigItem: Committing config item(s).
[2020-10-23 20:04:19 +0200] information/ApiListener: My API identity: TL01-Nagios01
[2020-10-23 20:04:19 +0200] warning/ApplyRule: Apply rule ‘satellite-host’ (in /etc/icinga2/conf.d/satellite.conf: 29:1-29:41) for type ‘Dependency’ does not match anywhere!
[2020-10-23 20:04:19 +0200] warning/ApplyRule: Apply rule ‘App MobileX ENTW’ (in /var/lib/icinga2/api/packages/director/77000221-843d-45dd-a8c6-2cbedc5a9b0b/zones.d/TL01-Nagios01/notification_apply.conf: 190:1-190:48) for type ‘Notification’ does not match anywhere!
[2020-10-23 20:04:19 +0200] information/ConfigItem: Instantiated 1 NotificationComponent.
[2020-10-23 20:04:19 +0200] information/ConfigItem: Instantiated 222 Hosts.
[2020-10-23 20:04:19 +0200] information/ConfigItem: Instantiated 6 NotificationCommands.
[2020-10-23 20:04:19 +0200] information/ConfigItem: Instantiated 1 FileLogger.
[2020-10-23 20:04:19 +0200] information/ConfigItem: Instantiated 3761 Notifications.
[2020-10-23 20:04:19 +0200] information/ConfigItem: Instantiated 1 IcingaApplication.
[2020-10-23 20:04:19 +0200] information/ConfigItem: Instantiated 51 HostGroups.
[2020-10-23 20:04:19 +0200] information/ConfigItem: Instantiated 641 Dependencies.
[2020-10-23 20:04:19 +0200] information/ConfigItem: Instantiated 1 CheckerComponent.
[2020-10-23 20:04:19 +0200] information/ConfigItem: Instantiated 137 Zones.
[2020-10-23 20:04:19 +0200] information/ConfigItem: Instantiated 1 StatusDataWriter.
[2020-10-23 20:04:19 +0200] information/ConfigItem: Instantiated 136 Endpoints.
[2020-10-23 20:04:19 +0200] information/ConfigItem: Instantiated 1 ExternalCommandListener.
[2020-10-23 20:04:19 +0200] information/ConfigItem: Instantiated 1 IdoMysqlConnection.
[2020-10-23 20:04:19 +0200] information/ConfigItem: Instantiated 8 ApiUsers.
[2020-10-23 20:04:19 +0200] information/ConfigItem: Instantiated 1 CompatLogger.
[2020-10-23 20:04:19 +0200] information/ConfigItem: Instantiated 1 ApiListener.
[2020-10-23 20:04:19 +0200] information/ConfigItem: Instantiated 258 CheckCommands.
[2020-10-23 20:04:19 +0200] information/ConfigItem: Instantiated 1 InfluxdbWriter.
[2020-10-23 20:04:19 +0200] information/ConfigItem: Instantiated 1 LivestatusListener.
[2020-10-23 20:04:19 +0200] information/ConfigItem: Instantiated 8 TimePeriods.
[2020-10-23 20:04:19 +0200] information/ConfigItem: Instantiated 9 UserGroups.
[2020-10-23 20:04:19 +0200] information/ConfigItem: Instantiated 18 Users.
[2020-10-23 20:04:19 +0200] information/ConfigItem: Instantiated 1045 Services.
[2020-10-23 20:04:19 +0200] information/ConfigItem: Instantiated 7 ServiceGroups.
[2020-10-23 20:04:19 +0200] information/ScriptGlobal: Dumping variables to file ‘/var/cache/icinga2/icinga2.vars’
[2020-10-23 20:04:19 +0200] information/cli: Finished validating the configuration file(s).

I have adapted your notification config here, which contained deleted user.

apply Notification "Windows Server xx Service Notification" to Service {
import "notification_template_service"

interval = 0s
period = "24x7"
assign where match("*", service.name)
states = [ Critical, OK, Warning ]
types = [ Acknowledgement, Custom, Problem, Recovery ]
users = [ "icingaadmin" ]
}

apply Notification "Windows Server xx Host Notification" to Host {
import "notification_template_service"

interval = 0s
period = "24x7"
assign where match("*", host.name)
states = [ Down, Up ]
types = [ Acknowledgement, Custom, Problem, Recovery ]
users = [ "icingaadmin" ]
}

[2020-10-23 20:04:19 +0200] warning/ApplyRule: Apply rule ‘satellite-host’ (in /etc/icinga2/conf.d/satellite.conf: 29:1-29:41) for type ‘Dependency’ does not match anywhere!

But as you can see, you also have an unresolved apply rule dependency which must be deleted.

1 Like

Or it there a possibility to let the Icinga ignore this mistake?

I did not delte it did replace it with the Icinga admin

How can I change this part?

Which part do you mean the dependency or notification object?

Sorry I don’t know.
I was just asking what shall I do with this part which you postet.

You can replace the Notification Command in this /var/lib/icinga2/api/packages/director/77000221-843d-45dd-a8c6-2cbedc5a9b0b/zones.d/TL01-Nagios01/notification_apply.conf file, where deleted users have written in, with the Config I customized.

1 Like

Have a look here, everything is explained in detail how the notifications and dependencies work.

1 Like

I did allready change the deletet user but it did not work
I replaced the deleted user everywhere:

users = [ “icingaadmin” ]

I don’t understand this.

Have you ever restarted Icinga2 and director services after changing the config?

1 Like

I did:

/etc/init.d/​icinga2 restart

Ist this ok? Or have I top restart the director additional?

No you don’t have to, but restarting doesn’t hurt - you can try it.

If it still doesn’t work after you replaced the deleted user everywhere, you can try the following and check if it was caused by it. Comment out all Apply rule Notification where users = [ “THIS IS THE DELETETED USER” ] was written e.g.

//apply Notification "Windows Server xx Service Notification" to Service {
//import "notification_template_service"

//interval = 0s
//period = "24x7"
//assign where match("*", service.name)
//states = [ Critical, OK, Warning ]
//types = [ Acknowledgement, Custom, Problem, Recovery ]
//users = [ "THIS IS THE DELETETED USER" ]
//}

and then run the Config validation and post the output here please.

1 Like

Thank you very much for your help. I learned a lot.
To change the config files did’t help. I disabled some notifications in the Icinga Director. Now deploying is possible.

But I am surprised that the changes are not visible in the notifications.conf