Hi,
I am quite happy with icinga, director and its flexibility!
Currently I am stuck with following problem:
The sync rule allows to select the destination attribute " All custom vars".
I need to import a hole bunch of service checks (13k) of different(!) kind => I do have different custom vars (i.e. the attributes of the different service templates those checks import).
I thought and I am desperately hoping for a way to accomplish the following (using fileshiper with Excel):
servicename1|hostname1|imports_template1|customvar1=valuex;customvar2=valuex
Everything works like a charm except the part with “customvar1=valuex;customvar2=valuex”.
No matter how I try to handle a list of custom vars within ONE Column - its not working in the intended way.
Tried to do split during import (with delimiter char ‘;’) and stuff the result in an array - but this only leads to vars[“0”]= “customvar1=valuex” etc. on the resulting service.
I would like to avoid defining columns for every custom var and making different import/syncrules for every type of service-template to be imported.
Is there a possibility to have ONE column with AV-Pairs to get converted to "vars. = " ?
i.e.
“customvar1=valuex;customvar2=valuex” should become:
service:
var. customvar1=valuex
var. customvar2 =valuex
.
.
To use the “All custom vars” it has to be a JSON structure, if I remember correct. I have not used it to build the configuration by hand, but for LConf-Migration and with a database import providing JSON.
How does the input for a director sync-rule have to look like to be processable by “All custom vars” - I am to silly or blind (or both) to figure it out.
This did it - thank you very much. “Decode a JSON string” sounds very logical - don’t know how I could oversee this. Sometimes there is a certain point reached that could be described as “desperate subtle aggressive cognitive disability” :).