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 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 would be:
Target[]: `perl /etc/mrtg/` MaxBytes[]: 4800000
Title[]: RBLDNSD -
PageTop[]: <H1> requests </H1>
MRTG should then be run every five minutes using cron.

About this Entry

This page contains a single entry by Niall Donegan published on March 10, 2007 5:44 PM.

Converting Microsoft Access MDB Into CSV Or MySQL In Linux was the previous entry in this blog.

Garda Website Unusable Under Linux (And Anything Other Than IE?) is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.


OpenID accepted here Learn more about OpenID
Creative Commons License
This blog is licensed under a Creative Commons License.
Powered by Movable Type 5.02