Reputation: 39
I am working with a lot of rrd files, and I just noticed that some of my rrd graphs show empty graphs despite having a very recent lastupdate. I just did a rrdtool info on my rrd files, and found something interesting. In the rrd files that have empty files, their values are 0. Here is an example:
devserv161
rra[0].rows = 100000
ds[FLUSHER_READ].minimal_heartbeat = 480
ds[WRITE].last_ds = 2030.10630219402
rra[0].cdp_prep[1].unknown_datapoints = 0
ds[WRITE].type = GAUGE
ds[WRITE].index = 1
rra[0].cf = AVERAGE
ds[FLUSHER_READ].unknown_sec = 15
step = 80
rra[0].cdp_prep[2].unknown_datapoints = 0
ds[FLUSHER_READ].value =
ds[WRITE].max =
rra[0].pdp_per_row = 1
ds[FLUSHER_READ].index = 2
ds[READ].type = GAUGE
rrd_version = 0003
rra[0].cdp_prep[1].value =
ds[READ].unknown_sec = 15
ds[WRITE].minimal_heartbeat = 480
last_update = 1428948095
ds[READ].min =
header_size = 1208
ds[READ].minimal_heartbeat = 480
ds[WRITE].unknown_sec = 15
ds[FLUSHER_READ].type = GAUGE
ds[WRITE].value =
rra[0].cur_row = 53085
rra[0].cdp_prep[0].unknown_datapoints = 0
ds[READ].max =
ds[FLUSHER_READ].max =
ds[FLUSHER_READ].min =
ds[READ].index = 0
rra[0].cdp_prep[0].value =
rra[0].xff = 0.999
ds[READ].value =
ds[WRITE].min =
ds[READ].last_ds = 1417.90542990501
filename = devserv161.rrd
rra[0].cdp_prep[2].value =
ds[FLUSHER_READ].last_ds = 74.1351542318656
Any help as to why the .values are 0 as opposed to having a value would be greatly appreciated. New values are added around every 10 minutes.
Upvotes: 0
Views: 856
Reputation: 4072
If the value in the RRA are zero (as opposed to Unknown) then this means that you are storing zeros in the DS.
If you have a DS Type of 'counter' or 'derive', when the actual data is of type 'gauge', then you ned up storing zeros. However in your case, your DS are of GAUGE type, so this is not the case.
If you try to store a value outside the min/max for a DS, then it will store an Unknown. Similarly, if you leave too longe between updates and the heartbeat expires, then it will also store Unknown.
While your graphing function may be set to display Unknowns as zero, resulting in an empty graph, you tell us that you have no Unknown datapoints, and the values in the RRA are actually zero. Therefore, you must be accidentally setting zeros.
You should examine your update code, and possibly log the values being written or the rrdupdate command line to a separate debug text file. You will probably find that you are updating with zero, or are using incorrect syntax for the rrdupdate resulting in a zero update.
Upvotes: 0