Project: KICS (Provisioning / Security & Compliance)
File: d5e83b32-56dd-4247-8c2e-074f43b38a5e.md

title: AKS Monitoring Logging Disabled hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: d5e83b32-56dd-4247-8c2e-074f43b38a5e Query name: AKS Monitoring Logging Disabled Platform: Ansible Severity: <span style="color:#ff7213">Medium</span> Category: Observability URL: Azure Container Service (AKS) instance should have logging enabled to Azure Monitoring<br> ```yaml title="Positive test num. 1 - yaml file" hl_lines="2 43 68 94" name: Create an AKS instance v0 azurermaks: name: myAKS resource_group: myResourceGroup location: eastus dns_prefix: akstest kubernetes_version: 1.14.6 linux_profile: admin_username: azureuser ssh_key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAA... service_principal: client_id: "cf72ca99-f6b9-4004-b0e0-bee10c521948" client_secret: "Password1234!" agentpoolprofiles: name: default count: 1 vmsize: StandardDS1_v2 type: VirtualMachineScaleSets max_count: 3 min_count: 1 enable_rbac: yes name: Create an AKS instance azurermaks: name: myAKS resource_group: myResourceGroup location: eastus dns_prefix: akstest kubernetes_version: 1.14.6 linux_profile: admin_username: azureuser ssh_key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAA... service_principal: client_id: "cf72ca99-f6b9-4004-b0e0-bee10c521948" client_secret: "Password1234!" agentpoolprofiles: name: default count: 1 vmsize: StandardDS1_v2 type: VirtualMachineScaleSets max_count: 3 min_count: 1 enable_rbac: yes addon: httpapplicationrouting: enabled: yes name: Create an AKS instance v3 azurermaks: name: myAKS resource_group: myResourceGroup location: eastus dns_prefix: akstest kubernetes_version: 1.14.6 linux_profile: admin_username: azureuser ssh_key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAA... service_principal: client_id: "cf72ca99-f6b9-4004-b0e0-bee10c521948" client_secret: "Password1234!" agentpoolprofiles: name: default count: 1 vmsize: StandardDS1_v2 type: VirtualMachineScaleSets max_count: 3 min_count: 1 enable_rbac: yes addon: monitoring: loganalyticsworkspaceresourceid: "qwqeqe" name: Create an AKS instance v9 azurermaks: name: myAKS resource_group: myResourceGroup location: eastus dns_prefix: akstest kubernetes_version: 1.14.6 linux_profile: admin_username: azureuser ssh_key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAA... service_principal: client_id: "cf72ca99-f6b9-4004-b0e0-bee10c521948" client_secret: "Password1234!" agentpoolprofiles: name: default count: 1 vmsize: StandardDS1_v2 type: VirtualMachineScaleSets max_count: 3 min_count: 1 enable_rbac: yes addon: monitoring: loganalyticsworkspaceresourceid: "qwqeqe" enabled: no ``` ```yaml title="Negative test num. 1 - yaml file" name: Create an AKS instance v4 azurermaks: name: myAKS resource_group: myResourceGroup location: eastus dns_prefix: akstest kubernetes_version: 1.14.6 linux_profile: admin_username: azureuser ssh_key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAA... service_principal: client_id: cf72ca99-f6b9-4004-b0e0-bee10c521948 client_secret: Password1234! agentpoolprofiles: name: default count: 1 vmsize: StandardDS1_v2 type: VirtualMachineScaleSets max_count: 3 min_count: 1 enable_rbac: yes addon: monitoring: loganalyticsworkspaceresourceid: qwqeqe enabled: yes ```