Support Forum
The Forums are a place to find answers on a range of Fortinet products from peers and product experts.
one_co_il
New Contributor

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 Solution
Alby23
Contributor II

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.

View solution in original post

9 REPLIES 9
Alby23
Contributor II

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.

jintrah_FTNT

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

one_co_il

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

tspark
New Contributor

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.

Nicoke972

Hi tspark,

 

I use PRTG too. But I can not see the bandwidth in Mb/s in real time.

harald21

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

 

echo
Contributor II

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.

gradius85
New Contributor III

I will try to find it... but you need to find the 64bit mib if your using 1000Gbps and above.

echo

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.

Labels
Top Kudoed Authors