Multiple import sources in one sync

Hi all,

I would like to add one ore more fields from another import source (datasource-B) addtionally to the mainly used (datasource-A) in one sync-rule (sync-A).

I am aware of the options:

  • A) import (datasource-B) to a datalist and lookup the details from there during the import of datasource-A (map modifier)

  • B) use a modifier (Get a property from another Import source) during the import of datasource-A

  • C) add required fields during the sync job from datasource-B in the Sync-A

  • D) Sync-rule Update-Only

Ideas/Problems:

  • A) works fine but would end in endless datalists … (I need multiple fields from 3 diffrent DBs)

  • B) I really tried hard but no idea how to use a field from datasource-A to filter in datasource-B and get the required field from there? Does anyone have one working example?

  • C) how would the filter expression look like?
    datasource-B.field == datasource-A.field?
    object_name = datasource-B.field?
    ???

  • D) I am not able to find any example für update-only sync rules … how would the rule match existing objects in director?

Many thanks in advance & br
Oliver

Hi Oliver,

this should be possible by syncing additional data sources and merging data → update policy “merge”.
The second source will need a primary key like the hostname to merge the data within the same object, new fields will be added and existing will be overwritten.
Take a look on the order the sync jobs are executed to avoid unwanted results.
Director is not build to resolve dependencies between different external datasources, it is one way from data source to icinga. AFAIK filters only work on fields from currently used source.

Greetings from the neighborhood
Manfred

Hi Manfred,

many thanks for the explanation - its working perfecty fine now.

The missing link was the diffrent primary key for datasource-B.

Solution → C)

2 import jobs (datasourc-A, datasource-B) - same primary key
2 sync rules (datasource-A: Update Policy - Merge, Datasource-B: Update Policy - Update-Only)

sync rule for datasource-A import runs twice often of datasource-B which is fine for daily operations. I will work on a more syncronised scenario later on.

Same back :slight_smile: !

Oliver