我一直在尝试使用Jolokia 1.3代理从我的spring-boot应用程序中获取指标。 除tomcat指标外,所有指标均已成功获取
我已使用以下命令动态附加了Jolokia代理:-
java -jar jolokia-jvm-1.3.4-agent.jar启动
这是我运行curl请求时得到的结果:- curl http://localhost:8778/jolokia/read/Catalina:name= ,type = ThreadPool / currentThreadsBusy,maxThreads,currentThreadCount,connectionCount?ignoreErrors = true {“ request”:{“ mbean”:“ Catalina:name = ,type = ThreadPool”,“ attribute”:[“ currentThreadsBusy”,“ maxThreads”,“ currentThreadCount”,“ connectionCount”],“ type” :“ read”},“ stacktrace”:“ javax.management.InstanceNotFoundException:找不到模式为Catalina:name = ,type = ThreadPool的MBean用于读取属性\ n \ tat org.jolokia.handler.ReadHandler.searchMBeans( ReadHandler.java:160)\n\tat org.jolokia.handler.ReadHandler.fetchAttributesForMBeanPattern(ReadHandler.java:126)\ n \ tat org.jolokia.handler.ReadHandler.doHandleRequest(ReadHandler.java:116)\ n \ tat ................. java.lang.Thread.run(Thread.java:748)\ n“,” error_type“:” javax.management.InstanceNotFoundException“,” error“:” javax.management.InstanceNotFoundException:没有模式为Catalina的MBean:name = < / em>,type =发现线程池用于读取属性“,”状态“:404}