Fail to generate snmp.yml from Fortigate Mibs

249 views
Skip to first unread message

Donny Achmadi

unread,
Nov 18, 2020, 9:18:40 PM11/18/20
to Prometheus Users
Hi All,

I am facing issue when generating exporter .yml file for Fortigate.

I have followed this dashboard https://grafana.com/grafana/dashboards/7567, but getting error when run ./generator generate

[root@etp-monitor1 generator]# ./generator generate
level=info ts=2020-11-19T02:09:03.037Z caller=net_snmp.go:142 msg="Loading MIBs" from=/home/kadmin/go/src/github.com/prometheus/snmp_exporter/generator/mibs
level=warn ts=2020-11-19T02:09:03.052Z caller=main.go:120 msg="NetSNMP reported parse error(s)" errors=2815
level=info ts=2020-11-19T02:09:03.053Z caller=main.go:52 msg="Generating config for module" module=fortigate_snmp
level=error ts=2020-11-19T02:09:03.053Z caller=main.go:130 msg="Error generating config netsnmp" err="cannot find oid 'fgInetProto' to walk"

This is my generator.yml file:
modules:
  fortigate_snmp:
    walk:
      - ifXTable
      - fgVpn
      - fgSystem
      - fgIntf
      - fgInetProto
    version: 3
    max_repetitions: 25
    timeout: 10s
    auth:

======
When I try to run ./generator parse_errors, I can see a lot of errors as attached.
I downloaded the MIB file from Fortigate WEB console under SNMP.

I need your help to get this working :)

Thanks,
Donny



parse errors.txt

sabarish narayanan

unread,
Nov 19, 2020, 6:43:43 AM11/19/20
to Prometheus Users
To fix these, check the oid names being called for example rptrPortEntry (from "level=warn ts=2020-10-05T11:03:02.476Z caller=tree.go:83 msg="Can't find augmenting node" augments=rptrPortEntry node=ciscoRptrPortEntry") in the mib files using notepad++ or some other editor.
 
We find that rptrPortEntry is found in CISCO-REPEATER-MIB.mib, line 28 and is being imported FROM SNMP-REPEATER-MIB. So now we check if the SNMP-REPEATER-MIB exists in the mibs folder. If not, then google this mib, download and store it in the mib folder. Repeat these steps for all the errors.
This example was from the error I had gotten.
Reply all
Reply to author
Forward
0 new messages