Icinga / icingaweb2-module-fileshipper

Provide CSV, JSON, XML and YAML files as an Import Source for the Icinga Director and optionally ship hand-crafted additional Icinga2 config files
https://icinga.com/docs/director/latest/fileshipper/doc/02-Installation/
GNU General Public License v2.0
28 stars 13 forks source link

Import unique id != hostname #42

Open flohoff opened 7 months ago

flohoff commented 7 months ago

Hi, i am trying to import fileshipper jsons containing host information and i am trying to use something different as a unique id than the hostname.

The reason is that i'd like to be able to track host renames from the external source by following the unique id. If we cant track renames the host would be deleted and recreated with the new name.

I fail to understand the possibilities of the unique id in the import rule. My impression was that the unique id in the import rule is "only" used for lifetime tracking e.g. if the id disappears the object is gone and should be deleted.

In the sync source i set the object_name from the real name from the import and store the "id" in a custom field in icinga director.

if i now click trigger sync twice i get a nice backtrace because the object already exists.

What i am missing or misunderstand?

Flo