{"id":269,"date":"2005-02-23T21:05:50","date_gmt":"2005-02-23T20:05:50","guid":{"rendered":"http:\/\/wp.devco.net\/?p=269"},"modified":"2009-10-09T17:08:19","modified_gmt":"2009-10-09T16:08:19","slug":"ipfw_rule_counters_via_snmpd","status":"publish","type":"post","link":"https:\/\/www.devco.net\/archives\/2005\/02\/23\/ipfw_rule_counters_via_snmpd.php","title":{"rendered":"ipfw rule counters via snmpd"},"content":{"rendered":"

I have a number of FreeBSD<\/a> machines with jails on them that require me to keep stats and graphs of their bandwidth usage.
\nThe solution I came up with is to add counter rules in the kernel IPFW firewall table and then plug a simple perl script into
Net SNMP<\/a> which will put each ipfw counter rule’s current byte count on a unique OID that you can query and graph using something Cacti<\/a>.
\nThis same technique can be used to graph things like only HTTP, SMTP, etc traffic, or infact anything that you can express as a IPFW counter rule.
\nRead the full entry for details on how I implemented this.<\/p>\n


\nA number of components make up the final working solution:<\/p>\n