Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    SNMP OID for pf States

    Scheduled Pinned Locked Moved SNMP
    3 Posts 2 Posters 922 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • B
      bobuzi
      last edited by

      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,

      1 Reply Last reply Reply Quote 0
      • jimpJ
        jimp Rebel Alliance Developer Netgate
        last edited by

        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.

        Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

        Need help fast? Netgate Global Support!

        Do not Chat/PM for help!

        B 1 Reply Last reply Reply Quote 0
        • B
          bobuzi @jimp
          last edited by

          @jimp
          It's work fine!
          Many thanks!

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.