Description |
This article describes how to calculate the current bandwidth value with the SNMP OID. |
Scope |
FortiGate, all firmware. |
Solution |
FortiGate does not currently provide SNMP OID values for bandwidth. However, there are 2 SNMP OIDs that can be used to get the number of bytes received/sent from/to a specific interface:
ifOutOctets 1.3.6.1.2.1.2.2.1.16 An exact value for bandwidth cannot be provided automatically as a result. FortiGate provides the byte count for each incoming/outgoing traffic. The amount of bytes collected over a specific period allows for calculation of the bandwidth consumed per second, For example, when the number of bytes received on the interface with SNMP index 1, is queried (1.3.6.1.2.1.2.2.1.10.1), the value of 1052009935 is obtained. After one minute this counter is queried again and returns a value of 1053011878, to obtain the bandwidth of the last 60 seconds, the following calculation must be made: bandwidth = (1053011878-1052009935)*8/60 = 133592.4 (133.6Kbps)
Most of SNMP Manager applications should use this SNMP OIDs for bandwidth graphing.
FgFwPolStatsEntry ::= SEQUENCE { fgFwPolID FnIndex, fgFwPolPktCount Counter32, fgFwPolByteCount Counter32, fgFwPolLastUsed DisplayString, fgFwPolPktCountHc Counter64, fgFwPolByteCountHc Counter64 } |