Expand Icinga macros in Director SQL queries

Hi all,

I am trying to link Icinga Director our CRM - we are storing a list of clients and a unique ID.

I have a second table with the sites for each customer (siteID, CustomerID).

If I set a custom attribute of ‘customerID’ on a host object, and then wanted to set a second attribute of site — I am wondering if it is possible to expand Icinga macros in these SQL queries - e.g SELECT * from sites where customer = $host.vars.customer$;.

I am assuming the macros aren’t expanded in the PHP, but just wondering if anyone has been able to achieve something like this?

Hello,

makes no sense, How should the importer know which customer you want to import?
You can either create import jobs for each customer or import everything and then on your sync you filter them.

Regards,
Carsten