<p><a href="https://en.wikipedia.org/wiki/Java_Management_Extensions" rel="nofollow">https://en.wikipedia.org/wiki/Java_Management_Extensions</a></p>
<p>There is a less maintained lib, but it only provides read capability.
<a href="https://github.com/davecheney/gmx" rel="nofollow">https://github.com/davecheney/gmx</a></p>
<hr/>**评论:**<br/><br/>tv64738: <pre><p>Let's not call the concept of exporting metrics "JMX".</p>
<p>Also, might as well make it a Prometheus exporter.</p></pre>tex0: <pre><p>JMX is much more than metrics. But sure what OP is trying to say.</p></pre>wanghq: <pre><p>Exactly. I find that somehow I need two way communication, e.g. enable the detailed debugging on this host for a minute. AFAIK, Prometheus is not capable of "Consulting and changing application configuration" </p>
<p><a href="https://docs.oracle.com/javase/8/docs/technotes/guides/jmx/index.html" rel="nofollow">https://docs.oracle.com/javase/8/docs/technotes/guides/jmx/index.html</a></p>
<blockquote>
<p>Typical uses of the JMX technology include:
1. Consulting and changing application configuration
2. Accumulating statistics about application behavior and making them available
3. Notifying of state changes and erroneous conditions.</p>
</blockquote></pre>tv64738: <pre><p>Perhaps, but gmx ain't.</p></pre>titpetric: <pre><p>You can export pprof data to prometheus, so everything you need is already there, you just need to enable it. In fact Prometheus profiles itself with pprof, since it's written in Go.</p></pre>tex0: <pre><p>As far as I know the Prometheus Go client makes no use of pprof.</p></pre>Redundancy_: <pre><p>Have you looked at something like <a href="https://stackimpact.com/" rel="nofollow">https://stackimpact.com/</a> ?</p></pre>hollafi: <pre><p>Maybe check out expvar.</p></pre>hobbified: <pre><p>Do you need it for Java? Not as far as I can tell.</p></pre>wanghq: <pre><p>Sorry for the ambiguous description. I need a JMX like thing which works for Go so I can view and change my application stats.</p></pre>hobbified: <pre><p>Yes, and my point was that it's a lousy idea in Java, which makes it twice as lousy an idea in Go, because it doesn't even have the peer-pressure excuse. For viewing, you might want to use expvar, which is in the core and has integrations with some things. For changing configs... no, don't just casually do that. Don't even think about using a thing that makes it easy :)</p></pre>
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
0 回复
- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码`
- 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传