I need to use the opensearch helath metrics. In the documenteation it's mentioned to use the api as follows:
[https://opendistro.github.io/for-elasticsearch-docs/docs/pa/api/#sample-request][1]
On my local dev system, using the API from the example, from the site, the metrics response are empty.
The GET API: curl 'x.x.x.x:9600/_plugins/_performanceanalyzer/metrics?metrics=Latency,CPU_Utilization&agg=avg,max&dim=ShardID&nodes=all'
The response:
{ "local": { "timestamp": 1653829475000, "data": { "fields": [ { "name": "ShardID", "type": "VARCHAR" }, { "name": "Latency", "type": "DOUBLE" }, { "name": "CPU_Utilization", "type": "DOUBLE" } ], "records": [] } } }
While it should look like like something like this:
{ "keHlhQbbTpm1BYicficEQg": { "timestamp": 1554940530000, "data": { "fields": [{ "name": "ShardID", "type": "VARCHAR" }, { "name": "Latency", "type": "DOUBLE" }, { "name": "CPU_Utilization", "type": "DOUBLE" } ], "records": [ [ null, null, 0.012552206029147535 ], [ "1", 4.8, 0.0009780939762972104 ] ] } }, "bHdpbMJZTs-TKtZro2SmYA": { "timestamp": 1554940530000, "data": { "fields": [{ "name": "ShardID", "type": "VARCHAR" }, { "name": "Latency", "type": "DOUBLE" }, { "name": "CPU_Utilization", "type": "DOUBLE" } ], "records": [ [ null, 18.2, 0.011966493817311527 ], [ "1", 14.8, 0.0007670829370071493 ] ] } } }
I would like to understnad what should I do to get those metrics populated.
Thanks in advance for helping!