How can you properly read RRD files using Java? We are using tools like JRobin, etc. but my team is having problems with those tools, they don't seem to properly read the RRD files. We need to use RRDTool, and that tool is an importable library for Python.
-
Have you considered rewriting the API yourself, if there are issues? Are you haveing to consume RRD files produced by an external program? – Joseph Ottinger Apr 02 '11 at 12:02
-
Actually after giving it a lot of thought, we have decided to go with Python. – Shankar Raju Apr 02 '11 at 22:50
3 Answers
You could try using JPython to bridge it to Java.
But the easiest is probably to either use Python, or fix the bygs in JRobin. It's open source after all.

- 167,292
- 41
- 224
- 251
use the "rrdtool -" pipe interface and use the real rrdtool to access the files.

- 5,167
- 2
- 17
- 23
Original documetation from RRDTools site describe common way to export/import any database:
To transfer an RRD between architectures, follow these steps:
1. On the same system where the RRD was created, use rrdtool
dump to export the data to XML format.
2. Transfer the XML dump to the target system.
3. Run rrdtool restore to create a new RRD from the XML dump.
See rrdrestore for details.
I can confirm exactly the same functionality on JRobin, a Java port of RRDTool by Sasa Markovic.. I tested it carefully for forked RRD-ws project. In most cases its works fine for Java(Jrobin) <-> Nativ(RRDTools), as well as Linux <-> Solaris <-> Windows.
So possible way then : 1) Export (dump) native RRD database 2) Read it (restore) via JRobin as Jrobin-DB 3) use Jrobin-API
PS
feel free to post your troubles into rrdws issue database.

- 44
- 4