Add dashboard widget for an instance

We have New Relic installed on several servers. And we would like to see load numbers in our dashboard from each separate server. The servers are in our account as ‘instances’. How can we get the load numbers from one instance in our dashboard?

Hi, @dominique5: Try one of these queries:

SELECT count(*) FROM Transaction WHERE appName = 'Your Application' FACET host

SELECT count(*) FROM Transaction WHERE appName = 'Your Application' AND host = 'hostname'

If you want a line chart, add TIMESERIES to the query.

Hi Philweber,

I’ve tried your queries and they work. However, I can’t figure out how to get line charts for things like ‘average load one minute’, or ‘average cpuPercent’.

If I add a query like below, I see only one hostname:
‘SELECT latest(host.loadAverageOneMinute) FROM Metric FACET host.fullHostname SINCE 30 MINUTES AGO TIMESERIES’

SELECT average(loadAverageOneMinute) FROM SystemSample FACET hostname TIMESERIES 

SELECT average(cpuPercent) FROM SystemSample FACET hostname TIMESERIES

You may see the query behind most charts in the UI by clicking on the three-dot button in the upper-right corner of the chart and selecting View query:

The code you supplied definitely works, but it only shows one instance for me. I don’t really see the other hosts in New Relic, only on some occasions like these:

Services - APM > PHP Application > Instances

Services - APM > PHP Application > Environment:

If you look at the last screenshot I think that New Relic absolutely knows that there’s multiple hosts, right? But it looks like I can’t specifically add them to the interface.

Your screenshots are from New Relic APM, but the data you asked about (average load one minute, or average cpu percent) come from the Infrastructure agent. Do you have the Infrastructure agent installed on all your application hosts?

I will ask our hosting partner, they installed New Relic on the server. They had some trouble with it because of the operating system that was used for the server wasn’t supported (yet).

Hi @philweber, our hosting partner has finally managed to install the Infrastructure Agent. We are now able to see data for multiple servers in our dashboards. Thanks for helping!

1 Like

Hi @philweber , we are now able to see the load in our dashboard for multiple servers.

But we would also like to have insights of each server in APM. After installing the servers as Infrastructure Agent, the server instances disappeared in our APM. What can we do to get them back there?

Do you have an APM agent installed on each server? You need both APM and Infrastructure agents installed on each server to see APM and Infrastructure data.

Hi Phil,

Thanks for getting back to me.

I’ll check this with our hosting company. Maybe they (accidentally) removed the APM agent when they installed the Infrastructure agent.