Skip to main content
Thiagoferreira05
Visitor III
December 5, 2023
Question

OID to extract the content from "Comments" field from Fortigate interface

  • December 5, 2023
  • 2 replies
  • 1286 views

Hello everybody,

Does anyone know if it is possible via SNMP to extract the "Comments" content from Fortigate Interface, do you know what OID checks this field?

I really appreciate any help you can provide.

 

2 replies

Debbie_FTNT
Staff & Editor
Staff & Editor
December 5, 2023

Hey Thiago,

to my knowledge there is no OID to get the comments field from a FortiGate interface; you can get VDOM and IP/subnet, but that's about it.

You can get the FortiGate MIB files from FortiGate GUI:
https://docs.fortinet.com/document/fortigate/6.2.15/cookbook/608160/mib-files
You will find all available traps and OIDs listed there.

justinpowell_FTNT
Staff
Staff
December 5, 2023

While I don't see an OID for this, you could leverage the API.  I'm on FOS 7.0 so if you are on a different version then your steps might be slightly different.

 

Follow these instructions to create an API user with a token (don't lose the token).

https://docs.fortinet.com/document/fortigate/7.0.13/administration-guide/399023/rest-api-administrator (you can disable the PKI Group setting if you aren't using it)

 

Then using Curl or another method, issue this API call:

curl -X 'GET' \
'https://<fgt_ip_fqdn_here>:<port_here>/api/v2/cmdb/system/interface?format=name%7Cdescription&vdom=root&access_token=<insert_your_api_token_here>' -H 'accept: application/json'