You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Director should be able to import objects (e.g. hosts) with their attributes from icinga2 API using a Director Import Source (Source Type: CoreAPI).
Current Behavior
The Director is not able to import anything at all apart from the actual object_name.
Thus you get a list of all the object names but nothing else.
The function that lists the columns checks wether the variable data is empty or not. This variable however does not seem to be set anywhere and thus nothing gets listed (defaulting to only the object_name).
Comparing this to other Import Sources a simple fix seems to be to rename data to res.
We tried that and instantly had success, giving us a list of the other columns as well.
Good catch, thank you! Just for the records, the ImportSource worked as expected even without this change, all properties got imported. As you correctly figured out, they didn't show up as available columns. Therefore, preview didn't show them - while they where there and usable.
Not sure why this didn't get noticed before, probably because this ImportSource is rarely used in the real world. Usually there isn't much one wants to import from Icinga into the Director, as it's configuration comes from there.
Expected Behavior
The Director should be able to import objects (e.g. hosts) with their attributes from icinga2 API using a Director Import Source (Source Type: CoreAPI).
Current Behavior
The Director is not able to import anything at all apart from the actual object_name.
Thus you get a list of all the object names but nothing else.
Possible Solution
The problem seems to lie within library/Director/Import/ImportSourceCoreApi.php.
The function that lists the columns checks wether the variable
data
is empty or not. This variable however does not seem to be set anywhere and thus nothing gets listed (defaulting to only the object_name).Comparing this to other Import Sources a simple fix seems to be to rename
data
tores
.We tried that and instantly had success, giving us a list of the other columns as well.
Current:
Fixed:
Steps to Reproduce
Create an Import Source
and then
Store
andCheck for changes
.Now look at the preview.
object_name
is the only available column.Environment
The text was updated successfully, but these errors were encountered: