SNMP OID for pf States
-
Hi all,
I need to export via SNMP (is possible) the pf states counter.
Via CLI the value is the output of this command:pfctl -s state | grep -E "\b([0-9]{1,3}\.){3}[0-9]{1,3}\b" | wc -l
Anyone can help me to find OID SNMP for pf states counter?
Regards,
-
Assuming you are querying the built-in bsnmpd (Services > SNMP) then you can get it directly. The MIB for PF data is at
/usr/share/snmp/mibs/BEGEMOT-PF-MIB.txt
, if you aim your SNMP client/NMS at that you can then hit it via:$ snmpwalk -M <mib-path> -On -v 2c -c mycommunityname \ my.host.name BEGEMOT-PF-MIB::pfStateTableCount
Or you can hit the
.1.3.6.1.4.1.12325.1.200.1.3.1.0
OID directly but that's a bit uglier. -
@jimp
It's work fine!
Many thanks!