MRTG-SQUID(1) mrtg MRTG-SQUID(1)
mrtg-squid - using mrtg to monitor Squid
Squid 2.3 knows SNMP and you can therefore use mrtg to monitor it quite
I have made some modifications to mrtg which simplify this. My work is
based on earlier modification made by: email@example.com and
I added new code for displaying correct units to the previous patches
"perminute" and "perhour" ("option" tokens), which allows other mea
surement in addition to "persecond".
Then I created a new option token "dorelpercent" which allows the cal
culation of the percentage of IN-stream / OUT-stream on the fly and
then displays it on a fixed scale from 0% to 100%. For my requirements,
this does good work. Maybe someone wants a floating scale. It should
not be a problem to implement it, too (but give me an option to keep my
fixed scale). If IN-stream is always less than OUT-stream both lines
(OUT-stream and relative percent) are always displayed on top of IN-
stream bulk. Otherwise this option makes no sense. With this option you
can display hitrates, errorrates (for router monitoring: rel.
droprates) easily now.
If you use this options please consider that you need a 5th colour
name/value pair in your Colours statements!
Due to some discussion on this list, I have implemented two tokens too:
"kilo" and "kMG"
"kilo" should contain the value of k (1000 or 1024), where 1000 is the
"kMG" is a comma separated list of multiplier prefixes, used instead of
"", "k", "M", "G", "T" on the MRTG display. Leave the place free, if
you want no prefix.
Also an incomplete list of OIDs for the new SQUID release is added.
I hope you enjoy it.
You can measure responsetimes in ms and display it with MRTG correctly
You can display now MB/s as 1024*1024 B/s with:
A sample config for squid:
Title[proxy-hit]: HTTP Hits
proxy Cache Statistics: HTTP Hits / Requests
LegendI[proxy-hit]: HTTP hits
LegendO[proxy-hit]: HTTP requests
Legend1[proxy-hit]: HTTP hits
Legend2[proxy-hit]: HTTP requests
Options[proxy-hit]: nopercent, perminute, dorelpercent
Title[proxy-srvkbinout]: Cache Server Traffic In / Out
Cache Statistics: Server traffic volume (In/Out)
LegendI[proxy-srvkbinout]: Traffic In
LegendO[proxy-srvkbinout]: Traffic Out
Legend1[proxy-srvkbinout]: Traffic In
Legend2[proxy-srvkbinout]: Traffic Out
YLegend[proxy-srvkbinout]: per minute
Options[proxy-srvkbinout]: nopercent, perminute
Andreas Papst Dirk-Lder Kreie
2.14.7 2006-09-06 MRTG-SQUID(1)