[Monitor] How To Import New Relic Data-Source Into Grafana
Situation
Need Import New Relic Infra Data To Grafana Dashboard
Component
-
Grafana Server
-
Third-Party Plugin(From Github)
-
New Relic Account
-
Account ID
-
Insights Key
-
How To
Install And Configure
Clone github repo and put to grafana
git clone https://github.com/rupesh1/grafana-newrelic-datasource.git
scp grafana-newrelic-datasource {grafana_server_ip}:/var/lib/grafana/plugins/
Restart grafana service
systemctl restart grafana
Setting Data Source
Go to grafana configuration setting and click Add data source
Roll down and choice New Relic with Unsigned
tag
Enter your insights id
and api key
Find your insights api key
Go to New Relic and find apps in dashboard
Choice your account and go to manage data
to create api key
After enter account id and api key, click save & test
button
If sussece, look like this~
Then go to dashboard page and add it
Edit these infomation and apply
Special as NRQL
query, you can to go insights page’s Data Explorer
get query function
In this case, I add 4 panel
-
CPU Percent
-
Storage Usage Percent
-
Storage Write Per Second
-
Memory Usage Percent
NRQL query function
# CPU Percent
SELECT average(cpuPercent) FROM SystemSample FACET displayName SINCE 360 MINUTES AGO TIMESERIES
# Storage Usage Percent
SELECT average(diskUsedPercent) FROM SystemSample FACET displayName SINCE 360 MINUTES AGO TIMESERIES
# Storage Write Per Second
SELECT average(diskWritesPerSecond) FROM SystemSample FACET displayName SINCE 360 MINUTES AGO TIMESERIES
# Memory Usage Percent
SELECT average(memoryUsedPercent) FROM SystemSample FACET displayName SINCE 360 MINUTES AGO TIMESERIES