jakewins
jakewins

Reputation: 1003

Rrd4j persistence

I am using rrd4j to do what rrd4j does, and it works great. However, if I shut down my app and start it back up again, the data from the previous session will be gone.

I am using a normal file backend, like so:

RrdDef rrdDef = new RrdDef( "/path/to/my/file", 3000 );

Is there a setting or something I need to trigger to make rrd4j load the data from the previous session?

Upvotes: 2

Views: 649

Answers (1)

nawroth
nawroth

Reputation: 4361

Seems you should use RrdDb("/path/to/my/file") instead. From Javadocs:

RrdDb(java.lang.String path): Constructor used to open already existing RRD in R/W mode, with a default storage (backend) type (file on the disk).

And also:

RrdDb(RrdDef rrdDef): Constructor used to create new RRD object from the definition.

Upvotes: 3

Related Questions