> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/appsec-rules/iac-security/monitoring/appsec-azure-4.md).

# Azure AKS cluster monitoring not enabled misconfiguration detected in code

## Rule Details

|                        |                                       |
| ---------------------- | ------------------------------------- |
| Cortex AppSec Rule ID  | APPSEC\_AZURE\_4                      |
| Category - Subcategory | Kubernetes - Logging And Monitoring   |
| Provider               | AZURE                                 |
| Severity               | LOW                                   |
| Framework              | ARM, Bicep, Terraform, Terraform Plan |
| Mapped CSPM/KSPM Rule  | 455d48c0-5775-4a69-9844-083b33d68781  |

## Impact

The Azure Monitoring service collects and stores valuable telemetry reported by AKS. This includes memory and processor metrics for controllers, nodes and containers logs, and logs from the individual containers. This data is accessible through Azure Log Analytics for the AKS cluster and Azure Monitor instance. We recommend storing memory and processor metrics from containers, nodes, and controllers. This enables strong real-time and post-mortem analysis of unknown behaviors in AKS clusters.

## How to Fix

*Resource:* Microsoft.ContainerService/managedClusters

* *Arguments:* logAnalyticsWorkspaceResourceID \[source,go]

***

{ "$schema": "<https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#>", "contentVersion": "1.0.0.0", "parameters": { "aksResourceId": { "type": "string", "metadata": { "description": "AKS Cluster Resource ID" } }, "aksResourceLocation": { "type": "string", "metadata": { "description": "Location of the AKS resource e.g. "East US"" } }, "aksResourceTagValues": { "type": "object", "metadata": { "description": "Existing all tags on AKS Cluster Resource" } }, "workspaceResourceId": { "type": "string", "metadata": { "description": "Azure Monitor Log Analytics Resource ID" } } }, "resources": \[ { "name": "\[split(parameters('aksResourceId'),'/')\[8]]", "type": "Microsoft.ContainerService/managedClusters", "location": "\[parameters('aksResourceLocation')]", "tags": "\[parameters('aksResourceTagValues')]", "apiVersion": "2018-03-31", "properties": { "mode": "Incremental", "id": "\[parameters('aksResourceId')]", "addonProfiles": { "omsagent": { "enabled": true, "config": {

* ```
          "logAnalyticsWorkspaceResourceID": "[parameters('workspaceResourceId')]"
        }
      }
    }
  }
  ```

  } ] }

***


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://cortex-docs.paloaltonetworks.com/appsec-rules/iac-security/monitoring/appsec-azure-4.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
