所以我正在尝试使用 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'
因为它总是只返回第二个字段的结果。
有没有办法在一次调用中执行这两个查询?