Using JMXTrans with Graphite

385 views
Skip to first unread message

chetan...@gmail.com

unread,
May 12, 2015, 4:23:07 AM5/12/15
to jmxt...@googlegroups.com
Not sure if anyone has tried this, but when we are pushing JMX data to Graphite using JMXTrans and if we happen to restart the Grahpite service. what is expected to happen?

It was observed by the team that Graphite was not able to receive any data from JMXTrans until we restarted JMXTrans service, now is this accepted or not?

Please has anyone faced issues like this, or can think or an issue like this and a solution for the same?

The idea is that even after starting the Grahpite the JMXtrans should continue posting the data to the Graphite with the data lost for the time when Graphite was down.

Martin Grotzke

unread,
May 12, 2015, 4:36:02 AM5/12/15
to jmxt...@googlegroups.com

We observed the same for embedded jmxtrans.

Cheers,
Martin

--
You received this message because you are subscribed to the Google Groups "jmxtrans" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jmxtrans+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Andrew Yourn

unread,
May 12, 2015, 4:39:01 AM5/12/15
to jmxt...@googlegroups.com
hi  there,

Im running the following 



jmxtrans --> groffenrelay --> carbon a/carbon b and do not have these issues

I seem to recall jmxtrans and carbon being a bit how you going.... so to speak.

jmxtrans however is supporting jmxmp and dynamic lists/maps of values so its bringing the fu for my problem !!








Date: Tue, 12 May 2015 01:23:07 -0700
From: chetan...@gmail.com
To: jmxt...@googlegroups.com
Subject: Using JMXTrans with Graphite

Guillaume Lederrey

unread,
May 12, 2015, 5:08:39 AM5/12/15
to jmxt...@googlegroups.com
Hello !

JmxTrans *should* be robust to this kind of problems. There has been some refactorings in the way connections are validated lately (https://github.com/jmxtrans/jmxtrans/blob/master/jmxtrans-core/src/main/java/com/googlecode/jmxtrans/connections/SocketFactory.java). Are you using a recent version of JmxTrans ? We are using JmxTrans with Graphite and have not seen such problems for a fairly long time (though we did see it before refactoring the connections).

I'll try to have a deeper look into this and see if I can spot an issue.
--
mobile : +41 76 573 32 40
skype : Guillaume.Lederrey

projects :
* http://rwanda.ledcom.ch/
* http://trock.ch/
others :
* http://kiva.org/

Cyrille Le Clerc

unread,
May 13, 2015, 2:15:13 PM5/13/15
to jmxt...@googlegroups.com
Hello Martin,

As Guillaume replied for jmxtrans, I am very surprised that you could face such issue with embedded-jmxtrans. I checked the code today and I did not see any weakness.

I did a test on a standalone server that successfully reconnected to a Graphite server:
  1. Start carbon-cache + graphite web-app
  2. start a java web-app with embedded-jmxtrans outputting to carbon-cache with the GraphiteWriter (Plain Text TCP)
  3. Verify that embedded-jmxtrans logs are OK and that metrics appear in Graphite
  4. Stop carbon-cache
  5. Verify that embedded-jmxtrans fails to send metrics to Graphite. The following message appear in the logs of the java webapp "[jmxtrans-export-2] WARN  o.j.embedded.output.GraphiteWriter - Failure to send result to graphite server 'HostAndPort{host='localhost', port=2003}' with null java.net.ConnectException: Connection refused" every "exportIntervalInSeconds" (5 secs in my test)
  6. Restart carbon-cache
  7. Verify that the warning message "Failure to send result to graphite server..." no longer appears in the logs of the java web-app
  8. Verify in Graphite web console that new metrics are received by Graphite

Can you give us more details?

Cyrille

chetan...@gmail.com

unread,
May 18, 2015, 1:53:56 AM5/18/15
to jmxt...@googlegroups.com
Hello Guillaume,

Sorry for the delay in replying to this post.

We had downloaded the JMXTrans from the following URL:  https://code.google.com/p/jmxtrans/wiki/Installation.

The SocketFactory class that you are mentioning, does it help reconnect to Graphite if the Graphite restarts?

Any inputs would be helpful.

Regards,
Chetan

Guillaume Lederrey

unread,
May 18, 2015, 2:42:52 PM5/18/15
to jmxt...@googlegroups.com
I do not see the download link from the page you reference. You can download the latest version from Maven central (http://search.maven.org/#artifactdetails|org.jmxtrans|jmxtrans). Current latest version is 250, available at http://search.maven.org/#artifactdetails|org.jmxtrans|jmxtrans|250|

I'm not sure which exact version you are using, so hard to tell if it is before or after the corrections to the SocketFactory.

vamsi Krishna

unread,
Mar 11, 2016, 5:47:03 AM3/11/16
to jmxtrans
Hi,

I am using jmxtrans version 250 and am facing this issue. Whenever we restart jboss, we are forced to restart JMXTrans to view the results in graphite.


Regards,
Vamsi K
Reply all
Reply to author
Forward
0 new messages