New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JMX collector #364
Comments
If someone can provide the basics (i.e. connect to JVM, get the metrics of interest, etc), I can turn it into a netdata plugin. It can be written in any language (java included). |
A cheap thing might be to just copy the overall design that scout app uses and just port it to netdata.
|
@paulfantom this seems python too... |
@ktsaou already added to my list. Right after HAProxy and ElasticSearch. |
perfect! Please add redis too.. |
Ok, added. |
Back to this. Basically: JMX + python = No-go Also I don't think this module can have autodetection, it will need to be configured by user. I need to know if I can start working on jolokia module or maybe someone have better approach? |
So JMX can be directly accessed by what? java? |
There is something that is called JMX is written in such way that it is very easy to be accessed by java, but it is almost impossible to be accessed by anything else. At least that is what I found. |
I second Jolokia. We have our own in-house metrics collector made in Scala (JVM), developed before telegraf was a thing, and we do use Jolokia instead of JMX. It's very easy to add Jolokia to any JVM based project (it's a JAR drop-in) and extra benefit is that it open tons of options in terms of metrics collections, monitoring, alerting... I doubt any JVM admin would object in using Jolokia. |
never seen or heard of Jolokia, but conceptually on board with this sort of thing. Seems like a great option. Of course there are always alternatives that can be entertained down the road. |
If the Jolokia agents have discovery enabled, we can have auto-discovery. |
Found something much simpler compared to Jolokia. JMXProxy Just get the jar running anywhere and query it with host and JMX port for said Java process and get JSON full of metrics. |
Big fan of Jolokia ! |
I took a look at this too... Yes, it would be possible to use Jolokia / JMXProxy. But I do not see the need adding an layer. When using such a program the data flow would be It is possible to write an custom JMX client which connects to a JVM and works as a netdata plugin. This may be faster but requires adding a java plugin to netdata. EditA tutorial how to create a client (http://docs.oracle.com/javase/tutorial/jmx/remote/custom.html) |
hope anybody's work about monitor jvm on netdata. |
I am not (sorry). If anyone is working on this, please let us know of your progress. I would also love to have this plugin. Keep in mind it can be written in any language (including java). We just need someone willing to spend some time to model the basics. If we have the basic structure, I think a lot of people will step in (including me). |
I am currently working on a Netdata Java Plugin Daemon and I added an initial JMX Plugin. |
@simonnagl wow! |
Yes, this is working. It publishes one chart to netdata, monitoring the loaded java classes of the deamon itself. More configuration can be added to collect other Simple Managed Beans getters which return Long or Integer. |
I will give it a try as I am installing today NetData |
Great, if you need help or somethings not working just ask. Remember I not yet released 1.0.0 so it can be considered beta. |
I configured the netdata app to use the java jmx plugin. Not sure how it is supposed to behave and how do i see the charts? |
Have you done those steps? git clone https://github.com/simonnagl/netdata-plugin-java-daemon.git
cd netdata-plugin-java-daemon
mvn package
cp src/main/sh/java.d.plugin /your/netdata/plugin/dir # Most likely /usr/libexec/netdata/plugins.d/
cp -r config/* /your/netdata/config/dir # Most likely /etc/netdata
cp target/java-daemon-0.1.0-SNAPSHOT.jar /tmp After a restart of netdata you should as least see the metrics of the plugin itself. (Section jmx) As more users are interested in trying this plugin I will write a proper installer which works like |
/opt/netdata/netdata-configs/java.d/java.d |
How did you install metadata? Then the files you mentioned should go there:
|
The project now has an auto installer. It needs to be run with the same privilege and config options as the netdata installer.
It would be very helpful if someone could give feedback if he sees charts after running the installer. |
Hi @simonnagl , I found the dead link on the page https://github.com/simonnagl/netdata-plugin-java-daemon under Configuration. There is a link "JmxPluginConfiguration" in the table under "Schema" and it 404s. #2808 sounds very promising, I'll try it out as soon as it is ready and give you feedback! |
Hi @mmohrwinkel. This link will be dead until #2808 got merged. |
@simonnagl: Your solution for gathering JMX statistics spawns a side-by-side JVM which then connects with the target JVM. What is the overhead of running an extra JVM vs. using the earlier proposed jolokia solution? Thanks for your work, BTW. |
Sorry for the late answer. |
@ilyam8 kind reminder, please update this issue (and/or close it) when we're ready to proceed with a Golang-based module for JMX monitoring. |
@cosmix ist there a plan to implement a golang-based module for JMX? Do you want to build this based on Jolokia? |
@simonnagl hello, yes there is a plan to build a Golang-based collector for JMX. We are still exploring the potential solution space as to how to do it; most likely we won’t be requiring Jolokia. |
Is this stopped? any updates? |
@ki0 no, there is no updates unfortunately. |
@paulfantom I know this is belated, but what issue were you having with getting JPype running? As far as I am aware JPype should be able to talk to JMX. Though we currently can't extend a Java class it is possible to implement an interface. And simply calling Java methods should be no issue at all. |
@Thrameos sorry, I don't remember. My last take on this was over 4 years ago and I no longer use nor work on the project. |
Closing this feature request and moving it to our community forum for further discussion (link will be posted soon). |
JVM based application are widely used so be able to monitor their stats can be very useful
The text was updated successfully, but these errors were encountered: