Cannot graph negative values.

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
burrymgee
Posts: 2
Joined: Tue Feb 25, 2003 7:15 pm

Cannot graph negative values.

Post by burrymgee »

I am having trouble graphing negative values on some weather graphs.

Here are my rrdcreate and rrdgraph lines:


/usr/bin/rrdtool create \
/home/httpd/htdocs/cacti///rra/weatherbug.rrd \
--step 300 \
DS:currenttemp:GAUGE:600:-50:100 \
DS:windspeed:GAUGE:600:0:200 \
DS:barometric:GAUGE:600:-50:100 \
DS:humidity:GAUGE:600:0:100 \
DS:hightemp:GAUGE:600:-50:120 \
DS:lowtemp:GAUGE:600:-50:120 \
DS:dewpoint:GAUGE:600:-50:100 \
DS:windchill:GAUGE:600:-50:100 \
RRA:AVERAGE:0.5:1:600 \
RRA:AVERAGE:0.5:6:700 \
RRA:AVERAGE:0.5:24:775 \
RRA:AVERAGE:0.5:288:797 \
RRA:MAX:0.5:1:600 \
RRA:MAX:0.5:6:700 \
RRA:MAX:0.5:24:775 \
RRA:MAX:0.5:288:797 \



/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start="-86400" \
--title="Weather2" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--vertical-label="" \
DEF:a="/home/httpd/htdocs/cacti///rra/weatherbug.rrd":windchill:AVERAGE \
LINE1:a#FF0000:"windchill = 7"


I get negative values on the text when I have <windchill> in the legend, but the graph
only goes to 0. I have tried having autoscale on and tried it without autoscale with a lower
limit of -40. Niether work.

Thanks in advance.
User avatar
bulek
Cacti Pro User
Posts: 854
Joined: Mon May 20, 2002 2:07 am
Location: Poland
Contact:

Post by bulek »

Default cacti code does not pass "--lower-limit" to rrdtool when autoscale is on. You can try the following patch:
http://www.raxnet.net/board/viewtopic.php?t=893

If this doesn't work there is possibility that cacti did not update rrd files definition (maybe you had minimum value set to 0 at first and after changing to -50 the changes have not been applied to rrd files). You can try rrdtool dump on weatherbug.rrd and check the limits for windchill.

- bulek
burrymgee
Posts: 2
Joined: Tue Feb 25, 2003 7:15 pm

Post by burrymgee »

Looks like is was a problem with cacti updating the rrd file.

Thanks for the help.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest