0
因此,我試圖使用New Relic的REST API來獲取有關我的服務器的一些度量。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'
但我無法合併這兩個查詢到類似:
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'
因爲它總是隻返回第二個字段的結果。
有沒有辦法在一次調用中執行這兩個查詢?