Here is an example of how to use the New Relic REST API (v2) to obtain a list of all plugins for the account associated with a REST API key, including:
- Each plugin ID, plugin name, and GUID
- A list of summary metrics available for each of the components, including component IDs, names, and other values
You can also use the API Explorer to list plugins.
List all plugins
To obtain a list of the plugins, use:
curl -X GET "https://api.newrelic.com/v2/plugins.json" \ -H "X-Api-Key:${APIKEY}" -i
You can also use the New Relic API explorer to list information for all plugins.
List by plugin ID
To list the components defined for a single plugin, if you know the plugin's ID, use:
curl -X GET "https://api.newrelic.com/v2/plugins/${PLUGIN_ID}.json" \ -H "X-Api-Key:${APIKEY}" -i
You can also use the New Relic API explorer to list information for a single plugin.
Filter by plugin ID or GUID
To filter the plugins list by GUID or plugin ID, replace the [guid]
and ids
with your values:
curl -X GET 'https://api.newrelic.com/v2/plugins.json' \ -H 'X-Api-Key:' -i \ -d 'filter[guid]=mysql'
curl -X GET 'https://api.newrelic.com/v2/plugins.json' \ -H 'X-Api-Key:' -i \ -d 'filter[ids]=123,234'
Plugin list output
The output is in JSON format, but you can modify this by specifying plugins.xml
rather than plugins.json
. The output will appear in the following format (for JSON).
ヒント
PIugin queries can result in a large quantity of data. For more information about formatting the output or viewing multiple pages, see Pagination for API output.
{ "plugins": [ { "id": 9568, <---<<< PLUGIN_ID "name": "F5 LTM", <---<<< PLUGIN_NAME "guid": "com.newrelic.f5", <---<<< PLUGIN_GUID "publisher": "New Relic Inc.", "summary_metrics": [ { "id": 116635,> <---<<< SUMMARY_METRIC_ID "name": "CPU",> <---<<< SUMMARY_METRIC_NAME "metric": "Component/CPU/Total/Global[%]", <---<<< METRIC_NAME "value_function": "average_value", <---<<< METRIC_VALUE "thresholds": { "caution": 75, <---<<< SUMMARY_METRIC_CAUTION_THRESHOLD "critical": 85 <---<<< SUMMARY_METRIC_CRITICAL_THRESHOLD } }, { "id": 116636, "name": "Throughput", "metric": "Component/Throughput/Total[bits/sec]", "value_function": "average_value", "thresholds": { "caution": null, "critical": null } }, ..... } } ] ...
The output contains the summary_metrics that have been defined for the plugin. The summary_metric values are listed for each component.
その他のヘルプ
さらに支援が必要な場合は、これらのサポートと学習リソースを確認してください:
- Explorers Hubでは、コミュニティからのサポートを受けたり、ディスカッションに参加したりすることができます。
- 当社サイトで答えを見つけて、サポートポータルの使用方法を確認してください。
- Linux、Windows、およびmacOS向けトラブルシューティングツールであるNew Relic Diagnosticsを実行してください。
- New Relicのデータセキュリティとライセンスドキュメント をご確認ください。