Fileshipper setup for deploying hand-crafted .configs via the icingaweb2 director

Topic: Fileshipper setup for deploying hand-crafted .configs via the icingaweb2 director

Based on the concept presented on p 463 in „Icinga2 Ein praktischer Einstieg ins Monitoring“ by Lennart Betz and Thomas Widhalm.

Goal: Store the admin contact group info as a custom var within the host machine.

Problem: it’s impossible to create an apply rule within the director icingaweb2 frontend containing:
user_groups = host.vars.notification_group

What I have:
1.the fileshipper module v 1.1.0 installed and listed as an active module via icingaweb2.

2.custom var notification_group is mandatory to be set for each host.

3.The icinga2 Notification template “notification-helper” exists and is ianctive. (created via icingacli director notification create notification-helper --object_type template --disabled ). It is an import for the apply rule.

4.Created fileshipper config ini within path: /etc/icingaweb2/modules/fileshipper/directories.ini

source = /usr/local/src/custom-rules.git/director-global
target = zones.d/director-global/custom-rules
extensions = .conf

source = /usr/local/src/custom-rules.git/master-zone
target = zones.d/master-zone/custom-rules
extensions = .conf

5.file: /usr/local/src/custom-rules.git/master-zone/notification_helper.conf
template Notification "notification_helper" { user_groups = host.vars.notification_group }

What I’m missing:
Please provide me with an example of the icingaweb2 config for this. These settings should be found at icingaweb2 -> director -> automation.

SInce I suppose this is the missing part for me.

I am sorry I cannot figure it out by myself and the book mentioned above just skips these parts.

we are doing a lot of Things like this. But we use CSV-files which Comes from an central CMDB.

This is for example a hardcopy to Import the column “Kontakt1” from the CSV into the customvar host.vars.Kontakt1.: