{
    "id": "Fortinet",
    "title": "[Deprecated] Fortinet via Legacy Agent",
    "publisher": "Fortinet",
    "logo": "FortinetLogo.svg",
    "descriptionMarkdown": "The Fortinet firewall connector allows you to easily connect your Fortinet logs with Microsoft Sentinel, to view dashboards, create custom alerts, and improve investigation. This gives you more insight into your organization's network and improves your security operation capabilities.",
    "graphQueries": [
        {
            "metricName": "Total data received",
            "legend": "Fortinet",
            "baseQuery": "\nCommonSecurityLog\n| where DeviceVendor == \"Fortinet\"\n| where DeviceProduct startswith \"Fortigate\"\n"
        }
    ],
    "sampleQueries": [
        {
            "description": "All logs",
            "query": "\nCommonSecurityLog\n| where DeviceVendor == \"Fortinet\"\n| where DeviceProduct startswith \"Fortigate\"\n\n            | sort by TimeGenerated"
        },
        {
            "description": "Summarize by destination IP and port",
            "query": "\nCommonSecurityLog\n| where DeviceVendor == \"Fortinet\"\n| where DeviceProduct startswith \"Fortigate\"\n\n            | summarize count() by DestinationIP, DestinationPort, TimeGenerated​\n            | sort by TimeGenerated"
        }
    ],
    "connectivityCriterias": [
        {
            "type": "IsConnectedQuery",
            "value": [
                "\nCommonSecurityLog\n| where DeviceVendor == \"Fortinet\"\n| where DeviceProduct startswith \"Fortigate\"\n\n            | summarize LastLogReceived = max(TimeGenerated)\n            | project IsConnected = LastLogReceived > ago(7d)"
            ]
        }
    ],
    "dataTypes": [
        {
            "name": "CommonSecurityLog (Fortinet)",
            "lastDataReceivedQuery": "\nCommonSecurityLog\n| where DeviceVendor == \"Fortinet\"\n| where DeviceProduct startswith \"Fortigate\"\n\n            | summarize Time = max(TimeGenerated)\n            | where isnotempty(Time)"
        }
    ],
    "availability": {
        "status": 2,
		"isPreview": true,
        "featureFlag": {
            "feature": "FortinetConnector",
            "featureStates": {
                "1": 2,
                "2": 2,
                "3": 2,
                "4": 2,
                "5": 2,
                "6": 1,
                "7": 1
            }
        }
    },
    "permissions": {
        "resourceProvider": [
            {
                "provider": "Microsoft.OperationalInsights/workspaces",
                "permissionsDisplayText": "read and write permissions are required.",
                "providerDisplayName": "Workspace",
                "scope": "Workspace",
                "requiredPermissions": {
                    "read": true,
                    "write": true,
                    "delete": true
                }
            },
            {
                "provider": "Microsoft.OperationalInsights/workspaces/sharedKeys",
                "permissionsDisplayText": "read permissions to shared keys for the workspace are required. [See the documentation to learn more about workspace keys](https://docs.microsoft.com/azure/azure-monitor/platform/agent-windows#obtain-workspace-id-and-key).",
                "providerDisplayName": "Keys",
                "scope": "Workspace",
                "requiredPermissions": {
                    "action": true
                }
            }
        ]
    },
    "instructionSteps": [
        {
            "title": "1. Linux Syslog agent configuration",
            "description": "Install and configure the Linux agent to collect your Common Event Format (CEF) Syslog messages and forward them to Microsoft Sentinel.\n\n> Notice that the data from all regions will be stored in the selected workspace",
            "innerSteps": [
                {
                    "title": "1.1 Select or create a Linux machine",
                    "description": "Select or create a Linux machine that Microsoft Sentinel will use as the proxy between your security solution and Microsoft Sentinel this machine can be on your on-prem environment, Azure or other clouds."
                },
                {
                    "title": "1.2 Install the CEF collector on the Linux machine",
                    "description": "Install the Microsoft Monitoring Agent on your Linux machine and configure the machine to listen on the necessary port and forward messages to your Microsoft Sentinel workspace. The CEF collector collects CEF messages on port 514 TCP.\n\n> 1. Make sure that you have Python on your machine using the following command: python --version.\n\n> 2. You must have elevated permissions (sudo) on your machine.",
                    "instructions": [
                        {
                            "parameters": {
                                "fillWith": [
                                    "WorkspaceId",
                                    "PrimaryKey"
                                ],
                                "label": "Run the following command to install and apply the CEF collector:",
                                "value": "sudo wget -O cef_installer.py https://raw.githubusercontent.com/Azure/Azure-Sentinel/master/DataConnectors/CEF/cef_installer.py &&sudo python cef_installer.py {0} {1}"
                            },
                            "type": "CopyableLabel"
                        }
                    ]
                }
            ]
        },
        {
            "title": "2. Forward Fortinet logs to Syslog agent",
            "description": "Set your Fortinet to send Syslog messages in CEF format to the proxy machine. Make sure you to send the logs to port 514 TCP on the machine’s IP address.\n\n\nCopy the CLI commands below and:\n-   Replace \"server &lt;ip address&gt;\" with the Syslog agent's IP address.\n-   Set the \"&lt;facility_name&gt;\" to use the facility you configured in the Syslog agent (by default, the agent sets this to local4).\n-   Set the Syslog port to 514, the port your agent uses.\n-   To enable CEF format in early FortiOS versions, you may need to run the command \"set csv disable\".\n\nFor more information, go to the  [Fortinet Document Library](https://aka.ms/asi-syslog-fortinet-fortinetdocumentlibrary), choose your version, and use the \"Handbook\" and \"Log Message Reference\" PDFs.\n\n[Learn more >](https://aka.ms/CEF-Fortinet)",
            "instructions": [
                {
                    "parameters": {
                        "label": "Set up the connection using the CLI to run the following commands:",
                        "value": "config log syslogd setting\n    set status enable\nset format cef\nset port 514\nset server <ip_address_of_Receiver>\nend",
                        "rows": 8
                    },
                    "type": "CopyableLabel"
                }
            ]
        },
        {
            "title": "3. Validate connection",
            "description": "Follow the instructions to validate your connectivity:\n\nOpen Log Analytics to check if the logs are received using the CommonSecurityLog schema.\n\n>It may take about 20 minutes until the connection streams data to your workspace.\n\nIf the logs are not received, run the following connectivity validation script:\n\n> 1. Make sure that you have Python on your machine using the following command: python --version\n\n>2. You must have elevated permissions (sudo) on your machine",
            "instructions": [
                {
                    "parameters": {
                        "fillWith": [
                            "WorkspaceId"
                        ],
                        "label": "Run the following command to validate your connectivity:",
                        "value": "sudo wget -O cef_troubleshoot.py https://raw.githubusercontent.com/Azure/Azure-Sentinel/master/DataConnectors/CEF/cef_troubleshoot.py &&sudo python cef_troubleshoot.py  {0}"
                    },
                    "type": "CopyableLabel"
                }
            ]
        },
        {
            "title": "4. Secure your machine ",
            "description": "Make sure to configure the machine's security according to your organization's security policy\n\n\n[Learn more >](https://aka.ms/SecureCEF)"
        }
    ],
    "metadata": {
        "id": "19ecaeff-8959-4cb8-a11e-a150ecd5a494",
        "version": "1.0.0",
        "kind": "dataConnector",
        "source": {
            "kind": "community"
        },
        "author": {
            "name": "Fortinet"
        },
        "support": {
            "name": "Fortinet",
            "link": "https://www.fortinet.com/support/contact",
            "tier": "developer"
        }
    }
}