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

Server list API returns blank array

api

#1

https://rpm.newrelic.com/api/explore/servers/list

https://rpm.newrelic.com/api/explore/servers/list returns a blank array, even though we have 130 servers as shown in https://insights.newrelic.com/accounts/1607292/dashboards/442217 . Can someone clarify, how is a server defined for new relic. I mean what does the server list exactly return because, we have around 130 AWS EC2 instances, but still the API returns []. It can be seen in the screenshots, we have more than 100 EC2 instances. Please help!


#2

Hi @rajatbhardwaj - the Servers API you provided is for the now retired Server agent. I am not sure if there is a fully featured Infrastructure API as the only reference I can find is to create alerts on Infrastructure.


#3

Hi @stefan_garnham, thanks for your answer. Actually, what I am trying to achieve is pretty simple. We are using infrastructure integration feature of new relic that is, everytime a new EC2 instance is added in AWS, it shows up, with some delay, in the infrastructure dashboard on new relic. Now, I want to hit new relic to check if a new EC2 instance has come up and if some or no alerts are configured for the same. If, as you say, there is no API for knowing if a new instance has been added, then can you suggest some other way to do this?


#4

Sorry, linked to the Infrastructure documentation instead of the Infrastructure Alerts API. The documentation states that this is possible, but I cannot see an example.

Someone from support will be able to assist.


#5

Hi, @stefan_garnham thanks again.

curl -v -X GET --header “X-Api-Key: <API_ADMIN_KEY>” “https://infra-api.newrelic.com/v2/alerts/conditions?policy_id=111111” returns following response:

{“errors”:[{“status”:“500”,“detail”:“error loading conditions”}]}

Have you seen this before?


#6

I haven’t used this API so you may need to reach out to support for assistance.


#7

Hi @rajatbhardwaj, I noticed you opened a new thread for this, so we will continue working with you over here:


#8

I am also experiencing this Issue now. Was it fixed??


#9

Hi, @ikingori-ext: I answered your question in this thread: