Using Fileshipper


regarding to this topic: Director Notifications multiple send

I’m trying to load a hand-crafted conf file to my director configuration.

In the folder /etc/icingaweb2/modules/fileshipper I have created a 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

Then I created a file “notification-helper.conf” in /usr/local/src/custom-rules.git/master-zone

template Notification "notification-helper" {
  user_groups = host.vars.notification.mail.groups
  users = host.vars.notification.mail.users

In the director I cant find my new template “notification-helper”.

Checking the directory: /var/lib/icinga2/api/packages/director//zones.d/master-zone/custom-rules

I can see the “notification-helper.conf”.

I read a topic in the Icinga2 Book from Lennart Betz and Thomas Widhalm, that I have to set a deactivated template via the cli. I’ve done this:

icingacli director notification create notification-helper --object_type template --disabled

Now I can see the template, but without my user_groups or users variables.

Anyone ideas?

Beste regards
Jo Te

1 Like

Hi Jo,

Were you able to figure this out? How did you get the import sync to run after adding the configuration to directories.ini?

I have added my config to directories.ini but I don’t see a way to run the sync.

I’ve the exact same problem. The book (page 463) doesn’t go into detail about how to setup the fileshipper module for a notification template import.

At the moment I have:

  1. the fileshipper module v 1.1.0 installed and listed as an active module via icingaweb2.

  2. The icinga2 Notification template “notification-helper” exists and is ianctive. (created via icingacli director notification create notification-helper --object_type template --disabled )

  3. Notification template “notification-helper” is an import for the apply rule

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

  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’am missing:
A way to tell the fileshipper to import the hand-crafted config file notification_helper.conf.

Maybe a little more detail within the book. “Icinga2 - Ein praktischer Einstieg in Monitoring”