I’m looking for a way through the (GraphQL) api to get an overview of all alert policies that are attached to a given infrastructure server/host.
Here are our available API resources for the Infrastructure product:
Hope this helps! Please let me know if you have any questions.
Feature Idea: Get an overview of all alert policies attached to a host/server (via the API)
I already had a look at the graphql api for the infrastructure API’s.
I managed to get data from the infrastructure alerts api, and get host information from the graphql information.
But I didn’t found a solution to get the alert policies the are (indirectly) attached to a given host.
@Stijn.Cremers that’s not something we directly provide currently, though you could achieve this with a custom script and the API.
I recommend adding this as a Feature Idea here on the Hub where other users can vote on it and add their use-cases, the more support these ideas get the better
I have added a feature idea: Get an overview of all alert policies attached to a host/server (via the API)
Could you help me in achieving this via a custom script and the API?
Hi @Stijn.Cremers - the closest things we have to what you are requesting are the the 2 calls described here:
Those would be:
GETa list of Infrastructure conditions
GETa specific Infrastructure condition
Part of the limitation with this is that Infrastructure does not have a native REST API outside of Alerts. Only Alerts-related information can be queried in regards to Infrastructure hosts. I recommend adding a new feature idea along the lines of requesting a REST API that is native to Infrastructure as a whole.