Snmp problem: m0n0mon broken since a while now



  • Hi together,

    dont know if its a problem in pfsense or not. I'd using m0n0mon for a very long time now. I'ts a very small, simple application, which shows me realtime traffic graphs via SNMP. I cant remember exactly when the issue occurs, but i think it comes with versions > 1.2.3. I searched the forum, there are some older threads with similar suggestions, but without solution.

    It doesn't shows me any interfaces. m0n0mon cant find any. Could this may be a reason why it's not working!?

    I performed a snmp walk with FreeSNMP to check if SNMP is working properly starting with the OID .1.3.6.1.2.1.1:

    Variable = system.sysDescr.0
    Value  = wall.daheim.local 2814884277 FreeBSD 8.1-RELEASE
    Variable = system.sysObjectID.0
    Value  = 1.3.6.1.4.1.12325.1.1.2.1.1
    Variable = system.sysUpTime.0
    Value  = 215073922
    Variable = system.sysContact.0
    Value  =
    Variable = system.sysName.0
    Value  = wall.daheim.local
    Variable = system.sysLocation.0
    Value  =
    Variable = system.sysServices.0
    Value  = 76
    Variable = system.8.0
    Value  = 0
    Variable = system.9.1.2.1
    Value  = 1.3.6.1.4.1.12325.1.1.1.10.2
    Variable = system.9.1.2.2
    Value  = 1.3.6.1.4.1.12325.1.1.1.10.3
    Variable = system.9.1.2.3
    Value  = 1.3.6.1.6.3.1
    Variable = system.9.1.2.4
    Value  = 1.3.6.1.4.1.12325.1.1
    Variable = system.9.1.3.1
    Value  = udp transport mapping
    Variable = system.9.1.3.2
    Value  = lsock transport mapping
    Variable = system.9.1.3.3
    Value  = The MIB module for SNMPv2 entities.
    Variable = system.9.1.3.4
    Value  = The MIB module for the Begemot SNMPd.
    Variable = system.9.1.4.1
    Value  = 0
    Variable = system.9.1.4.2
    Value  = 0
    Variable = system.9.1.4.3
    Value  = 0
    Variable = system.9.1.4.4
    Value  = 0

    Thats all! SNMP itself seams to work, but there is nothing more than that. For me it seems a bit short for a SNMP walk?! And i cant find any interfaces … help would be appreciated.

    Thx


  • Rebel Alliance Developer Netgate

    Did you check the boxes on the SNMP screen to load modules? You may at the very least need MIB-II, but checking them all would be advisable.



  • Settings seeming to be OK. I'd never touch them. Don't know whats wrong. Here's a screenshot:

    Cant figure out, why there are no Interfacec listed …


  • Rebel Alliance Developer Netgate

    I have all four checked and it appears to be OK for me on the most current snapshot:

    [2.0-BETA4][root@pfsense.localdomain]/root(1): snmpwalk -v 2c -c public localhost | wc -l
        6734



  • I updated my Alix to the latest pfSense NanoBSD version … m0n0mon can't read the interfaces again. A new SNMP walk starting with the OID .1.3 has only this short result:

    Variable = system.sysDescr.0
    Value  = wall.daheim.local 432368702 FreeBSD 8.1-RELEASE-p2
    Variable = system.sysObjectID.0
    Value  = 1.3.6.1.4.1.12325.1.1.2.1.1
    Variable = system.sysUpTime.0
    Value  = 76648
    Variable = system.sysContact.0
    Value  =
    Variable = system.sysName.0
    Value  = wall.daheim.local
    Variable = system.sysLocation.0
    Value  =
    Variable = system.sysServices.0
    Value  = 76
    Variable = system.8.0
    Value  = 1
    Variable = system.9.1.2.1
    Value  = 1.3.6.1.4.1.12325.1.1.1.10.2
    Variable = system.9.1.2.2
    Value  = 1.3.6.1.4.1.12325.1.1.1.10.3
    Variable = system.9.1.2.3
    Value  = 1.3.6.1.6.3.1
    Variable = system.9.1.2.4
    Value  = 1.3.6.1.4.1.12325.1.1
    Variable = system.9.1.3.1
    Value  = udp transport mapping
    Variable = system.9.1.3.2
    Value  = lsock transport mapping
    Variable = system.9.1.3.3
    Value  = The MIB module for SNMPv2 entities.
    Variable = system.9.1.3.4
    Value  = The MIB module for the Begemot SNMPd.
    Variable = system.9.1.4.1
    Value  = 0
    Variable = system.9.1.4.2
    Value  = 0
    Variable = system.9.1.4.3
    Value  = 1
    Variable = system.9.1.4.4
    Value  = 1
    Variable = snmp.snmpInPkts.0
    Value  = 535
    Variable = snmp.snmpInBadVersions.0
    Value  = 0
    Variable = snmp.snmpInBadCommunityNames.0
    Value  = 0
    Variable = snmp.snmpInBadCommunityUses.0
    Value  = 0
    Variable = snmp.snmpInASNParseErrs.0
    Value  = 0
    Variable = snmp.snmpEnableAuthenTraps.0
    Value  = 2
    Variable = snmp.31.0
    Value  = 0
    Variable = snmp.32.0
    Value  = 0
    Variable = .iso.org.dod.internet.private.enterprises.12325.1.1.1.1.1.0
    Value  = 2048
    Variable = .iso.org.dod.internet.private.enterprises.12325.1.1.1.1.2.0
    Value  = 2048
    Variable = .iso.org.dod.internet.private.enterprises.12325.1.1.1.1.3.0
    Value  = 1
    Variable = .iso.org.dod.internet.private.enterprises.12325.1.1.1.1.4.0
    Value  = 0.0.0.0
    Variable = .iso.org.dod.internet.private.enterprises.12325.1.1.1.1.5.0
    Value  = 3
    Variable = .iso.org.dod.internet.private.enterprises.12325.1.1.1.4.1.3.0.0.0.0.161
    Value  = 1
    Variable = .iso.org.dod.internet.private.enterprises.12325.1.1.1.7.1.0
    Value  = 0
    Variable = .iso.org.dod.internet.private.enterprises.12325.1.1.1.7.2.0
    Value  = 0
    Variable = .iso.org.dod.internet.private.enterprises.12325.1.1.1.7.3.0
    Value  = 0
    Variable = .iso.org.dod.internet.private.enterprises.12325.1.1.1.7.4.0
    Value  = 0
    Variable = .iso.org.dod.internet.private.enterprises.12325.1.1.1.8.1.0
    Value  = 2
    Variable = .iso.org.dod.internet.private.enterprises.12325.1.1.1.8.2.0
    Value  = 0
    Variable = .iso.org.dod.internet.private.enterprises.12325.1.1.1.8.3.0
    Value  = 7
    Variable = .iso.org.dod.internet.private.enterprises.12325.1.1.1.9.1.2.19.47.118.97.114.47.114.117.110.47.115.110.109.112.100.46.115.111.99.107
    Value  = 1
    Variable = .iso.org.dod.internet.private.enterprises.12325.1.1.1.9.1.3.19.47.118.97.114.47.114.117.110.47.115.110.109.112.100.46.115.111.99.107
    Value  = 4
    Variable = .iso.org.dod.internet.private.enterprises.12325.1.1.1.10.1.1.2.3.117.100.112
    Value  = 1
    Variable = .iso.org.dod.internet.private.enterprises.12325.1.1.1.10.1.1.2.5.108.115.111.99.107
    Value  = 1
    Variable = .iso.org.dod.internet.private.enterprises.12325.1.1.1.10.1.1.3.3.117.100.112
    Value  = 1.3.6.1.4.1.12325.1.1.1.10.2
    Variable = .iso.org.dod.internet.private.enterprises.12325.1.1.1.10.1.1.3.5.108.115.111.99.107
    Value  = 1.3.6.1.4.1.12325.1.1.1.10.3
    Variable = .iso.org.dod.internet.6.3.1.1.6.1.0
    Value  = 1422193218

    Interfaces should be listed, cause they should have OID 1.3.6.1.2.1.2 … but they aren't listed!

    Btw ... after the update i have now errors in the dashboard at the Cpu Graphs section:

    Warning: include(/usr/local/www/widgets/widgets/cpu_graphs.widget.php): failed to open stream: No such file or directory in /usr/local/www/index.php on line 673 Warning: include(): Failed opening '/usr/local/www/widgets/widgets/cpu_graphs.widget.php' for inclusion (include_path='.:/etc/inc:/usr/local/www:/usr/local/captiveportal:/usr/local/pkg') in /usr/local/www/index.php on line 673

    Is it possible, that in the embedded version the interfaces branch of the OIDs, aren't present?


  • Rebel Alliance Developer Netgate

    The CPU graph widget was disabled, because it had some issues. I thought there was a check in the code to skip it if it wasn't found.

    I'll have to check snmp on my nanobsd install after I update it next time. I am testing on a full install so there could be a difference there.

    Can you paste the contents of /var/etc/snmpd.conf here?



  • Ooops … that was magic! I'm wondering if you answered, bevor i'd posted  ;D

    location := ""
    contact := ""
    read := "public"
    system := 1     # pfSense
    %snmpd
    begemotSnmpdDebugDumpPdus       = 2
    begemotSnmpdDebugSyslogPri      = 7
    begemotSnmpdCommunityString.0.1 = $(read)
    begemotSnmpdCommunityDisable    = 1
    begemotSnmpdPortStatus.0.0.0.0.161 = 1
    begemotSnmpdLocalPortStatus."/var/run/snmpd.sock" = 1
    begemotSnmpdLocalPortType."/var/run/snmpd.sock" = 4
    
    # These are bsnmp macros not php vars.
    sysContact      = $(contact)
    sysLocation     = $(location)
    sysObjectId     = 1.3.6.1.4.1.12325.1.1.2.1.$(system)
    
    snmpEnableAuthenTraps = 2
    

  • Rebel Alliance Developer Netgate

    Interesting, it's completely missing the section that should be in there if you really have those checkboxes set in the GUI.

    It should end with:

    
    begemotSnmpdModulePath."mibII"  = "/usr/lib/snmp_mibII.so"
    begemotSnmpdModulePath."netgraph" = "/usr/lib/snmp_netgraph.so"
    %netgraph
    begemotNgControlNodeName = "snmpd"
    begemotSnmpdModulePath."pf"     = "/usr/lib/snmp_pf.so"
    begemotSnmpdModulePath."hostres"     = "/usr/lib/snmp_hostres.so"
    
    


  • I put your additional lines via pfSense load/edit/save in snmpd.conf and reboot pfsense (since i don't know how to restart a service manually) … and it's working now!



  • I forgot to say: I expicit unchecked saved and checked the checkboxes in the SNMP dialog before. Nothing happened. There seems to be something going wrong.


  • Rebel Alliance Developer Netgate

    And when I check the boxes on mine, the config comes out as expected. Even if I check them one by one, the expected lines appear.



  • hmmm … but you have no embedded?!


  • Rebel Alliance Developer Netgate

    I just tested that on my ALIX. It works fine there.



  • Then i have no clue what could be the reason. I have a old wrap at the company. If i got time next week i modify it to nopacket, perform a clean install on the wrap and report the result here.


  • Rebel Alliance Developer Netgate

    When you check those boxes in the GUI and save, and then leave and come back to the page, are they still checked? Or did they uncheck themselves?

    It could be something in your config that's doing it, but I'm not sure what that might be



  • I don't know … call me crazy now. I tried different things and every time after changing things i checked /var/etc/snmpd.conf. It's working now? Yesterday i made the screenshots and post the content of the config file. The essential lines were missing. This is what i did now:

    First i just check and uncheck the boxes. Accordingly to the changes in the GUI the snmpd.conf was changed also. Then i tried to disabled completely SNMP services and save the settings. After that i enabled it again with checking the boxes. Works! Then the same but enabling without checking the boxes. Works too. Then checking the boxes ... works also.

    It's not really nice not to know whats going wrong. But i can clearly say that i had this problem, not only on my machine. Since it's not a totally really needed essential feature (like IPSec), i accepted this behavior for a long time.

    At the moment i hope, that it was a problem, that may be existed in older versions, and may be i upgraded it all the time, to the newer snapshots ... and the issue may only occur in touch with my existing config ... and it's now is away cause of the newer snapshot (wondering why i was yesterday not able to save the settings with same snapshot)?!

    But thx very much for your help ... wishing you a relaxed weekend 8)


Locked