Re: [opennms-discuss] 95th percentile graphs?
Tarus Balog <tarus <at> opennms.org>
2007-11-01 15:40:12 GMT
On Oct 31, 2007, at 11:50 PM, Chris Hale wrote:
> I know I've seen this asked before, but has anyone been able to modify
> the interface graphs to include 95th percentile lines? As an upgrade,
> the TopN report would be helpful to report on the TopN 95th percentile
> interfaces, and only interfaces/nodes marked as customer.
>
> I'll just take the plain 95th % on the interface graphs for now,
> though.
It's pretty easy if you are using RRDtool. It's not yet in JRobin.
RRDtool 1.2 introduced the VDEF tag. JRobin, based on 1.0, has an
SDEF class which is similar, but we have not written the proper
translation to get this to work.
However, if you want, say, a bits in/out graph with 95th percentile
and you are using RRDtool, try this:
report.mib2.HCbits.name=Bits In/Out
report.mib2.HCbits.columns=ifHCInOctets,ifHCOutOctets
report.mib2.HCbits.type=interfaceSnmp
report.mib2.HCbits.command=--title="Bits In/Out" \
DEF:octIn={rrd1}:ifHCInOctets:AVERAGE \
DEF:octOut={rrd2}:ifHCOutOctets:AVERAGE \
CDEF:rawbitsIn=octIn,8,* \
CDEF:rawbitsOut=octOut,8,* \
CDEF:rawtotBits=octIn,octOut,+,8,* \
CDEF:bitsIn=rawbitsIn,UN,0,rawbitsIn,IF \
CDEF:bitsOut=rawbitsOut,UN,0,rawbitsOut,IF \
CDEF:bitsOutNeg=0,bitsOut,- \
CDEF:totBits=rawtotBits,UN,0,rawtotBits,IF \
CDEF:outSum=bitsOut,{diffTime},* \
CDEF:inSum=bitsIn,{diffTime},* \
CDEF:totSum=totBits,{diffTime},* \
VDEF:outpct=bitsOut,95,PERCENT \
VDEF:inpct=bitsIn,95,PERCENT \
GPRINT:totBits:AVERAGE:" Avg \\: %8.2lf %s\\n" \
LINE2:rawbitsIn#00ff00:"Bits In" \
GPRINT:rawbitsIn:AVERAGE:" Avg \\: %8.2lf %s" \
GPRINT:rawbitsIn:MIN:"Min \\: %8.2lf %s" \
GPRINT:rawbitsIn:MAX:"Max \\: %8.2lf %s\\n" \
LINE2:rawbitsOut#0000ff:"Bits Out" \
GPRINT:rawbitsOut:AVERAGE:"Avg \\: %8.2lf %s" \
GPRINT:rawbitsOut:MIN:"Min \\: %8.2lf %s" \
GPRINT:rawbitsOut:MAX:"Max \\: %8.2lf %s\\n" \
LINE2:outpct#000077:"95 pct out" \
GPRINT:outpct:" \\: %8.2lf %s\\n" \
LINE2:inpct#007700:"95 pct in" \
GPRINT:inpct:" \\: %8.2lf %s\\n" \
GPRINT:inSum:AVERAGE:" Tot In \\: %8.2lf %s" \
GPRINT:outSum:AVERAGE:" Tot Out \\: %8.2lf %s" \
GPRINT:totSum:AVERAGE:" Tot \\: %8.2lf %s\\n"
Note that this is for HCbits (the 64 bit SNMPv2 counters). For 32 bit
counters:
report.mib2.bits.name=Bits In/Out
report.mib2.bits.columns=ifInOctets,ifOutOctets
report.mib2.bits.type=interfaceSnmp
report.mib2.bits.command=--title="Bits In/Out" \
DEF:octIn={rrd1}:ifInOctets:AVERAGE \
DEF:octOut={rrd2}:ifOutOctets:AVERAGE \
CDEF:rawbitsIn=octIn,8,* \
CDEF:rawbitsOut=octOut,8,* \
CDEF:rawtotBits=octIn,octOut,+,8,* \
CDEF:bitsIn=rawbitsIn,UN,0,rawbitsIn,IF \
CDEF:bitsOut=rawbitsOut,UN,0,rawbitsOut,IF \
CDEF:bitsOutNeg=0,bitsOut,- \
CDEF:totBits=rawtotBits,UN,0,rawtotBits,IF \
CDEF:outSum=bitsOut,{diffTime},* \
CDEF:inSum=bitsIn,{diffTime},* \
CDEF:totSum=totBits,{diffTime},* \
VDEF:outpct=bitsOut,95,PERCENT \
VDEF:inpct=bitsIn,95,PERCENT \
GPRINT:totBits:AVERAGE:" Avg \\: %8.2lf %s\\n" \
LINE2:rawbitsIn#00ff00:"Bits In" \
GPRINT:rawbitsIn:AVERAGE:" Avg \\: %8.2lf %s" \
GPRINT:rawbitsIn:MIN:"Min \\: %8.2lf %s" \
GPRINT:rawbitsIn:MAX:"Max \\: %8.2lf %s\\n" \
LINE2:rawbitsOut#0000ff:"Bits Out" \
GPRINT:rawbitsOut:AVERAGE:"Avg \\: %8.2lf %s" \
GPRINT:rawbitsOut:MIN:"Min \\: %8.2lf %s" \
GPRINT:rawbitsOut:MAX:"Max \\: %8.2lf %s\\n" \
LINE2:outpct#000077:"95 pct out" \
GPRINT:outpct:" \\: %8.2lf %s\\n" \
LINE2:inpct#007700:"95 pct in" \
GPRINT:inpct:" \\: %8.2lf %s\\n" \
GPRINT:inSum:AVERAGE:" Tot In \\: %8.2lf %s" \
GPRINT:outSum:AVERAGE:" Tot Out \\: %8.2lf %s" \
GPRINT:totSum:AVERAGE:" Tot \\: %8.2lf %s\\n"
Final note: this is for OpenNMS 1.3.x. It is possible to do this on
1.2.x if you have compiled it against RRDtool 1.2. Replace the
"interface" type with "interfaceSnmp".
-T
_______________________________________________________________________
Tarus Balog, OpenNMS Maintainer Main: +1 919 533 0160
The OpenNMS Group, Inc. Fax: +1 503 961 7746
Skype: tarusb Direct: +1 919 647 4749
Email: tarus <at> opennms.org URL: http://www.opennms.org
PGP Key Fingerprint: 8945 8521 9771 FEC9 5481 512B FECA 11D2 FD82 B45C
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Please read the OpenNMS Mailing List FAQ:
http://www.opennms.org/index.php/Mailing_List_FAQ
opennms-discuss mailing list
To *unsubscribe* or change your subscription options, see the bottom of this page:
https://lists.sourceforge.net/lists/listinfo/opennms-discuss