Hello -<br>
<br>
I have a single RRD file that has the value 100 in places. Whenever my
monitoring sees an error (probes every 5 mins), it pushes a 100 into an
rrd file. I am trying to figure out how many times this value is in a
given time range.<br>
<br>
For example:<br>
<br>
rrdtool graph images/error.gif -a PNG --start $start --end $end<br>
DEF:yellowhours=$yellowrrd:data:AVERAGE<br>
CDEF:YELLOWNone=yellowhours,0,0,LIMIT,UN,UNKN,INF,IF<br>
AREA:yellowhours#FFFF44:"Errors "<br>
<br>
Shows a nice graph, with a few yellow strips. I can then overlay this on, response times, or anything else.<br>
But to count up the number of errors, I seem to not be able to do. Any help would be great.<br>
<br>
I have tried doing a few things with CDEF and VDEF to get the count, like:<br>
<br>
CDEF:foo=yellowhours,yellowhours,/ <-- to get the the values in the array set to one. - should make adding up the array easy.<br>
<br>
VDEF:max=foo,TOTAL <-- hopefully to get the total of everything in
the foo array.. after reading what TOTAL is, this did not work. I
thought I might do something like max=foo,TOTAL,<stepsize>,/ and
divide the value by the stepsize, but I get : Unknown function string
'TOTAL,180,/<br>
<br>
I was thinking about use Sort on the array and when I see a 0, Push up a
count - but I am not sure how many values will be in the array.<br><br>Thanks for any advise on how to proceed.<br><br>-mathew<br>