Director sync rule won't sync

I have import and sync rules that should get some host entries from a database.

Import runs great and the preview looks good. The sync though has some issues:

  • trying to run from console: Nothing has been changed, imported data is still up to date, even though I did change some values that are used as a property.
  • trying to use “Preview” in the web frontend results in a timeout (we have > 10k hosts defined, maybe that’s why?)

If I delete a host in director, run the import and try the sync, the import notices there is a change, but the sync job doesn’t.
So I wonder how the sync job determines if a given configuration matches the currently imported items or not. Also: Is it possible to “force” a sync?

Here is as much information about my installation as I can find, feel free to ask for more …

  • Director version (System - About): 1.11.1
  • Icinga Web 2 version and modules (System - About): 2.12.1
    • Loaded Modules
director 1.11.1
grafana 2.0.3
icingadb 1.1.2
incubator 0.22.0
jira 1.3.4
x509 1.3.2
  • Icinga 2 version (icinga2 --version): r2.14.2-1
  • Operating System and version: debian 12 (bookworm)
  • Webserver, PHP versions: nginx, php 8.2

Answering myself:

quoting from the description of the “Filter Expression” field when creating a sync rule:

Be careful: this is usually NOT what you want, as it makes Sync “blind” for objects matching this filter.

I can confirm now, it gets blind :blush:
As the rule syncs only hosts of a specific type, and I wanted the rule to remove/disable entries that no longer exist in the database, I not only enabled the “Purge action”, but (being cautious) also added a filter expression that included this type of hosts.
Bad idea, and I still don’t understand what exactly the filter does. But removing it released the knot and the sync now works.

1 Like