integrating graphite and javasimon

Asked by Andre Parodi

Hi,

I have an application that is currently instrumented with javasimon (http://code.google.com/p/javasimon/). This library provides all the counters and aggregation functionality. I am currently plotting this data with nagios by polling my hosts every 5 minutes.

I would like to send the data to graphite but I am unable to understand how to do that. The documentation pages I have found don't detail the methods (http://graphite.wikidot.com/getting-your-data-into-graphite and http://readthedocs.org/docs/graphite/en/1.1/feeding-carbon.html). What I can understand from reading other posts is that there are 3 ways: plain text, pickle and amqp.

Is there a good place for me to get started trying to send data to graphite?
What is the preferred protocol for sending data from java?

apologies if this answer is already in another post. I searched a bit but couldn't find it.

thanks
andre

Question information

Language:
English Edit question
Status:
Answered
For:
Graphite Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Michael Leinartas (mleinartas) said :
#1

Try this link for the readthedocs.org documentation instead: http://readthedocs.org/docs/graphite/en/latest/feeding-carbon.html
The 1.1 version of that doc doesn't have any content..

The recommended way to get data into graphite is using the text method. The page above has an example of how to use netcat (nc) to experiment with manually feeding data from the commandline. Telnet will work for this as well.

If you're looking to pull the data via JMX and feed it into graphite, the jmxtrans project could help: http://code.google.com/p/jmxtrans/

If you're instead planning on writing a callback for javasimon to send data to graphite, the implementation should be pretty simple: Construct the metric string (the 3-tuple), open a connection to graphite, send the string.
I

Revision history for this message
Steve Keller (skeller-ea) said :
#2

You will need to add a custom script into Nagios as a performance data handler. You will also have to enable performance data processing.

Read this description of how to enable nagiosgraph: http://nagiosgraph.svn.sourceforge.net/viewvc/nagiosgraph/trunk/nagiosgraph/README.html#configuring_data_processing

Instead of using the nagiosgraph script (insert.pl), use your own script to insert data to Graphite. Or, if you are already using nagiosgraph, use a shell script to call both processes, which ensures that you get RRD files in Nagios and also send the data to carbon. I recommend the batch processing approach.

In our Nagios based installation (we actually use Opsview), we send 300-400 data points to carbon every 10 seconds or so, from each Opsview master server. This works very well in our environment.

Can you help with this problem?

Provide an answer of your own, or ask Andre Parodi for more information if necessary.

To post a message you must log in.