OpenSearch 1.2.3性能分析仪API指标回答回答空

发布于 2025-02-02 13:12:46 字数 1318 浏览 4 评论 0原文

我需要使用OpenSearch Helath指标。 在文档中,提到使用API​​如下:

[https://opendistro.github.io/for-elasticsearch-docs/docs/docs/pa/api/pa/pampame/#sample-request] 1],

在我的本地开发系统上,使用示例中的API,来自网站,指标响应是空的。

GET API: curl'xxxx:9600/_plugins/_ performanceAnalyzer/zemrics?zerrics = litics = litency,cpu_utilization& amp; amp; agg = avg,max& dim = shardid = shardid&amp& nodes = all'

响应:响应:

{ “当地的”: { “时间戳”:1653829475000, “数据”: { “字段”:[ { “名称”:“ shardid”, “ type”:“ varchar” },, { “名称”:“延迟”, “ type”:“ double” },, { “名称”:“ cpu_utilization”, “ type”:“ double” } ],, “记录”:[] } } }

虽然看起来像这样的东西:

{ “ kehlhqbbtpm1byicficeqg”:{ “时间戳”:1554940530000, “数据”: { “字段”:[{ “名称”:“ shardid”, “ type”:“ varchar” },, { “名称”:“延迟”, “ type”:“ double” },, { “名称”:“ cpu_utilization”, “ type”:“ double” } ],, “记录”:[ [ 无效的, 无效的, 0.012552206029147535 ],, [ “ 1”, 4.8, 0.0009780939762972104 这是给出的 这是给出的 } },, “ bhdpbmjzts-tktzro2smya”:{ “时间戳”:1554940530000, “数据”: { “字段”:[{ “名称”:“ shardid”, “ type”:“ varchar” },, { “名称”:“延迟”, “ type”:“ double” },, { “名称”:“ cpu_utilization”, “ type”:“ double” } ],, “记录”:[ [ 无效的, 18.2, 0.011966493817311527 ],, [ “ 1”, 14.8, 0.0007670829370071493 这是给出的 这是给出的 } } }

我想理解我该怎么做才能使这些指标人口组成。

在此先感谢您的帮助!

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!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

动听の歌 2025-02-09 13:12:46

启用插件后(在OpenSearch 1.3.6中进行了测试)开始工作

curl -XPOST "xxxxx:9200/_performanceanalyzer/cluster/config" -d '{"enabled": true}'
curl -XGET  "xxxx:9600/_plugins/_performanceanalyzer/metrics?metrics=Latency,CPU_Utilization&agg=avg,max&dim=ShardID&nodes=all"
{"Cpu2yu5KQjKqjrs085Y7ew": {"timestamp": 1666780920000, "data": {"fields":[{"name":"ShardID","type":"VARCHAR"},{"name":"Latency","type":"DOUBLE"},{"name":"CPU_Utilization","type":"DOUBLE"}],"records":[[null,null,0.020016996996996998]]}}, "cBkdsc8eR_C81KfPqmcCxg" :{"timestamp": 1666780920000, "data": {"fields":[{"name":"ShardID","type":"VARCHAR"},{"name":"Latency","type":"DOUBLE"},{"name":"CPU_Utilization","type":"DOUBLE"}],"records":[[null,null,0.0020227954409118174]]}}, "-J5PdpSORi-7oaa619CjZA" :{"timestamp": 1666780920000, "data": {"fields":[{"name":"ShardID","type":"VARCHAR"},{"name":"Latency","type":"DOUBLE"},{"name":"CPU_Utilization","type":"DOUBLE"}],"records":[[null,null,0.03806364835164835]]}}}%

After enabling the plugin (tested in Opensearch 1.3.6) it started to work

curl -XPOST "xxxxx:9200/_performanceanalyzer/cluster/config" -d '{"enabled": true}'
curl -XGET  "xxxx:9600/_plugins/_performanceanalyzer/metrics?metrics=Latency,CPU_Utilization&agg=avg,max&dim=ShardID&nodes=all"
{"Cpu2yu5KQjKqjrs085Y7ew": {"timestamp": 1666780920000, "data": {"fields":[{"name":"ShardID","type":"VARCHAR"},{"name":"Latency","type":"DOUBLE"},{"name":"CPU_Utilization","type":"DOUBLE"}],"records":[[null,null,0.020016996996996998]]}}, "cBkdsc8eR_C81KfPqmcCxg" :{"timestamp": 1666780920000, "data": {"fields":[{"name":"ShardID","type":"VARCHAR"},{"name":"Latency","type":"DOUBLE"},{"name":"CPU_Utilization","type":"DOUBLE"}],"records":[[null,null,0.0020227954409118174]]}}, "-J5PdpSORi-7oaa619CjZA" :{"timestamp": 1666780920000, "data": {"fields":[{"name":"ShardID","type":"VARCHAR"},{"name":"Latency","type":"DOUBLE"},{"name":"CPU_Utilization","type":"DOUBLE"}],"records":[[null,null,0.03806364835164835]]}}}%
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文