SNMP get command syntax
Normally, to get configuration and status information for a FortiGate unit, an SNMP manager would use an SNMP get commands to get the information in a MIB field. The SNMP get command syntax would be similar to:
snmpget -v2c -c <community_name> <address_ipv4> {<OID> | <MIB_field>}
…where…
<community_name>
is an SNMP community name added to the FortiGate configuration. You can add more than one community name to a FortiGate SNMP configuration. The most commonly used community name is public
.
<address_ipv4>
is the IP address of the FortiGate interface that the SNMP manager connects to.
{<OID> | <MIB_field>}
is the object identifier (OID) for the MIB field or the MIB field name itself.
The SNMP get
command gets firmware version running on the FortiGate unit. The community name is public
. The IP address of the interface configured for SNMP management access is 10.10.10.1
. The firmware version MIB field is fgSysVersion
and the OID for this MIB field is 1.3.6.1.4.1.12356.101.4.1.1
The first command uses the MIB field name and the second uses the OID:
snmpget -v2c -c public 10.10.10.1 fgSysVersion.0
snmpget -v2c -c public 10.10.10.1 1.3.6.1.4.1.12356.101.4.1.1.0
The OIDs and object names used in these examples are dependent on the version of MIB and are subject to change. |