通过Golang访问JMX

huangapple go评论96阅读模式
英文:

Access JMX via Golang

问题

我需要通过TCP访问正在运行的进程的JMX。我无法在机器上安装第三方工具,如Jolokia,以便通过HTTP访问JMX。是否有一个库可以让Golang与JMX或Java RMI进行通信?是否有任何非JVM语言实现的JMX客户端可以作为我在Golang中进行移植的灵感?最好能够进行读写访问,但只进行只读访问也可以。

英文:

I need to access JMX of a running process via TCP. I can't install third party utilities on the machine such as Jolokia to make JMX accessible via HTTP. Is there a library that will let Golang speak JMX or Java RMI? Has a JMX client been implemented in any non-JVM language that I can use as inspiration for a Golang port? Both read and write access would be preferable but I'll settle for read-only.

答案1

得分: 2

不知道是否有一种方法可以在golang中与JMX进行交互而不使用jolokia。我使用了golokia项目进行了一些修改来实现这一点。

这是项目的链接,希望对你有帮助。

https://github.com/joaoh82/golokia

英文:

Don't know if there is a way to talk to JMX in golang without jolokia. I've done it using the golokia project which I forked and made some changes.

Here it is, hope it helps.

https://github.com/joaoh82/golokia

huangapple
  • 本文由 发表于 2017年2月27日 18:55:46
  • 转载请务必保留本文链接:https://go.coder-hub.com/42483968.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定