{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "workspace": {
      "type": "String"
    }
  },
  "resources": [
    {
      "apiVersion": "2024-01-01-preview",
      "id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/providers', parameters('workspace'), 'Microsoft.SecurityInsights'),'/alertRules/f160411a-0351-41d5-bc44-53fc6b0ffc13')]",
      "kind": "Scheduled",
      "name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/f160411a-0351-41d5-bc44-53fc6b0ffc13')]",
      "properties": {
        "alertDetailsOverride": {
          "alertDescriptionFormat": "Incident ID {{id}} detected for category '{{incidentType}}'.",
          "alertDisplayNameFormat": "KELA Monitor: {{sub_type_description}} (Severity {{severity}})"
        },
        "alertRuleTemplateName": "f160411a-0351-41d5-bc44-53fc6b0ffc13",
        "customDetails": {
          "Actor": "author",
          "BotID": "bot_id",
          "IncidentType": "incidentType",
          "Service": "service",
          "SubType": "sub_type_description"
        },
        "description": "Identifies unresolved incidents ingested from the KELA Monitor API, regardless of their original severity.\n",
        "displayName": "KELA Monitor Unresolved Incident",
        "enabled": true,
        "entityMappings": [
          {
            "entityType": "Account",
            "fieldMappings": [
              {
                "columnName": "email",
                "identifier": "FullName"
              },
              {
                "columnName": "username",
                "identifier": "Name"
              }
            ]
          },
          {
            "entityType": "IP",
            "fieldMappings": [
              {
                "columnName": "ip",
                "identifier": "Address"
              }
            ]
          },
          {
            "entityType": "DNS",
            "fieldMappings": [
              {
                "columnName": "domain",
                "identifier": "DomainName"
              }
            ]
          },
          {
            "entityType": "URL",
            "fieldMappings": [
              {
                "columnName": "source_url",
                "identifier": "Url"
              }
            ]
          }
        ],
        "OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/KELAMonitor/Analytic%20Rules/KELAMonitor_Unresolved_Detection.yaml",
        "query": "KELA_Monitor_Incidents_CL\n| summarize arg_max(TimeGenerated, *) by id\n| where severity >= 1\n",
        "queryFrequency": "PT1H",
        "queryPeriod": "PT1H",
        "severity": "Medium",
        "status": "Available",
        "subTechniques": [],
        "suppressionDuration": "PT1H",
        "suppressionEnabled": false,
        "tactics": [
          "CredentialAccess",
          "InitialAccess",
          "ResourceDevelopment"
        ],
        "techniques": [
          "T1078",
          "T1555",
          "T1566",
          "T1586"
        ],
        "templateVersion": "1.0.0",
        "triggerOperator": "GreaterThan",
        "triggerThreshold": 0
      },
      "type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
    }
  ]
}
