如何将 JMX 统计信息发布到单个远程服务器
假设我有两个应用程序/tomcat T1 和 T2,它们都启用了 jmx。它们中的每一个通常都有自己的 URL
jmx 客户端将连接到该 URL。我想知道是否可以有一个 rmi 服务器 S1,在端口 P1 上运行;它可以保存T1和T2的统计数据。
如果是这样我怎样才能弄清楚上下文? (因为所有统计信息现在都重定向到同一网址)。我在互联网上能找到的最接近的是本页中的第7点。目的是为 jmx 服务提供一个集中位置。我试图弄清楚是否有类似上下文名称(如在 servlet 中)之类的东西来促进这一点。
Lets say I have two applications/tomcats T1 and T2, both of which are jmx enabled. Each of them normally would have their own URL <serve_X>:<port_X>
to which the jmx clients would connect. I want to know if it is possible to have a single rmi-server S1, running on port P1; which can hold the statistics of both T1 and T2.
If so how can I figure out the context? (as all the stats are now redirected to the same url). The closest I could find on internet is point 7 in this page. The intent is to have a centralized location for jmx services. I am trying to figure out if there is something like a context name (as in servlets) to facilitate this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
一种相当新的解决方案(与提出问题时相比)如下所示:
JMX
->
Codahale 指标->
metrics-statsd->
StatsD->
Graphite/Reporting/Monitoring基本上你使用 StatsD聚合统计信息和指标库,将 JMX 转换为合理的内容。
One solution that is rather new (compared to when the question was asked) is something like this:
JMX
->
Codahale Metrics->
metrics-statsd->
StatsD->
Graphite/Reporting/MonitoringBasically you use StatsD to aggregate the stats and Metrics library to convert JMX to something reasonable.
我认为要做到这一点,您需要重新编写对象名称,以免它们发生冲突。
正如您所说,服务器 S1 将在 P1 上运行,对于传入的请求,将它们转发到相应的 Tomcat T1 和 T2。
如果您有例如
tomacat:key1=value1
作为对象名,那么您可以在代理服务器 S1 上将其公开为tomcat:server=T1,key1=value1
作为第一个真实服务器第二个是tomcat:server=T2,key1=value1
。I think to do this you would need to re-write the object names so that they don't clash.
The server S1 would run on P1 as you say, and for requests coming in, forward them to the respective tomcats T1 and T2.
If you have e.g.
tomacat:key1=value1
as objectname, then you could expose that on your proxyserver S1 astomcat:server=T1,key1=value1
for the first real server andtomcat:server=T2,key1=value1
for the second.如果您的最终目标是易于监控或合并统计数据的能力,那么请查看 Evident ClearStone
If you end goal is ease of monitoring, or ability to combine stats, then look into Evident ClearStone