A guide to sending your logs from FortiGate to Microsoft Sentinel using the Azure Monitor Agent (AMA).
Some customers may require to forward logs to one or more SIEM solutions, such as Microsoft Sentinel.
The guide provides a comprehensive walkthrough for integrating FortiGate with Microsoft Sentinel via Azure Monitor Agent (AMA). Other options are available via FortiAnalyzer (e.g. to reduce the number of logs send to Microsoft Sentinel) or have been available but have been deprecated since by Microsoft.
To ingest CEF logs from FortiGate into Microsoft Sentinel, a dedicated Linux machine is configured to serve as proxy server for log collection and forwarding to the Microsoft Sentinel workspace.
The Linux machine is structured with two key components:
Syslog Daemon (Log Collector): Utilizing either rsyslog or syslog-ng, this daemon performs dual functions:
Azure Monitor Agent (AMA): The agent parses the logs and then sends them to your Microsoft Sentinel (Log Analytics) workspace via HTTPS 443.
For more details please review this link
Prerequisites:
To establish the integration between Microsoft Sentinel and FortiGate, follow these steps:
You can find below an ARM template example for DCR configuration:
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"dataCollectionRules_ya_dcr_ama_agent_name": {
"defaultValue": "mydcr",
"type": "String"
},
"workspaces_ya_faz_ama_externalid": {
"defaultValue": "/subscriptions/xxxxxxxxxxxxxxxxxxxxxx/resourceGroups/ya-faz-sentinel-ama/providers/Microsoft.OperationalInsights/workspaces/ya-faz-ama",
"type": "String"
}
},
"variables": {},
"resources": [
{
"type": "Microsoft.Insights/dataCollectionRules",
"apiVersion": "2023-03-11",
"name": "[parameters('dataCollectionRules_ya_dcr_ama_agent_name')]",
"location": "westeurope",
"tags": {
"createdBy": "Sentinel"
},
"kind": "Linux",
"identity": {
"type": "SystemAssigned"
},
"properties": {
"dataSources": {
"syslog": [
{
"streams": [
"Microsoft-CommonSecurityLog"
],
"facilityNames": [
"local7"
],
"logLevels": [
"Notice",
"Warning",
"Error",
"Critical",
"Alert",
"Emergency"
],
"name": "sysLogsDataSource-1039681479"
},
{
"streams": [
"Microsoft-CommonSecurityLog"
],
"facilityNames": [
"nopri"
],
"logLevels": [
"Emergency"
],
"name": "sysLogsDataSource-1697966155"
}
]
},
"destinations": {
"logAnalytics": [
{
"workspaceResourceId": "[parameters('workspaces_ya_faz_ama_externalid')]",
"name": "DataCollectionEvent"
}
]
},
"dataFlows": [
{
"streams": [
"Microsoft-CommonSecurityLog"
],
"destinations": [
"DataCollectionEvent"
]
}
]
}
}
]
}
Install the Common Event Format (CEF) collector on a Linux machine by executing the following Python script:
sudo wget -O Forwarder_AMA_installer.py https://raw.githubusercontent.com/Azure/Azure-Sentinel/master/DataConnectors/Syslog/Forwarder_AMA_installer.py&&sudo python3 Forwarder_AMA_installer.py
Following this configuration on the Linux machine, the FortiGate device is then set up to dispatch Syslog messages with TCP port 514 in CEF format to the designated proxy machine using the provided command:
config log syslogd setting
set status enable
set server "liux VM IP address"
set mode reliable
set facility local7
set format cef
end
The facility to local7 has been configured should match "Collect" in the Data Collection Rule configuration.
diagnose test application syslogd 4
sudo systemctl restart rsyslog
netstat -lnptv
tcpdump -i any port 514 -A -vv &
After you complete the validation, we recommend that you stop the tcpdump: Type fg and then select Ctrl+C
sudo wget -O Sentinel_AMA_troubleshoot.py https://raw.githubusercontent.com/Azure/Azure-Sentinel/master/DataConnectors/Syslog/Sentinel_AMA_troubleshoot.py&&sudo python3 Sentinel_AMA_troubleshoot.py --cef
You can review the link for more technical details about FortiGate integration With Microsoft Sentinel.
Log forwarding to Microsoft Sentinel can lead to significant costs, making it essential to implement an efficient filtering mechanism. In essence, you have the flexibility to toggle the traffic log on or off via the graphical user interface (GUI) on FortiGate devices, directing it to either FortiAnalyzer or a syslog server, and specifying the severity level.
Additionally, you can undertake more advanced filtering through CLI, allowing for tailored filtering based on specific values. Please refer to the following link.
On the other hand, you can select the minimum log level for each facility from DCR (collect tab). When you select a log level, Microsoft Sentinel collects logs for the selected level and other levels with higher severity. For example, if you select LOG_ERR, Microsoft Sentinel collects logs for the LOG_ERR, LOG_CRIT, LOG_ALERT, and LOG_EMERG levels.
Additional links to documents, tips and deprecated options:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.