Borked Deployments

A while back I was laying around with e-mail notificiations and i really borekd something. Every time I attempt to deploy any change via director, I get this error:

[2025-02-16 00:09:01 -0500] information/cli: Icinga application loader (version: r2.14.4-1)
[2025-02-16 00:09:01 -0500] information/cli: Loading configuration file(s).
[2025-02-16 00:09:01 -0500] information/ConfigItem: Committing config item(s).
[2025-02-16 00:09:01 -0500] information/ApiListener: My API identity: tatooine.unknownrealm.org
[2025-02-16 00:09:01 -0500] critical/config: Error: Validation failed for object '!generic-service-email-notification' of type 'Notification'; Attribute 'host_name': Attribute must not be empty.
Location: in [stage]/zones.d/master/notifications.conf: 1:0-1:55
[stage]/zones.d/master/notifications.conf(1): object Notification "generic-service-email-notification" {
                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[stage]/zones.d/master/notifications.conf(2):     import "generic-service-email-notification"
[stage]/zones.d/master/notifications.conf(3): 
[2025-02-16 00:09:01 -0500] critical/config: 1 error
[2025-02-16 00:09:01 -0500] critical/cli: Config validation failed. Re-run with 'icinga2 daemon -C' after fixing the config.

Not sure how to resolve this and I could certainly use a hand

The template is defined in my system

The host property is defined. I also can’t delete the template and start from scratch as the delete button is greyed out.

the host property should not be definded in a notification template!

you use the notification apply rule with the “assign where” part to apply it to hosts / services

just to find out if that works:
can you clear the hostname, save and remove the the field from the the template?
is it possible tho delete the notification template after that?

Thats the problem. As it stands right now, I can’t deploy any changes. I just get that error.

did you do that?

Best regards

Yes, I did that and the delete button is still grayed out on the template

Whats the output of:

Select * FROM `icinga_notification`;

executed against the mysql director database?

Three rows, as depicted below:

Should I delete the object row? I am not sure how that got out there.

Make a backup first!

And definitely delete the object_type=object, since “notification rules” in director are either object_type=apply or object_type=template

Deleting the object row totally fixed the problem with deployments. I am not sure how that row got out there, but I really appreciate your help in getting it cleaned up!