RRD4J-light

A high performance data logging system for time series data.

License

License

GroupId

GroupId

com.aerse
ArtifactId

ArtifactId

rrd4j-light
Last Version

Last Version

3.8
Release Date

Release Date

Type

Type

jar
Description

Description

RRD4J-light
A high performance data logging system for time series data.
Project URL

Project URL

https://github.com/dernasherbrezon/rrd4j-light
Source Code Management

Source Code Management

https://github.com/dernasherbrezon/rrd4j-light

Download rrd4j-light

How to add to project

<!-- https://jarcasting.com/artifacts/com.aerse/rrd4j-light/ -->
<dependency>
    <groupId>com.aerse</groupId>
    <artifactId>rrd4j-light</artifactId>
    <version>3.8</version>
</dependency>
// https://jarcasting.com/artifacts/com.aerse/rrd4j-light/
implementation 'com.aerse:rrd4j-light:3.8'
// https://jarcasting.com/artifacts/com.aerse/rrd4j-light/
implementation ("com.aerse:rrd4j-light:3.8")
'com.aerse:rrd4j-light:jar:3.8'
<dependency org="com.aerse" name="rrd4j-light" rev="3.8">
  <artifact name="rrd4j-light" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.aerse', module='rrd4j-light', version='3.8')
)
libraryDependencies += "com.aerse" % "rrd4j-light" % "3.8"
[com.aerse/rrd4j-light "3.8"]

Dependencies

compile (2)

Group / Artifact Type Version
com.sleepycat : je Optional jar 5.0.73
org.mongodb : mongo-java-driver Optional jar 3.4.2

test (2)

Group / Artifact Type Version
junit : junit jar 4.12
org.easymock : easymock jar 3.4

Project Modules

There are no modules declared in this project.

rrd4j-light

This is hard fork of the original rrd4j. This library supports only reading and writing rrd files.

Original rrd4j library has support for:

  • use XML for backend (org.w3c.dom.*)
  • render graphs (java.awt.*)

Unfortunately these APIs are not included into the Java 8 Embedded compact1 profile.

Using with Maven

Add this dependency to your project's POM file:

<dependency>
	<groupId>com.aerse</groupId>
	<artifactId>rrd4j-light</artifactId>
	<version>3.2</version>
</dependency>

Why RRD4J?

  • Portable files, RRDTool files are not
  • Simple API
  • Supports the same data source types as RRDTool (COUNTER, ABSOLUTE, DERIVE, GAUGE)
  • Supports the same consolidation functions as RRDTool (AVERAGE, MIN, MAX, LAST) and adds TOTAL, FIRST
  • Supports almost all RRDTool RPN functions (wiki/see RPNFuncs)
  • Multiple backends, e.g. use MongoDB as data store

Usage Example

import com.aerse.core.*;
import static com.aerse.DsType.*;
import static com.aerse.ConsolFun.*;
...
// first, define the RRD
RrdDef rrdDef = new RrdDef(rrdPath, 300);
rrdDef.addArchive(AVERAGE, 0.5, 1, 600); // 1 step, 600 rows
rrdDef.addArchive(AVERAGE, 0.5, 6, 700); // 6 steps, 700 rows
rrdDef.addArchive(MAX, 0.5, 1, 600);

// then, create a RrdDb from the definition and start adding data
RrdDb rrdDb = new RrdDb(rrdDef);
Sample sample = rrdDb.createSample();
while (...) {
    sample.setTime(t);
    sample.setValue("inbytes", ...);
    sample.setValue("outbytes", ...);
    sample.update();
}
rrdDb.close();

Go through the source of Demo for more examples.

Supported Backends

Next to memory and file storage, RRD4J supports the following backends (using byte array storage):

  • MongoDB - a scalable, high-performance, open source, document-oriented database.
  • Oracle Berkeley DB Java Edition - an open source, embeddable database providing developers with fast, reliable, local persistence with zero administration.

Clojure

Thanks to the rrd4clj project Clojure now has a RRD API (using RRD4J). Check out their examples.

Contributing

If you are interested in contributing to RRD4J, start by posting pull requests to issues that are important to you. Subscribe to the discussion group and introduce yourself.

If you can't contribute, please let us know about your RRD4J use case. Always good to hear your stories!

Graph Examples (from the JRDS project)

http://jrds.fr/_media/myssqlops.png

http://jrds.fr/_media/screenshots/meminforam.png

License

Licensed under the Apache License, Version 2.0.

Versions

Version
3.8
3.7