0

そのため、New Relic の REST API を使用して、サーバーに関する測定値を取得しようとしています。

次のようなものを使用して、単一のフィールドの値を取得できました。

curl -gH "x-api-key:<my key>" 'https://api.newrelic.com/api/v1/accounts/<my key>/agents/<my key>/data.json?begin=<begin>&end=<end>&metrics[]=Database/all&field=call_count'

または

curl -gH "x-api-key:<my key>" 'https://api.newrelic.com/api/v1/accounts/<my key>/agents/<my key>/data.json?begin=<begin>&end=<end>&metrics[]=Database/all&field=calls_per_minute'

しかし、2 つのクエリを次のように組み合わせることができませんでした。

curl -gH "x-api-key:<my key>" 'https://api.newrelic.com/api/v1/accounts/<my key>/agents/<my key>/data.json?begin=<begin>&end=<end>&metrics[]=Database/all&field=call_count&field=calls_per_minute'

常に 2 番目のフィールドの結果のみを返すためです。

これら 2 つのクエリを 1 回の呼び出しで実行する方法はありますか?

4

1 に答える 1