As I understand the problem, you are trying to calculate the ratio of
used blocks over available blocks, which is totalBlocks minus filesystem
overhead. Taking Zenoss out of the equation for the designs. You are
dealing with two SNMP data points, (usedBlocks and totalBlocks) and a
fixed adjustment value. If you were to manually record this you might
create an RRD file like this:
rdtool create fileSystem_fileSystem.rrd -s 300
DS:ds0totalBlocks:GUAGE:900:U:U
DS:ds1usedBlocks:GUAGE:900:U:U
RRA:AVERAGE:0.5:1:2016
(more RRA statements).......
In this case both data points are recorded in a single RRD file. You
could use compute to create a third data source by adding:
DS:ds2blockRatio:COMPUTE:ds0totalBlocks,.9,*,ds1usedBlocks,-
The important thing to realize is that the RRD file is unaware of
anything outside of it, so you have to have all your values inside of it
to use the COMPUTE data source type.
If you need to use multiple RRD databases, you will need to do the
computation while reporting (or generating the graph) using the CDEF
function.
We use several calculated graphs.
We are still running an older version of Zenoss (2.0.6) until our change
management window comes, so the implementation may have changed a bit in
the newer versions.
Calculating pages per hour for a printer:
We selected a single data point (pageCount_pagePerHour) in this graph.
By selecting the datapoint above, there is the implied command:
Our custom graph command is:
HRULE:1080#FF0000:50% Utilization
CDEF:totalPageCount=pageCount_pagePerHour,3600,*
AREA:totalPageCount#00cc00:Page Per Hour
To get a graph of all of our HP printers, we would use:
rrdtool graph /tmp/graphs/20071101-HPPrinterUtilization.png
--start=e-30d --end="12am 11/01/07" --width=720 --upper-limit=1100
--rigid --lower-limit=0 --rigid --vertical-label="Pages/Hour"
--title="HP Printer Utilization"
DEF:ds0P01=/opt/zenoss/perf/Devices/printer-11.domainname.com/pageCount_pagePerHour.rrd:ds0:AVERAGE
DEF:ds0P02=/opt/zenoss/perf/Devices/printer-12.domainname.com/pageCount_pagePerHour.rrd:ds0:AVERAGE
DEF:ds0P03=/opt/zenoss/perf/Devices/printer-13.domainname.com/pageCount_pagePerHour.rrd:ds0:AVERAGE
DEF:ds0P04=/opt/zenoss/perf/Devices/printer-2.ssaihq.com/pageCount_pagePerHour.rrd:ds0:AVERAGE
DEF:ds0P05=/opt/zenoss/perf/Devices/printer-3.ssaihq.com/pageCount_pagePerHour.rrd:ds0:AVERAGE
DEF:ds0P06=/opt/zenoss/perf/Devices/printer-4.ssaihq.com/pageCount_pagePerHour.rrd:ds0:AVERAGE
DEF:ds0P07=/opt/zenoss/perf/Devices/printer-9.ssaihq.com/pageCount_pagePerHour.rrd:ds0:AVERAGE
DEF:ds0P08=/opt/zenoss/perf/Devices/printer-acc-1/pageCount_pagePerHour.rrd:ds0:AVERAGE
DEF:ds0P09=/opt/zenoss/perf/Devices/printer-acc-3/pageCount_pagePerHour.rrd:ds0:AVERAGE
DEF:ds0P10=/opt/zenoss/perf/Devices/printer-acc-4.domainname.com/pageCount_pagePerHour.rrd:ds0:AVERAGE
DEF:ds0P11=/opt/zenoss/perf/Devices/printer-acc-5.domainname.com/pageCount_pagePerHour.rrd:ds0:AVERAGE
DEF:ds0P12=/opt/zenoss/perf/Devices/printer-hr-2.domainname.com/pageCount_pagePerHour.rrd:ds0:AVERAGE
DEF:ds0P14=/opt/zenoss/perf/Devices/printer-hr-4.domainname.com/pageCount_pagePerHour.rrd:ds0:AVERAGE
"CDEF:rpn0S01=ds0P01,3600,*" "CDEF:rpn0S02=ds0P02,3600,*"
"CDEF:rpn0S03=ds0P03,3600,*" "CDEF:rpn0S04=ds0P04,3600,*"
"CDEF:rpn0S05=ds0P05,3600,*" "CDEF:rpn0S06=ds0P06,3600,*"
"CDEF:rpn0S07=ds0P07,3600,*" "CDEF:rpn0S08=ds0P08,3600,*"
"CDEF:rpn0S09=ds0P09,3600,*" "CDEF:rpn0S10=ds0P10,3600,*"
"CDEF:rpn0S11=ds0P11,3600,*" "CDEF:rpn0S12=ds0P12,3600,*"
"CDEF:rpn0S14=ds0P14,3600,*" "CDEF:rpn1S01=ds0P01,10800,*"
"CDEF:rpn1S02=ds0P02,10800,*" "CDEF:rpn1S03=ds0P03,10800,*"
"CDEF:rpn1S04=ds0P04,10800,*" "CDEF:rpn1S05=ds0P05,10800,*"
"CDEF:rpn1S06=ds0P06,10800,*" "CDEF:rpn1S07=ds0P07,10800,*"
"CDEF:rpn1S08=ds0P08,10800,*" "CDEF:rpn1S09=ds0P09,10800,*"
"CDEF:rpn1S10=ds0P10,10800,*" "CDEF:rpn1S11=ds0P11,10800,*"
"CDEF:rpn1S12=ds0P12,10800,*" "CDEF:rpn1S14=ds0P14,10800,*"
AREA:rpn0S01#99FFFF:printer-11 "GPRINT:rpn0S01:AVERAGE:avg\:%5.2lf"
"GPRINT:rpn1S01:AVERAGE:Wavg\:%5.2lf" "GPRINT:rpn0S01:MAX:max\:%5.2lf\j"
AREA:rpn0S02#99FFCC:printer-12:STACK
"GPRINT:rpn0S02:AVERAGE:avg\:%5.2lf"
"GPRINT:rpn1S02:AVERAGE:Wavg\:%5.2lf" "GPRINT:rpn0S02:MAX:max\:%5.2lf\j"
AREA:rpn0S03#99FF99:printer-13:STACK
"GPRINT:rpn0S03:AVERAGE:avg\:%5.2lf"
"GPRINT:rpn1S03:AVERAGE:Wavg\:%5.2lf" "GPRINT:rpn0S03:MAX:max\:%5.2lf\j"
AREA:rpn0S04#99FF66:printer-2:STACK "GPRINT:rpn0S04:AVERAGE:avg\:%5.2lf"
"GPRINT:rpn1S04:AVERAGE:Wavg\:%5.2lf" "GPRINT:rpn0S04:MAX:max\:%5.2lf\j"
AREA:rpn0S05#99FF33:printer-3:STACK "GPRINT:rpn0S05:AVERAGE:avg\:%5.2lf"
"GPRINT:rpn1S05:AVERAGE:Wavg\:%5.2lf" "GPRINT:rpn0S05:MAX:max\:%5.2lf\j"
AREA:rpn0S06#99FF00:printer-4:STACK "GPRINT:rpn0S06:AVERAGE:avg\:%5.2lf"
"GPRINT:rpn1S06:AVERAGE:Wavg\:%5.2lf" "GPRINT:rpn0S06:MAX:max\:%5.2lf\j"
AREA:rpn0S07#99CCFF:printer-9:STACK "GPRINT:rpn0S07:AVERAGE:avg\:%5.2lf"
"GPRINT:rpn1S07:AVERAGE:Wavg\:%5.2lf" "GPRINT:rpn0S07:MAX:max\:%5.2lf\j"
AREA:rpn0S08#99CCCC:printer-acc-1:STACK
"GPRINT:rpn0S08:AVERAGE:avg\:%5.2lf"
"GPRINT:rpn1S08:AVERAGE:Wavg\:%5.2lf" "GPRINT:rpn0S08:MAX:max\:%5.2lf\j"
AREA:rpn0S09#99CC99:printer-acc-3:STACK
"GPRINT:rpn0S09:AVERAGE:avg\:%5.2lf"
"GPRINT:rpn1S09:AVERAGE:Wavg\:%5.2lf" "GPRINT:rpn0S09:MAX:max\:%5.2lf\j"
AREA:rpn0S10#99CC66:printer-acc-4:STACK
"GPRINT:rpn0S10:AVERAGE:avg\:%5.2lf"
"GPRINT:rpn1S10:AVERAGE:Wavg\:%5.2lf" "GPRINT:rpn0S10:MAX:max\:%5.2lf\j"
AREA:rpn0S11#99CC33:printer-acc-5:STACK
"GPRINT:rpn0S11:AVERAGE:avg\:%5.2lf"
"GPRINT:rpn1S11:AVERAGE:Wavg\:%5.2lf" "GPRINT:rpn0S11:MAX:max\:%5.2lf\j"
AREA:rpn0S12#99CC00:printer-hr-2:STACK
"GPRINT:rpn0S12:AVERAGE:avg\:%5.2lf"
"GPRINT:rpn1S12:AVERAGE:Wavg\:%5.2lf" "GPRINT:rpn0S12:MAX:max\:%5.2lf\j"
AREA:rpn0S14#9999CC:printer-hr-4:STACK
"GPRINT:rpn0S14:AVERAGE:avg\:%5.2lf"
"GPRINT:rpn1S14:AVERAGE:Wavg\:%5.2lf" "GPRINT:rpn0S14:MAX:max\:%5.2lf\j"
HRULE:1080#FF0000:"Xerox Printer 50% Utilization per hour"
jervin wrote:
Does anyone have any custom RRD commands for creating data points that they're
willing to share?
Specifically, we need to be able to adjust the value of an SNMP OID after it's retrieved,
but before it gets committed to the RRD file. I have been searching high and low for a
way to do this, but there seems to be no documentation outside of the RRD documentation
itself on how to do this. More importantly, it doesn't look like the "COMPUTE"
type is available as an option within Zenoss when you create a data point.
Here's an example of what I would like to do:
1) Get the SNMP OID (in this case, usedBlocks)
2) Add a percentage of the ${here/totalBlocks} value to the usedBlocks
value--this is to compensate for filesystem overhead and would vary between 5%
and 10% depending on the system
3) Input the transformed value into the RRD file.
I was considering something like this:
DS:ds0:COMPUTE:${here/totalBlocks},.9,*,${here/fullRRDPath}/usedBlocksRaw_usedBlocksRaw.rrd:ds0,-
but the specific syntax is giving me difficulty. Is it possible to transform
values in this manner?
Thanks for any help,
James Ervin
UNC-Chapel Hill
-------------------- m2f --------------------
Read this topic online here:
http://community.zenoss.com/forums/viewtopic.php?p=14476#14476
-------------------- m2f --------------------
_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users
_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users