向JMX添加指标 [英] Adding metrics to JMX

查看:184
本文介绍了向JMX添加指标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

关于JMX,我有2个问题: 您可以使用JMX在您的应用程序中衡量什么? 是否可以向JMX添加指标?例如:查看某项操作花费了多少时间.

I have 2 questions regarding JMX: What can you measure in your application using JMX? Is it possible to add metrics to JMX? For instance: seeing how much time a certain operation took.

谢谢

推荐答案

您可以添加所需的任何指标,确定要监控的指标.

You can add whatever metrics you like, you decide what you want to monitor.

对于第二个问题,是的,您可以衡量某个操作需要花费多少时间.

For the second question, yes you can measure how much time some operation take.

一个易于实现的JMX指标的方法是使用Spring注释:

One easy to implement your JMX metrics is to use Spring annotations :

http://docs.spring.io/spring/docs/3.2.4.RELEASE/spring-framework-reference/htmlsingle/#jmx-exporting

这篇关于向JMX添加指标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆