On Wed, Mar 04, 2009 at 09:32:44AM +0100, Falk Brockerhoff - smartTERRA GmbH 
wrote:
> Hello,
>
> I like to monitor my firewalls using snmp and cacti. But I don't know how 
> to get all the information about pf, states, etc. On the net I only found 
> hints about older OpenBSD Versions (I use OpenBSD 4.4 -stable and the 
> included snmpd). Can you please give me a hint into the right direction?

Here's how you can use net-snmp's extend functionality:

$ grep extend /etc/snmp/snmpd.conf
extend PFstates /usr/local/sbin/countPFstates.sh

$ cat /usr/local/sbin/countPFstates.sh                                          
                   
#!/bin/sh
pfctl -si | grep entries | awk '{print $3}'

Then you just need to find the right OID and create your data source in
Cacti.

-- 
Jason Dixon
DixonGroup Consulting
http://www.dixongroup.net/

Reply via email to