{
  "kind": "StaticUI",
  "armId": "/subscriptions/419581d6-4853-49bd-83b6-d94bb8a77887/resourceGroups/eco-connector-test/providers/Microsoft.OperationalInsights/workspaces/eco-connector-test/providers/Microsoft.SecurityInsights/dataConnectors/AzureKubernetesConnector",
  "title": "Azure Kubernetes Service (AKS)",
  "connectivityCriterias": [
    {
      "type": "IsConnectedQuery",
      "value": [
        "AzureDiagnostics | where Category == \"kube-apiserver\"\n            | summarize LastLogReceived = max(TimeGenerated)\n            | project IsConnected = LastLogReceived > ago(7d)",
        "AzureDiagnostics | where Category == \"kube-audit\"\n            | summarize LastLogReceived = max(TimeGenerated)\n            | project IsConnected = LastLogReceived > ago(7d)",
        "AzureDiagnostics | where Category == \"kube-audit-admin\"\n            | summarize LastLogReceived = max(TimeGenerated)\n            | project IsConnected = LastLogReceived > ago(7d)",
        "AzureDiagnostics | where Category == \"kube-controller-manager\"\n            | summarize LastLogReceived = max(TimeGenerated)\n            | project IsConnected = LastLogReceived > ago(7d)",
        "AzureDiagnostics | where Category == \"kube-scheduler\"\n            | summarize LastLogReceived = max(TimeGenerated)\n            | project IsConnected = LastLogReceived > ago(7d)",
        "AzureDiagnostics | where Category == \"cluster-autoscaler\"\n            | summarize LastLogReceived = max(TimeGenerated)\n            | project IsConnected = LastLogReceived > ago(7d)",
        "AzureDiagnostics | where Category == \"guard\"\n            | summarize LastLogReceived = max(TimeGenerated)\n            | project IsConnected = LastLogReceived > ago(7d)"
      ]
    }
  ],
  "id": "AzureKubernetes",
  "publisher": "Microsoft",
  "logo": "AzureKubernetes.svg",
  "lastDataReceivedInfoBalloon": "If no new data has been received in the last 14 days, the connector will display as being \"not connected.\" When the connector will recive data , the \"connected\" status will return.",
  "descriptionMarkdown": "Azure Kubernetes Service (AKS) is an open-source, fully-managed container orchestration service that allows you to deploy, scale, and manage Docker containers and container-based applications in a cluster environment. This connector lets you stream your Azure Kubernetes Service (AKS) diagnostics logs into Microsoft Sentinel, allowing you to continuously monitor activity in all your instances. For more information, see the [Microsoft Sentinel documentation](https://go.microsoft.com/fwlink/p/?linkid=2219762&wt.mc_id=sentinel_dataconnectordocs_content_cnl_csasci).",
  "graphQueries": [
    {
      "metricName": "Total data received",
      "legend": "kube-apiserver",
      "baseQuery": "AzureDiagnostics | where Category == \"kube-apiserver\""
    },
    {
      "metricName": "Total data received",
      "legend": "kube-audit",
      "baseQuery": "AzureDiagnostics | where Category == \"kube-audit\""
    },
    {
      "metricName": "Total data received",
      "legend": "kube-audit-admin",
      "baseQuery": "AzureDiagnostics | where Category == \"kube-audit-admin\""
    },
    {
      "metricName": "Total data received",
      "legend": "kube-controller-manager",
      "baseQuery": "AzureDiagnostics | where Category == \"kube-controller-manager\""
    },
    {
      "metricName": "Total data received",
      "legend": "kube-scheduler",
      "baseQuery": "AzureDiagnostics | where Category == \"kube-scheduler\""
    },
    {
      "metricName": "Total data received",
      "legend": "cluster-autoscaler",
      "baseQuery": "AzureDiagnostics | where Category == \"cluster-autoscaler\""
    },
    {
      "metricName": "Total data received",
      "legend": "guard",
      "baseQuery": "AzureDiagnostics | where Category == \"guard\""
    }
  ],
  "sampleQueries": [
    {
      "description": "All logs",
      "query": "ContainerInventory\n            | project Computer, Name, Image, ImageTag, ContainerState, CreatedTime, StartedTime, FinishedTime\n                                                                                 | top 200 by FinishedTime desc"
    },
    {
      "description": "All logs",
      "query": "KubeEvents\n            |where TimeGenerated > ago(7d) \n                                                                         | where not(isempty(Namespace))\n                                                                         | top 200 by TimeGenerated desc"
    }
  ],
  "dataTypes": [
    {
      "name": "kube-apiserver",
      "lastDataReceivedQuery": "AzureDiagnostics | where Category == \"kube-apiserver\"\n            | summarize Time = max(TimeGenerated)\n            | where isnotempty(Time)"
    },
    {
      "name": "kube-audit",
      "lastDataReceivedQuery": "AzureDiagnostics | where Category == \"kube-audit\"\n            | summarize Time = max(TimeGenerated)\n            | where isnotempty(Time)"
    },
    {
      "name": "kube-audit-admin",
      "lastDataReceivedQuery": "AzureDiagnostics | where Category == \"kube-audit-admin\"\n            | summarize Time = max(TimeGenerated)\n            | where isnotempty(Time)"
    },
    {
      "name": "kube-controller-manager",
      "lastDataReceivedQuery": "AzureDiagnostics | where Category == \"kube-controller-manager\"\n            | summarize Time = max(TimeGenerated)\n            | where isnotempty(Time)"
    },
    {
      "name": "kube-scheduler",
      "lastDataReceivedQuery": "AzureDiagnostics | where Category == \"kube-scheduler\"\n            | summarize Time = max(TimeGenerated)\n            | where isnotempty(Time)"
    },
    {
      "name": "cluster-autoscaler",
      "lastDataReceivedQuery": "AzureDiagnostics | where Category == \"cluster-autoscaler\"\n            | summarize Time = max(TimeGenerated)\n            | where isnotempty(Time)"
    },
    {
      "name": "guard",
      "lastDataReceivedQuery": "AzureDiagnostics | where Category == \"guard\"\n            | summarize Time = max(TimeGenerated)\n            | where isnotempty(Time)"
    }
  ],
  "instructionSteps": [
    {
      "title": "Connect your Azure Kubernetes Service (AKS) diagnostics logs into Sentinel.",
      "description": "This connector uses Azure Policy to apply a single Azure Kubernetes Service log-streaming configuration to a collection of instances, defined as a scope.\nFollow the instructions below to create and apply a policy to all current and future instances. **Note**, you may already have an active policy for this resource type.",
      "instructions": [
        {
          "parameters": {
            "noFxPadding": true,
            "expanded": true,
            "instructionSteps": [
              {
                "title": "Stream diagnostics logs from your Azure Kubernetes Service (AKS) at scale",
                "description": null,
                "innerSteps": [
                  {
                    "title": "Launch the Azure Policy Assignment wizard and follow the steps.",
                    "description": ">1. In the **Basics** tab, click the button with the three dots under **Scope** to select your resources assignment scope.\n        >2. In the **Parameters** tab, choose your Microsoft Sentinel workspace from the **Log Analytics workspace** drop-down list, and leave marked as \"True\" all the log and metric types you want to ingest.\n        >3. To apply the policy on your existing resources, select the **Remediation tab** and mark the **Create a remediation task** checkbox.",
                    "instructions": [
                      {
                        "parameters": {
                          "linkType": "OpenPolicyAssignment",
                          "policyDefinitionGuid": "6c66c325-74c8-42fd-a286-a74b0e2939d8",
                          "assignMode": 1
                        },
                        "type": "InstallAgent"
                      }
                    ]
                  }
                ]
              }
            ]
          },
          "type": "InstructionStepsGroup"
        }
      ]
    }
  ],
  "permissions": {
    "resourceProvider": [
      {
        "provider": "Microsoft.OperationalInsights/workspaces",
        "permissionsDisplayText": "read and write permissions.",
        "providerDisplayName": "Workspace",
        "scope": "Workspace",
        "requiredPermissions": {
          "read": true,
          "write": true,
          "delete": true
        }
      }
    ],
    "customs": [
      {
        "name": "Policy",
        "description": "owner role assigned for each policy assignment scope."
      }
    ]
  },
  "availability": {
    "status": 2,
	"isPreview": false,
    "featureFlag": {
      "feature": "AzureKubernetesFeature",
      "featureStates": {
        "1": 2,
        "2": 2,
        "3": 2,
        "4": 2,
        "5": 2,
        "6": 1,
        "7": 1,
        "8": 2
      }
    }
  },
  "ascAssessment": {
    "assessmentKey": "86ea1a79-29d3-4eac-a9f4-3541ace4e718",
    "assessmentLinkText": "Enable Microsoft Defender for AKS now",
    "assessmentDescriptions": "Microsoft Defender for Kubernetes provides real-time protection for your Azure Kubernetes Services. Enable Microsoft Defender for Kubernetes,connect it into Sentinel, and use AKS diagnostic logs in order to investigate Microsoft Defender alerts into a root cause in Sentinel.",
    "assessmentSectionTitleText": "Enable Microsoft Defender for Kubernetes - Recommended!"
  },
  "metadata": {
    "contentId": "AzureKubernetesConnector",
    "parentId": "/subscriptions/419581d6-4853-49bd-83b6-d94bb8a77887/resourceGroups/eco-connector-test/providers/Microsoft.OperationalInsights/workspaces/eco-connector-test/providers/Microsoft.SecurityInsights/dataConnectors/AzureKubernetesConnector",
    "kind": "DataConnector",
    "version": "2.0.0",
    "source": {
      "kind": "Solution",
      "name": "AzureKubernetes",
      "sourceId": "azuresentinel.azure-sentinel-solution-testingoffers2"
    },
    "author": {
      "name": "Microsoft",
      "email": "support@microsoft.com"
    },
    "support": {
      "tier": "Microsoft",
      "name": "Microsoft Corporation",
      "email": "support@microsoft.com",
      "link": "https://support.microsoft.com/"
    }
  }
}
