LAN Network
snmp-server contact "<contact>" location "<location>" snmpv3 enable snmpv3 only snmpv3 user xormon auth sha <AuthPass> priv aes <PrivPass> snmpv3 group managerpriv user "xormon" sec-model ver3
$ interface vlan { vlan-id | vlan-range}
![]() |
snmpwalk -v 2c -c public 192.168.1.1 1.3.6.1.2.1.1.5
![]() |
snmpwalk -v 2c -c public 192.168.1.1 1.3.6.1.2.1.1.5
XorMon monitors FortiGate firewalls through the FortiOS REST API v2
(/api/v2/monitor/* and /api/v2/cmdb/*).
No SNMP is required. Managed FortiSwitch and FortiAP
devices are discovered through the FortiGate controller API.
Official Fortinet documentation (public):
Detailed API reference lives on Fortinet Developer Network (FNDN) and requires a Fortinet account. The steps below are taken from the public Administration Guide.
XorMon supports both options in the device configuration dialog:
| Method | XorMon UI | FortiOS mechanism | Recommendation |
|---|---|---|---|
| API Token | API Token |
REST API Admin user; header
Authorization: Bearer <token>.
Fortinet recommends token authentication for automated API access
(Using APIs).
|
Recommended |
| Username / Password | Username / Password (session) |
Standard administrator account; session login via /logincheck
with session cookie reused for API requests.
Each login consumes a session slot until logout or timeout.
|
Fallback only |
Read-only only.
Fortinet recommends least privilege: avoid super_admin for monitoring.
Use a custom profile with Read permissions, or the built-in
super_admin_readonly profile
(REST API administrator).
XorMon must not use Read-Write or admin tokens for routine polling.
0.0.0.0/0 is not allowed.curl --insecure when verifying the token.
Only a super_admin can create REST API administrators
(REST API administrator).
GUI (from Administrator profiles):
super_admin.xormon_ro (remember the name for Step 2).sysgrp)netgrp)fwgrp)vpngrp)wifi) — required for managed FortiSwitch/FortiAPloggrp)secfabgrp) — if Security Fabric metrics are usedAlternative: assign built-in profile super_admin_readonly instead of a custom profile (Fortinet documented option for generic read-only API access).
CLI (config system accprofile):
config system accprofile
edit "xormon_ro"
set secfabgrp read
set ftviewgrp read
set authgrp read
set sysgrp read
set netgrp read
set loggrp read
set fwgrp read
set vpngrp read
set utmgrp read
set wanoptgrp read
set wifi read
next
end
GUI (from REST API administrator):
xormon_api.
Do not use characters < > ( ) # " ' in the username (XSS risk per Fortinet).xormon_ro from Step 1 (minimum permissions required).10.0.0.100/32). IPv6 supported.CLI (config system api-user):
config system api-user
edit "xormon_api"
set accprofile "xormon_ro"
set vdom "root"
config trusthost
edit 1
set ipv4-trusthost 10.0.0.100/32
next
end
next
end
execute api-user generate-key xormon_api
Fortinet recommended authentication (Using APIs):
curl --insecure \
-H "Accept: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
https://FORTIGATE_IP/api/v2/monitor/system/status
Expected: JSON with "status": "success".
Do not pass the token in the URL (?access_token=).
Fortinet strongly recommends the request header. XorMon uses Bearer header only.
URL query tokens require config system global → set rest-api-key-url-query enable and are discouraged.
Use only when REST API Admin cannot be created:
xormon_ro or super_admin_readonly.Session auth consumes FortiGate login slots. Prefer API token where possible.
Add the FortiGate from the UI:
443; use custom port if management HTTPS listens elsewhere).
/api/v2/monitor/switch-controller/*, /api/v2/monitor/wifi/*.| Symptom | Likely cause | Action |
|---|---|---|
| HTTP 401 | Invalid/expired token; wrong credentials | Regenerate token; verify profile assignment |
| HTTP 403 on some endpoints | Missing Read on accprofile group | Add Read permissions on the relevant accprofile groups |
| Connection timeout | Firewall, trusted hosts, wrong port | Open HTTPS; add collector IP to trusted hosts |
| SSL error | Self-signed cert | Trust CA on the collector or use curl --insecure for verification |
| No switches/APs | Missing wifi read; devices not FortiLink-managed |
Check accprofile; verify FortiLink on FortiGate |
| Session limit (password auth) | Too many concurrent logins | Switch to API token |
snmp-server contact "<contact>" location "<location>" snmpv3 enable snmpv3 only snmpv3 user xormon auth sha <AuthPass> priv aes <PrivPass> snmpv3 group managerpriv user "xormon" sec-model ver3
$ interface vlan { vlan-id | vlan-range}
![]() |
snmpwalk -v 2c -c public 192.168.1.1 1.3.6.1.2.1.1.5