Helpful ReplyHot!Get Wan Bandwidth via SNMP

Author
one.co.il
Bronze Member
  • Total Posts : 25
  • Scores: 0
  • Reward points: 0
  • Joined: 2013/01/06 06:11:33
  • Status: offline
2017/03/01 00:47:33 (permalink)
0

Get Wan Bandwidth via SNMP

Hi
I want to monitor each WAN Interface Traffic via SNMP, to get output similar to the value in Interface History Widget only via SNMP
Is there any way to get Wan1 and Wan2 Current Bandwidth?
I looked in to Fortigate MIB and the only Bandwidth MIB I Found is "fgHaStatsNetUsage" - Network Usage of Cluster (HA)
I dont Think this is the one I need,
any ideas?
#1
Alby23
Gold Member
  • Total Posts : 165
  • Scores: 11
  • Reward points: 0
  • Joined: 2016/06/24 08:57:33
  • Status: offline
Re: Get Wan Bandwidth via SNMP 2017/03/01 01:06:52 (permalink) ☄ Helpfulby one.co.il 2017/03/02 00:31:54
0
You should use InOctects and OutOctects for the relevant interfaces, read those values every "x" time (i.e. every 60 seconds) then perform a delta between the last data and the previous one.
In this way you'll have the number of octet in 60 seconds; if you multiply that number by 8, you'll have the bits.
After that a simple math formula and you have the average Mbps for that time interval.
#2
jintrah_FTNT
Bronze Member
  • Total Posts : 39
  • Scores: 2
  • Reward points: 0
  • Joined: 2015/02/02 02:04:54
  • Status: offline
Re: Get Wan Bandwidth via SNMP 2017/03/01 02:52:57 (permalink)
0
Hi,
Below oids can be used
IF-MIB:interfaces.ifTable.ifEntry.ifInOctets          - 1.3.6.1.2.1.2.2.1.10
IF-MIB:interfaces.ifTable.ifEntry.ifOutOctets        -1.3.6.1.2.1.2.2.1.16
#3
one.co.il
Bronze Member
  • Total Posts : 25
  • Scores: 0
  • Reward points: 0
  • Joined: 2013/01/06 06:11:33
  • Status: offline
Re: Get Wan Bandwidth via SNMP 2017/03/02 00:31:50 (permalink)
0
Tanks it's working more or less
but there still some issue, how can i tell when the value is reset?
for now i calc the values Delta with 10s delay, somtimes i get negetive value because the Values reset and the second Value is lower the the first
#4
tspark
New Member
  • Total Posts : 2
  • Scores: 0
  • Reward points: 0
  • Joined: 2017/01/27 07:57:18
  • Status: offline
Re: Get Wan Bandwidth via SNMP 2017/05/04 10:22:50 (permalink)
0
We use PRTG Network Monitor and their built-in SNMP bandwidth sensor. It works great when needing real-time and historic bandwidth usage. However I have found that with the latest version of FortiOS (5.4.4), we're not getting accurate bandwidth readings on VLANS, however the physical interfaces are still reporting as they should. I have not yet tried 5.6.0.
#5
Nicoke972
New Member
  • Total Posts : 4
  • Scores: 0
  • Reward points: 0
  • Joined: 2017/02/27 09:43:08
  • Status: offline
Re: Get Wan Bandwidth via SNMP 2017/06/08 09:03:44 (permalink)
0
Hi tspark,
 
I use PRTG too. But I can not see the bandwidth in Mb/s in real time.
#6
harald21
Gold Member
  • Total Posts : 200
  • Scores: 0
  • Reward points: 0
  • Joined: 2007/11/15 05:42:55
  • Location: Troisdorf/Germany
  • Status: offline
Re: Get Wan Bandwidth via SNMP 2017/06/13 02:18:09 (permalink)
0
In the past I used MRTG to monitor my Fortinet devices (bandwith, cpu usage, memory usage, session statistics, . . .)
You can customize the behaviour in the config file, and you can also monitor various values via SNMP-OID.
 
Sincerely
Harald
 
#7
echo
Silver Member
  • Total Posts : 97
  • Scores: 4
  • Reward points: 0
  • Joined: 2013/06/19 07:45:28
  • Location: Tallinn, Estonia
  • Status: offline
Re: Get Wan Bandwidth via SNMP 2019/12/13 04:15:19 (permalink)
0
Please also check this interesting blog post: https://standalone-sysadmin.com/are-you-monitoring-your-switchports-the-right-way-1d3098ec8938
Mindblowing! ifInOctets is 32bit and to get proper results, one has to check it very often, less than 30 seconds. Use ifHCInOctets instead and all the same for Output. This was our case with switches, but with our Fortigate's, we have to check again. We are using .1.3.6.1.2.1.31.1.1.1.1 as for base search for interfaces, which is also mentioned here: https://forum.fortinet.com/tm.aspx?m=149978, but still something seems wrong by the graphs we have gotten so far.
#8
gradius85
Bronze Member
  • Total Posts : 32
  • Scores: 0
  • Reward points: 0
  • Joined: 2019/02/20 06:55:23
  • Status: offline
Re: Get Wan Bandwidth via SNMP 2019/12/18 14:18:44 (permalink)
0
I will try to find it... but you need to find the 64bit mib if your using 1000Gbps and above.
post edited by gradius85 - 2019/12/18 14:20:30
#9
echo
Silver Member
  • Total Posts : 97
  • Scores: 4
  • Reward points: 0
  • Joined: 2013/06/19 07:45:28
  • Location: Tallinn, Estonia
  • Status: offline
Re: Get Wan Bandwidth via SNMP 2020/01/09 02:09:18 (permalink)
0
In our Zabbix monitoring, I got normally-looking graphs eventually by comparing the configuration with the oids from switches. In template, Network Interfaces, Item Prototypes, Download and Upload with SNMP OIDs "IF-MIB::ifHCInOctets.{#SNMPINDEX}" and "IF-MIB::ifHCOutOctets.{#SNMPINDEX}" I found that for some reason the Preprocessing part was not configured. By the example of other similar entities, I added two steps there: 1. Change per second, 2. Custom Multiplier: 8. This helped getting normally-looking graphs with plausible Mbps and Gbps values. I haven't tested the real values of those numbers gotten this way.
#10
Jump to:
© 2020 APG vNext Commercial Version 5.5