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

    SNMP Extension

    Scheduled Pinned Locked Moved SNMP
    10 Posts 3 Posters 7.8k 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.
    • arrmoA
      arrmo
      last edited by

      Hi,

      Searched around, but can't seem to find an answer to this. Does pfSense support SNMP Extension?

      Thanks!

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

        Could you elaborate on what you mean by "SNMP Extension"?

        pfSense supports SNMP (Services > SNMP) using the bsnmp daemon from FreeBSD, and there are some modules that add extra functionality to SNMP, but without knowing specifically which "Extension" is being referred to there, it's impossible to say if it's supported.

        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!

        1 Reply Last reply Reply Quote 0
        • arrmoA
          arrmo
          last edited by

          You bet!

          SNMP allows you to "extend" it, using exec or extend commands (some info / examples below). By adding this information to the snmpd.conf file, you can have snmp return information outside of the normal / stock info (by executing shell commands, and returning the information).

          http://net-snmp.sourceforge.net/wiki/index.php/Tut:Extending_snmpd_using_shell_scripts
          http://net-snmp.sourceforge.net/docs/man/snmpd.conf.html#lbAZ
          http://www.net-snmp.org/docs/FAQ.html#What_s_the_difference_between__exec____sh____extend__and__pass__

          Make sense?

          I have been using it on my (Tomato-based) router as well .. adding information to the configuration file, and yes - it returns custom information …  :). Very powerful, and very handy. I think pfSense just needs to allow these commands to be added to the snmpd.conf file (assuming "stock" net-snmp is supported, which I think is likely the case).

          Thanks!

          1 Reply Last reply Reply Quote 0
          • dennypageD
            dennypage
            last edited by

            These extensions are particular to the net-snmp implementation. pfSense uses bsnmp which is a different implementation.

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

              dennypage is correct. Those are for a different SNMP daemon. Ours does not support those mechanisms for running commands.

              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!

              1 Reply Last reply Reply Quote 0
              • arrmoA
                arrmo
                last edited by

                Gotcha. And there are no custom extension options for bsnmp?

                Thanks!

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

                  No

                  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!

                  1 Reply Last reply Reply Quote 0
                  • arrmoA
                    arrmo
                    last edited by

                    Hmmm … OK, was typing this in parallel ... :). There seem to be, noted here,
                    https://www.freebsd.org/cgi/man.cgi?query=bsnmp-ucd&apropos=0&sektion=8&manpath=FreeBSD+Ports+10.2-RELEASE&arch=default&format=html

                    Or is this not fully supported? Just trying to understand!

                    Here is what I'm talking about,

                    With bsnmp-ucd you can also extend bsnmpd agent functionality specifying
                        arbitrary commands in UCD-SNMP-MIB::extTable. To add new command you
                        should add following lines in bsnmpd(1) configuration file, in bsnmp-ucd
                        module section:

                    extNames. <index>= <name>extCommand. <index>= <commandline>For example, to collect lastpid statistics under mib UCD-SNMP-
                        MIB::extOutput.0 you can specify:

                    extNames.0 = "lastpid"
                      extCommand.0 = "/sbin/sysctl -n kern.lastpid"</commandline></index></name></index>

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

                      Keep reading. They are not executed on demand, and the output control is limited. It's not quite the same.

                      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!

                      1 Reply Last reply Reply Quote 0
                      • arrmoA
                        arrmo
                        last edited by

                        Yep, agreed - you're absolutely right! I did try a custom command (manually edited /var/etc/snmpd.conf) - and the command does work, but it doesn't update on demand (just like you said), rather it executes on a preset / configured schedule. That may be OK though - is there a way to set the custom commands? If not, not a biggie - would just be handy.

                        Thanks!

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