pfSense Support Subscription

Author Topic: SNMP traffic trouble  (Read 1911 times)

0 Members and 1 Guest are viewing this topic.

Offline vitafit

  • Jr. Member
  • **
  • Posts: 43
  • Karma: +0/-0
  • Love to drink Mate!
    • View Profile
SNMP traffic trouble
« on: July 16, 2016, 04:34:59 pm »
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

Offline jimp

  • Administrator
  • Hero Member
  • *****
  • Posts: 21402
  • Karma: +1433/-26
    • View Profile
Re: SNMP traffic trouble
« Reply #1 on: July 20, 2016, 03:00:45 pm »
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/
Need help fast? Commercial Support!

Co-Author of pfSense: The Definitive Guide. - Check the Doc Wiki for FAQs.

Do not PM for help!

Offline renegade

  • Jr. Member
  • **
  • Posts: 85
  • Karma: +2/-1
    • View Profile
Re: SNMP traffic trouble
« Reply #2 on: November 06, 2016, 09:55:35 am »
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...

Offline jimp

  • Administrator
  • Hero Member
  • *****
  • Posts: 21402
  • Karma: +1433/-26
    • View Profile
Re: SNMP traffic trouble
« Reply #3 on: November 06, 2016, 07:14:29 pm »
They're all under

Code: [Select]
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
Need help fast? Commercial Support!

Co-Author of pfSense: The Definitive Guide. - Check the Doc Wiki for FAQs.

Do not PM for help!

Offline renegade

  • Jr. Member
  • **
  • Posts: 85
  • Karma: +2/-1
    • View Profile
Re: SNMP traffic trouble
« Reply #4 on: November 12, 2016, 04:35:24 am »
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.