如何将 JMX 统计信息发布到单个远程服务器

发布于 2024-10-19 23:17:14 字数 500 浏览 2 评论 0原文

假设我有两个应用程序/tomcat T1T2,它们都启用了 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 技术交流群。

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

发布评论

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

评论(3

转身以后 2024-10-26 23:17:14

一种相当新的解决方案(与提出问题时相比)如下所示:

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/Monitoring

Basically you use StatsD to aggregate the stats and Metrics library to convert JMX to something reasonable.

梦初启 2024-10-26 23:17:14

我认为要做到这一点,您需要重新编写对象名称,以免它们发生冲突。
正如您所说,服务器 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 as tomcat:server=T1,key1=value1 for the first real server and tomcat:server=T2,key1=value1 for the second.

反目相谮 2024-10-26 23:17:14

如果您的最终目标是易于监控或合并统计数据的能力,那么请查看 Evident ClearStone

If you end goal is ease of monitoring, or ability to combine stats, then look into Evident ClearStone

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文