I talked about MRTG stats for Squid in the past but apparently forgot to include the .mib file.
So, here it is. Download this file and put it in /usr/share/squid/mib.txt.
I don’t quite remember where I found that mib file. Probably included with Squid on Gentoo or the world wide web… But I couldn’t find it on Debian, so here it is. And be sure to add these lines to your Squid config:
acl snmppublic snmp_community public
snmp_access allow snmppublic all
This is what it should look like (low usage Squid):
I tend to restart OpenVPN a lot due to config changes. As a result, this brings quite some issues to MRTG (or more precisely, SNMP), due to the fact tun devices change of ID.
A while back, I found a quick fix for this; rename the interface targets from their respective ID to their name:
# Eth0 stats
Options[eth0]: growright, nobanner, pngdate, nopercent, noinfo
Title[eth0]: Traffic Analysis for deng
PageTop[eth0]: <H1>Traffic Analysis for deng (eth0)</H1>
# Eth1 stats
Options[eth1]: growright, nobanner, pngdate, nopercent, noinfo
Title[eth1]: Traffic Analysis for deng
PageTop[eth1]: <H1>Traffic Analysis for deng (eth1)</H1>
# tun0 stats
Options[tun0]: growright, nobanner, pngdate, nopercent, noinfo
Title[tun0]: Traffic Analysis for deng
PageTop[tun0]: <H1>Traffic Analysis for deng (tun0)</H1>
As I often have people asking for the files I use to make my pretty MRTG graphs; I’ll publish them here.
Here are some examples:
Zero – One – Four – vm1 – Sauron
The config files:
Sauron (including Squid stats),
Zero (including fan stats).
List of files included:
– indexmaker; simple script (included with MRTG) to generate a simple index file with all the graphs
– snmp-if.sh; will show you the IDs of the interfaces on the server/pc. These IDs have to be edited in the mrtg.cfg file; e.g.:
Make sure 2 is indeed the ID of eth0. Be aware that virtual interfaces, like the TUN/TAP interfaces (using by openVPN for example), can change ID each time they are restarted/rebooted.
– mrtg.cfg; check the config file as an example.
– mrtg-<xyz>.sh; bunch of files to generate some data. Not all of those still work, but I haven’t deleted them yet in case. See the config to check those I’m using.
– mrtg._1 and mrtg.ok can be deleted/ignores. Those files are generated by MRTG and I was to lazy to remove them. 🙁
Some day, I’ll write a decent howto, but for now, you’ll have to do with this.
If there’s any question, just leave a comment.
Well, seems like Firefox is the most popular browser visiting this site. And on 2nd place.. Safari?! Who on earth uses Safari? Oh, but I guess mobile device, such as the iPhone & Symbian use webkit/Safari-like browser.
Well, let’s see if Google Chrome gets in that list. If only they’d release it for other OS’es too… 🙁 Seems like good ol’ Windows isn’t that popular anymore.
Took me a while to figure out what went wrong.
With the new Firefox (v3) and the wordpress update, I was no longer able to see my WordPress stats on my dashboard.
Every (WordPress) login attempt, to see the stats, resulted in… Well nothing. I just kept getting back to the login page. No error.
Actually, I have “third-party cookies disabled” on all my browsers; I don’t like to have cookies from sites I do not visit. And this was the cause of the problem.
Simply add an exception for “*.wordpress.com” and you’ll be able to view all your stats again. 🙂