Object attributes (can be filtered using the URL parameter attrs
).
Icinga 2 knows about object relations. For example it can optionally return information about the host when querying service objects.
The following query retrieves all host attributes:
https://localhost:5665/v1/objects/services?joins=host
Instead of requesting all host attributes you can also limit the output to specific attributes:
https://localhost:5665/v1/objects/services?joins=host.name&joins=host.address
You can request that all available joins are returned in the result set by using
the all_joins
query parameter.
https://localhost:5665/v1/objects/services?all_joins=1
Note
For performance reasons you should only request attributes which your application requires.
Please note that the object type refers to the URL endpoint with /v1/objects/<object type>
where the following joins are available:
Object Type | Object Relations (joins prefix name) |
---|---|
Service | host, check_command, check_period, event_command, command_endpoint |
Host | check_command, check_period, event_command, command_endpoint |
Notification | host, service, command, period |
Dependency | child_host, child_service, parent_host, parent_service, period |
User | period |
Zones | parent |
Joined object types as key, attributes as nested dictionary. Disabled by default.
Contains used_by
object references. Disabled by default, enable it using ?meta=used_by
as URL parameter.
Full object name.
Object type.
See
doc/12-icinga2-api.md L620-L631