Skip to main content

Hello team,

 

I was trying to retrive the Ip of an interface from my fortigate using the below command but looks not working , please advise haw i can get the desired result.

 

$CENTREONPLUGINS$/plugins/centreon-plugins/centreon_plugins.pl --plugin=network::fortinet::fortigate::plugin --mode=interfaces   --oid=.1.3.6.1.2.1.4.20.1.1 --hostname=$HOSTADDRESS$ --snmp-community=$_HOSTSNMPCOMMUNITY$ --snmp-version=$_HOSTSNMPVERSION$

Hello :)

The command you are proposing should not work because the plugin `plugin=network::fortinet::fortigate::plugin` does not exist, but there is a plugin `plugin=network::fortinet::fortigate::snmp::plugin`.

In addition, the `--oid` option does not exist for this plugin, but you can find the following options : 

=item B<--oid-filter>

Define the OID to be used to filter interfaces (default: ifName) (values: ifDesc, ifAlias, ifName, IpAddr, Vdom).

=item B<--oid-display>

Define the OID that will be used to name the interfaces (default: ifName) (values: ifDesc, ifAlias, ifName, IpAddr, Vdom).

=item B<--oid-extra-display>

Add an OID to display.

Interfaces mode does not allow you to retrieve the ip of your equipment, but rather to monitor the traffic of network interfaces.

From the information I've been able to find, here's how you can retrieve the IP of a Fortigage interface: 
- GUI : Network > Interfaces
- CLI : `get system interface <interface>`
- REST API: `GET /api/v2/cmdb/system/interface`

Hope this may help :)

Kind regards.


Reply