Your data. Anywhere you go.

New Relic for iOS or Android


Download on the App Store    Android App on Google play


New Relic Insights App for iOS


Download on the App Store


Learn more

Close icon

Get overview of all alert policies for an infrastructure server/host


#1

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.


#2

Hello @Stijn.Cremers,

Here are our available API resources for the Infrastructure product:

https://docs.newrelic.com/docs/apis/get-started/intro-apis/introduction-new-relic-apis#infrastructure-api

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)
#3

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.


#4

@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 :slight_smile:


#5

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?


#6

Hi @Stijn.Cremers - the closest things we have to what you are requesting are the the 2 calls described here:

Those would be:

  1. GET a list of Infrastructure conditions
  2. GET a 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.