Graphing Rbldnsd Stats With MRTG
A while ago Michele blogged about generating stats from Rbldnsd. Since then I've had to put it into practice.
During the post he mentioned Jeff Chan's script for getting the numbers from rbldnsd's stats file. The only problem with this script was that it rapidly ran out of steam when you went over ten zones. This becomes a problem when you consider that a dnsbl like countries.nerd.dk has over 200 zones.
A new script was created in order to get around this limitation, which is available here. If no argument is passed to the script, it will return the aggregate numbers for all the zones, and if the zone name is passed in as an argument it will give the numbers for that zone. In both cases it will return two lines. The first is the number of positve hits on the zone, the second line is the total number of requests to the zone.
In order to use the script with mrtg you will have to edit the $statfile variable to point at where rbldnsd is outputting it's stats. For each DNSBL, you have to setup a target in your MRTG config. The target for sbl.spamhaus.org would be:
Target[sbl.spamhaus.org]: `perl /etc/mrtg/rbldnsdstat.pl sbl.spamhaus.org` MaxBytes[sbl.spamhaus.org]: 4800000 Title[sbl.spamhaus.org]: RBLDNSD - sbl.spamhaus.org PageTop[sbl.spamhaus.org]: <H1>sbl.spamhaus.org requests </H1>MRTG should then be run every five minutes using cron.
0 TrackBacks
Listed below are links to blogs that reference this entry: Graphing Rbldnsd Stats With MRTG.
TrackBack URL for this entry: http://blog.moybella.net/cgi-bin/mt-tb.cgi/25

Leave a comment