0

I am stuck at this from 2 days.I have used rrdtool before with success.

This one I just can't fix so far.

I have created a rrd file,

rrdtool create /var/www/cacti/rra/LUN372.rrd \
-s 300 \
DS:hlwanspeed:GAUGE:1200:0:120000 \
DS:sanspeed:GAUGE:1200:0:120000 \
DS:wanspeed:GAUGE:1200:0:120000 \
RRA:AVERAGE:0.5:1:1500 

Then I run a cron job to update it

*/5 * * * * /root/rpa/ted.sh

But I get all the NaN values

last_update = 1405442886
header_size = 1208
ds[hlwanspeed].index = 0
ds[hlwanspeed].type = "GAUGE"
ds[hlwanspeed].minimal_heartbeat = 1200
ds[hlwanspeed].min = 0.0000000000e+00
ds[hlwanspeed].max = 1.2000000000e+05
ds[hlwanspeed].last_ds = "0"
ds[hlwanspeed].value = 0.0000000000e+00
ds[hlwanspeed].unknown_sec = 0
ds[sanspeed].index = 1
ds[sanspeed].type = "GAUGE"
ds[sanspeed].minimal_heartbeat = 1200
ds[sanspeed].min = 0.0000000000e+00
ds[sanspeed].max = 1.2000000000e+05
ds[sanspeed].last_ds = "0"
ds[sanspeed].value = 0.0000000000e+00
ds[sanspeed].unknown_sec = 0
ds[wanspeed].index = 2
ds[wanspeed].type = "GAUGE"
ds[wanspeed].minimal_heartbeat = 1200
ds[wanspeed].min = 0.0000000000e+00
ds[wanspeed].max = 1.2000000000e+05
ds[wanspeed].last_ds = "981976"
ds[wanspeed].value = NaN 

Need help here.

best Regards,

W

  • mostly it is for the wanspeed it is coming as NaN – user3536147 Jul 15 '14 at 16:56
  • This is fixed now, "rrdtool create /var/www/cacti/rra/LUN372.rrd -s 300 DS:hlwanspeed:GAUGE:600:0:U DS:sanspeed:GAUGE:600:0:U DS:wanspeed:GAUGE:600:0:U RRA:AVERAGE:0.5:1:1500" , this fixed it, But why ? Not sure – user3536147 Jul 16 '14 at 16:11

2 Answers2

1

You specified a max speed of ds[wanspeed].max = 1.2000000000e+05 while your last update was ds[wanspeed].last_ds = "981976" and since 981,976 > 120,000 rrdtool refuses the update stores NAN. In your 'fixed' version you just removed the upper limit by settinx ds[wanspeed].max to U which disables the input validation for high values.

Tobi Oetiker
  • 1,842
  • 13
  • 12
0

fixed now,

rrdtool create /var/www/cacti/rra/LUN372.rrd -s 300 DS:hlwanspeed:GAUGE:600:0:U DS:sanspeed:GAUGE:600:0:U DS:wanspeed:GAUGE:600:0:U RRA:AVERAGE:0.5:1:1500" ,

this fixed it,

But why ? Not sure