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

    Nagios monitoring of PFsense interfaces

    Scheduled Pinned Locked Moved General pfSense Questions
    12 Posts 2 Posters 1.7k 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.
    • M
      marion.miller @stephenw10
      last edited by

      @stephenw1You are correct, it should be LAN. it fails with that also. the command is check_ifstatus. I want to know when an interface goes down.

      1 Reply Last reply Reply Quote 0
      • stephenw10S
        stephenw10 Netgate Administrator
        last edited by

        Ah, it;'s because:

        [2.6.0-RELEASE][admin@cedev-6.stevew.lan]/usr/local/libexec/nagios: ./check_ifstatus 
        Can't locate Net/SNMP.pm in @INC (you may need to install the Net::SNMP module) (@INC contains: /usr/local/libexec/nagios /usr/local/lib/perl5/site_perl/mach/5.32 /usr/local/lib/perl5/site_perl /usr/local/lib/perl5/5.32/mach /usr/local/lib/perl5/5.32) at ./check_ifstatus line 41.
        BEGIN failed--compilation aborted at ./check_ifstatus line 41.
        

        Looking.....

        M 1 Reply Last reply Reply Quote 0
        • M
          marion.miller @stephenw10
          last edited by

          @stephenw10 INstalled Net-SNMP and enabled in on pfsense and get the same error.

          1 Reply Last reply Reply Quote 0
          • stephenw10S
            stephenw10 Netgate Administrator
            last edited by

            Yeah, you need that package to get the SNMP perl module. But it appears to be in the correct location. Or at least a location that is referenced by the INC file. It should find it....

            1 Reply Last reply Reply Quote 0
            • stephenw10S
              stephenw10 Netgate Administrator
              last edited by

              No, it is looking in the wrong place.

              Try:

              ln /usr/local/lib/perl5/site_perl/mach/5.32/SNMP.pm /usr/local/lib/perl5/5.32/Net/SNMP.pm
              

              Then retest.

              1 Reply Last reply Reply Quote 0
              • stephenw10S
                stephenw10 Netgate Administrator
                last edited by

                https://redmine.pfsense.org/issues/13509

                M 1 Reply Last reply Reply Quote 0
                • M
                  marion.miller @stephenw10
                  last edited by

                  Getting closer. It recognizes it but now gives these errors

                  Subroutine AUTOLOAD redefined at /usr/local/lib/perl5/site_perl/mach/5.32/SNMP.pm line 53.
                  Subroutine register_debug_tokens redefined at /usr/local/lib/perl5/site_perl/mach/5.32/SNMP.pm line 138.
                  Subroutine getenv redefined at /usr/local/lib/perl5/site_perl/mach/5.32/SNMP.pm line 144.
                  Subroutine setenv redefined at /usr/local/lib/perl5/site_perl/mach/5.32/SNMP.pm line 150.
                  Subroutine setMib redefined at /usr/local/lib/perl5/site_perl/mach/5.32/SNMP.pm line 158.
                  Subroutine initMib redefined at /usr/local/lib/perl5/site_perl/mach/5.32/SNMP.pm line 169.
                  Subroutine addMibDirs redefined at /usr/local/lib/perl5/site_perl/mach/5.32/SNMP.pm line 186.
                  Subroutine addMibFiles redefined at /usr/local/lib/perl5/site_perl/mach/5.32/SNMP.pm line 195.
                  Subroutine loadModules redefined at /usr/local/lib/perl5/site_perl/mach/5.32/SNMP.pm line 205.
                  Subroutine unloadModules redefined at /usr/local/lib/perl5/site_perl/mach/5.32/SNMP.pm line 216.
                  Subroutine translateObj redefined at /usr/local/lib/perl5/site_perl/mach/5.32/SNMP.pm line 222.
                  Subroutine getType redefined at /usr/local/lib/perl5/site_perl/mach/5.32/SNMP.pm line 251.
                  Can't locate object method "session" via package "Net::SNMP" (perhaps you forgot to load "Net::SNMP"?) at /usr/local/libexec/nagios/check_ifstatus line 128.

                  1 Reply Last reply Reply Quote 0
                  • stephenw10S
                    stephenw10 Netgate Administrator
                    last edited by

                    That's after adding the symlink?

                    M 1 Reply Last reply Reply Quote 0
                    • M
                      marion.miller @stephenw10
                      last edited by

                      @stephenw10
                      Yes

                      1 Reply Last reply Reply Quote 0
                      • stephenw10S
                        stephenw10 Netgate Administrator
                        last edited by

                        Mmm, OK I replicated that. That clearly that is loaded though. Something in the perl config maybe. Someone more familiar with perl will need to look at it.

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