[rrd-users] LAST always returning zero
wespvp at msg.bt.com
Fri Mar 7 01:42:02 CET 2008
I have a data source defined as a GAUGE that is fairly static - it is always
a zero or a one, and does not change frequently. It represents the state of
a queue - disabled or enabled. When I graph it, the graph is always
correct. GPRINT MAX is always right. However, LAST usually, but not always
Data points are generated every 10 seconds.
The definition (removing multiple queue definitions) is:
/usr/local/rrdtool/bin/rrdtool create /var/log/queues --start 1204404266 -s
The value of ³_enabled² is 0 for disabled and 1 for enabled. I want the
graph to be non-zero if the queue is disabled.I call the graph with
(removing multiple queues):
/usr/local/rrdtool/bin/rrdtool graph /var/graphs/queues.png -a PNG -l 0 -t
"Disabled Queues" \
AREA:queue1N#00FF00:"Queue 1" \
--upper-limit 4 --vertical-label "Disabled Queue Count" -w 400 -h 100 -s
"now-2h" -e "now"
The CDEF is essentially a NOT¹. I¹ve tried printing the raw values without
the CDEF IF, and they are always zero (not nan) - yes, 0, not 1. I¹ve tried
removing the ³-e² and that didn¹t help. The only thing that seems to get it
reasonably reliable is to specify ³-e now-30s².
If I print MAX instead of LAST, it is always correct.
How do I get it to properly display the correct latest value? Am I
overlooking something above? I¹ve got about three dozen other graphs that
have dynamic data and all display LAST correctly.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rrd-users