0

I am updating my RRD file with some counts...

For example:

time:       value:
12:00       120
12:05       135
12:10       154
12:20       144
12:25       0
12:30       23
13:35       36

here my RRD is updating as below logic:

((current value)-(previous value))/((current time)-(previous time))

eg. ((135-120))/5 = 15 but my problem is when it comes 0 the reading will be negative:

((0-144))/5

Here " 0 " value comes with system failure only( from where the data is fetched)..It must not display this reading graph.

How can I configure like when 0 comes it will not update the "RRD graph" (skip this reading (0-144/5)) and next time it will take reading like ((23-0)/5) but not (23-144/10)

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Jatin Bodarya
  • 1,425
  • 2
  • 20
  • 32

1 Answers1

0

When specifying the data sources when creating the RRD, you can specify which range of values is acceptable.

DS:data_source:GAUGE:10:1:U will only accept values above 1. So if you get a 0 during an update, rrd will replace it with unknown and i assume it can find a way to discard it.

lolesque
  • 10,693
  • 5
  • 42
  • 42