Support Forum
The Forums are a place to find answers on a range of Fortinet products from peers and product experts.
AUT_Maverick
New Contributor III

Macmon API FortiSwitch

The question is, since Macmon seems to talk to Fortinet via API, if this works anyway when Fortigate interacts as controller for the switches and gets a command from Macmon e.g. to move a port to a VLAN. Or if a special license is needed to use the API.

HUVA
HUVA
5 REPLIES 5
xshkurti
Staff
Staff

@AUT_Maverick 
Currently no special license is needed in FortiGate appliance to use API
You can configure API right way.

Not sure if the same applies for Macmon, for that you have to ask Macmon support
For more information:
Using APIs | FortiGate / FortiOS 7.4.1 | Fortinet Document Library

Assigning VLANs to switch ports | FortiGate / FortiOS 7.0.0 | Fortinet Document Library

 

Also in our development site you may find what you request for:

https://fndn.fortinet.net/

AUT_Maverick

Is it possible that Macmon sends a command via API to Fortigate which gives the information e.g. to move a port to a VLAN?

HUVA
HUVA
ebilcari

I tried to do a VLAN change from FNAC that uses API for it and this are the results of the debug from the FGT, if they may help you.

The API call is: '/api/v2/cmdb/switch-controller/managed-switch/S108Exxxx/ports/port5', I can't find how the VLAN is communicated.

 

 # dia de app httpsd -1
 # di de en
New PUT request for "/api/v2/cmdb/switch-controller/managed-switch/S108Exxxx/ports/port5"
Handler "api_cmdb_v2-handler" assigned to request
..
api_cmdb_request_init_by_path[1800] -- new CMDB query (path='switch-controller',name='managed-switch')
api_cmdb_request_init_by_path[1829] -- querying CMDB entry (mkey='S108Exxxxx')
api_cmdb_request_init_child[1881] -- new CMDB child query for 'switch-controller.managed-switch:ports'
api_cmdb_request_init_child[1919] -- querying CMDB child entry (mkey='port5')
handle_cli_req_v2[3288] -- new CMDB API request (vdom='root',user='fortinac')
_api_cmdb_v2_config[1344] -- found legacy 'json' parameter - feature is deprecated
_api_cmdb_v2_config[1419] -- editing CLI object (append=0, auto_key=0, path=switch-controller, name=managed-switch, mkey=S108Exxxxx, flags=0)
api_set_cmdb_attr[2393] -- 'vlan'

 

If the request is sent to Standalone switch this is how it looks like:

Received '/api/v2/cmdb/switch/interface/port1'
setting attribute 'native-vlan' : '513'0: config switch interface

 

- Emirjon
If you have found a solution, please like and accept it to make it easily accessible for others.
xshkurti
Staff
Staff

@AUT_Maverick 

 

FortiGate REST API is used for automated configuration, backup creation, and monitoring.

 

To clarify, you are requesting information about Macmon if it is able to send commands, or if fortigate is able to receive commands? What is your exact question related to Fortigate here?

For Macmon, you have to contact their support. We do not provide support on macmon or any other third party solutions.

JakeLawson
New Contributor

While exploring the integration possibilities, I wondered if FortiGate, acting as the controller for the switches, could seamlessly execute commands received from Macmon, such as moving a port to a VLAN. The details regarding the compatibility and specific licensing requirements for this rigid box packaging API interaction are somewhat unclear.

Announcements

Select Forum Responses to become Knowledge Articles!

Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.

Labels
Top Kudoed Authors