我可以使用curl查询jmx端口来检查jmx是否正常工作?

问题描述 投票:0回答:1

是否可以使用curl从jmx端口查询一些/任何数据?我正在写一个inspec(厨师)测试来检查jmx工作正常。

# curl https://localhost:9114
curl: (35) Encountered end of file

# curl -s -w "%{http_code}\n" https://localhost:9114 -o /dev/null
000

简单地做curl不会返回任何有用的东西。

谢谢阅读。

chef jmx inspec
1个回答
0
投票

根据我的理解,你想检查jmx是否正常工作;这与厨师无关。在撰写本文时,inspec没有用于测试jmx的builtin resource

考虑以下测试jmx的方法:

  1. 使用non-interactive command line tool(不是jconsole或任何gui)客户端到jmx。例如,请参阅jmxterm`并根据需要查询jmx
  2. jmx metric进行抽样并对其进行分析。例如,它是否超过了某个阈值
© www.soinside.com 2019 - 2024. All rights reserved.