I came across two options when googling my way over the internet:
JRobin seems to be really outdated. The latest release of JRobin is 1.5.9 (released on 05/09/2008), since RRD4J is a port of JRobin they are kind of the same. I tried using RRD4J but somehow RRDTool does not recognise the files produced, so I did not bother trying JRobin.
My question is, whether there are any alternatives to these libraries? I don't want to use JNI or calling the rrdtool binaries manually.
There seems to be even an other one : java-rrd. i don't have the slightest idea of its advancement state.
Here is an interesting paragraph from the RRD4J wiki:
RRD4J RRD files are portable, RRDTool files are not. Try to copy a
RRDTool file from Linux to Windows platform and fetch data from it. It
does not work! But with RRD4J you are free to create your RRD files on
Solaris and transfer them to Windows or Linux platform for further
processing. It works! That is why I had to define my own file format
which is different from the format used in RRDTool - there is no point
in creating portable Java application backed by non-portable data
files.
Important for us: RRDTool itself is not portable across different platforms/operating systems. So how should we expect any java based library to be compatible to something which doesn't have a stable data format?
last time I use improved the basic JRobin-variant. It was originally most advanced for my needs. Then a lot of fixes are added (jcolelctd, SNMP, SVG, cron-jobs, ...), many bugs are fixed/refactored (JMX, http-, xml-, log-import, WEbGui,... ). Currently it's alredy used in production. The greatest is - its works on many OS identically! Sometime even faster as Oetiker's version.
The latest changes/version is represented on the http://code.google.com/p/rrdws/.
Pls let me know, if you decide to use it......
Feel free to disturb me for any questions!
Update: as commented by its author, jmxtrans is using shell invocations to rrdtool ( see RRDToolWriter.java ). An JRobin is not compatible with rrdtools, so you can't go this way.
JMXTrans is capable of outputting its information into RRD format. It uses JRobin 1.5.9 internally. Take a look at their source code to see exactly what they are doing.