[smokeping-users] RRD max value hardcoded to 180

Adrian Popa adrian_gh.popa at telekom.ro
Mon Jun 8 15:03:01 CEST 2015

Hello everyone!

I'm writing some custom plugins for smokeping that don't measure time, 
but measure bps (one plugin does periodic speedtests with 
speedtest.net). The values returned are usually in the 10^6 range (Mbps).

I noticed that the plugin works correctly, returns the data in the 
correct format, but it doesn't get stored in the rrd:

ds[ping1].index = 3
ds[ping1].type = "GAUGE"
ds[ping1].minimal_heartbeat = 7200
ds[ping1].min = 0.0000000000e+00
ds[ping1].max = 1.8000000000e+02
ds[ping1].last_ds = "2.3910000000e+08"
ds[ping1].value = NaN
ds[ping1].unknown_sec = 92

last_ds is correct, but I guess rrdtool ignores it because it's higher 
than "max".

I've looked in the code where it sets the max value, and it's hardcoded 
to 180:

Smokeping.pm:560: "DS:median:GAUGE:".(2*$step).":0:180",
Smokeping.pm:561:                              (map { 
"DS:ping${_}:GAUGE:".(2*$step).":0:180" }

I wonder - why is the need to hardcode it to 180? I understand most 
probes are fast and return small numbers, but -  is there any benefit 
from setting a max value, and not setting max to "U"?

I will change my code to have it set to U and report back if the problem 
persists (I expect there will be problems with the Y scale, but we'll see...


More information about the smokeping-users mailing list