0

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.

Shankar Raju
  • 4,356
  • 6
  • 33
  • 52

3 Answers3

1

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.

Lennart Regebro
  • 167,292
  • 41
  • 224
  • 251
1

use the "rrdtool -" pipe interface and use the real rrdtool to access the files.

Tobi Oetiker
  • 5,167
  • 2
  • 17
  • 23
1

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.

ViPup
  • 44
  • 4