SNMP traffic trouble



  • I am having some issues here regarding the current (live) wan in/out traffic. I checked a few posts and so i came up with those two oids:
    In: .1.3.6.1.2.1.2.2.1.10.1
    Out: .1.3.6.1.2.1.2.2.1.16.1

    After a few attempts i figured out this has to be kind of the overall passed packets but not the current traffic at this moment. I also could not use the MIB-Files:
    http://files.pfsense.org/jimp/mibs/BEGEMOT-NETGRAPH.txt

    Any help on finding the right oids would be nice (WAN = em0). Second question: What's the values return format? Kbps?

    Thanks!

    Kind regards
    vitafit


  • Rebel Alliance Developer Netgate

    The problem is that interface indexes are different on each install. The OIDs in SNMP are based off the OS device probe order not the assignment in pfSense. So you have to look at the other OIDs to determine which ones are which.

    The most current MIBs are on your firewall under /usr/share/snmp/mibs/



  • Can you give a hint where to find the correct OIDs? i have the MIBS and looked them up. ALL of them. But i did not find which value might help to retrieve the current traffic of my interfaces…


  • Rebel Alliance Developer Netgate

    They're all under

    snmpwalk -v2c -c public 192.168.1.1 ifTable
    

    More specifically, you'll want IF-MIB::ifInOctets.1 (and however many numbers up, one per interface) and IfOutOctets



  • Thank you! That helped.
    Seems to be my part to subtract the last value from the value before to get the delta and with that the current throughput.