Skip to main content
bernhards
New Member
March 16, 2016
Solved

Monitoring with Nagios, SNMP

  • March 16, 2016
  • 1 reply
  • 18324 views

Hello all,

 

I try to add our new FortiGate 200D to our monitoring. Unfortunately I got some confusing output when I did a "snmpwalk" to the firewall. Normally the physical ports 9,10, 12,14 and 15 should be "up". But when I do a snmpwalk on the "ifOperStatus" it is

 

IF-MIB::ifOperStatus.1 = INTEGER: down(2)
IF-MIB::ifOperStatus.2 = INTEGER: down(2)
IF-MIB::ifOperStatus.3 = INTEGER: down(2)
IF-MIB::ifOperStatus.4 = INTEGER: up(1)
IF-MIB::ifOperStatus.5 = INTEGER: up(1)
IF-MIB::ifOperStatus.6 = INTEGER: down(2)
IF-MIB::ifOperStatus.7 = INTEGER: down(2)
IF-MIB::ifOperStatus.8 = INTEGER: up(1)
IF-MIB::ifOperStatus.9 = INTEGER: up(1)
IF-MIB::ifOperStatus.10 = INTEGER: down(2)
IF-MIB::ifOperStatus.11 = INTEGER: down(2)
IF-MIB::ifOperStatus.12 = INTEGER: down(2)
IF-MIB::ifOperStatus.13 = INTEGER: down(2)
IF-MIB::ifOperStatus.14 = INTEGER: down(2)
IF-MIB::ifOperStatus.15 = INTEGER: down(2)
IF-MIB::ifOperStatus.16 = INTEGER: down(2)
IF-MIB::ifOperStatus.17 = INTEGER: down(2)
IF-MIB::ifOperStatus.18 = INTEGER: up(1)
IF-MIB::ifOperStatus.19 = INTEGER: up(1)
IF-MIB::ifOperStatus.21 = INTEGER: up(1)
IF-MIB::ifOperStatus.22 = INTEGER: up(1)
IF-MIB::ifOperStatus.23 = INTEGER: up(1)
IF-MIB::ifOperStatus.25 = INTEGER: up(1)
IF-MIB::ifOperStatus.26 = INTEGER: up(1)
IF-MIB::ifOperStatus.27 = INTEGER: up(1)
IF-MIB::ifOperStatus.28 = INTEGER: up(1)
IF-MIB::ifOperStatus.29 = INTEGER: down(2)

 

As you can see this does not fit to the actual state of physical ports. And it outputs more ports that are actually on the machine. Does this output include VLANs, VPN tunnels,.. too?

So maybe the OID SNMP number 1.3.6.1.2.1.2.2.1.7 of the FORTINET-FORTIGATE-MIB.mib is not correct? What OID number is correct to look for the state of the physical ports?

 

EDIT:

 

So I found the OID (1.3.6.1.2.1.31.1.1.1.18) where the ports are labeled but this doesn't fit the output from ifOperStatus. Can anyone give me a hint?

 

IF-MIB::ifAlias.1 = STRING:
IF-MIB::ifAlias.2 = STRING:
IF-MIB::ifAlias.3 = STRING:
IF-MIB::ifAlias.4 = STRING: Network name 1
IF-MIB::ifAlias.5 = STRING: Network name 2
IF-MIB::ifAlias.6 = STRING: Network name 3
IF-MIB::ifAlias.7 = STRING:
IF-MIB::ifAlias.8 = STRING: Network name 4
IF-MIB::ifAlias.9 = STRING:
IF-MIB::ifAlias.10 = STRING:
IF-MIB::ifAlias.11 = STRING:
IF-MIB::ifAlias.12 = STRING:
IF-MIB::ifAlias.13 = STRING:
IF-MIB::ifAlias.14 = STRING:
IF-MIB::ifAlias.15 = STRING:
IF-MIB::ifAlias.16 = STRING:
IF-MIB::ifAlias.17 = STRING:
IF-MIB::ifAlias.18 = STRING: Network name 5
IF-MIB::ifAlias.19 = STRING: Network name 6
IF-MIB::ifAlias.21 = STRING:
IF-MIB::ifAlias.22 = STRING:
IF-MIB::ifAlias.23 = STRING:
IF-MIB::ifAlias.25 = STRING:
IF-MIB::ifAlias.26 = STRING:
IF-MIB::ifAlias.27 = STRING:
IF-MIB::ifAlias.28 = STRING:
IF-MIB::ifAlias.29 = STRING:

 

Picture of the port state on the web interface is attached.

    Best answer by emnoc

    Also you can add the  ifIndex on the interface via the cli, I bet your port ifIndex is being set by a value in the cfg.

     

    e.g

    config system interface     edit "port1"         set vdom "root"         set type physical         set snmp-index 1000     next end

    1 reply

    PaulM1114
    New Member
    March 17, 2016

    I think these numbers may be the index values associated with the physical interfaces.

    Run 'diag netlink interface list' and see if the index= align with the numbers returned when using snmpwalk.

     

     

    emnoc
    emnocAnswer
    New Member
    March 17, 2016

    Also you can add the  ifIndex on the interface via the cli, I bet your port ifIndex is being set by a value in the cfg.

     

    e.g

    config system interface     edit "port1"         set vdom "root"         set type physical         set snmp-index 1000     next end

    bernhards
    bernhardsAuthor
    New Member
    March 18, 2016

    Thanks, your answer helped to solve the problem. :)