MicrosoftDocs / azure-docs

Open source documentation of Microsoft Azure
https://docs.microsoft.com/azure
Creative Commons Attribution 4.0 International
10.23k stars 21.39k forks source link

Instructions to Enable Container insights using Azure policy are not correct #122661

Closed theok-nice closed 3 months ago

theok-nice commented 4 months ago

[Enter feedback here]

I am following instructions from https://learn.microsoft.com/en-us/azure/azure-monitor/containers/kubernetes-monitoring-enable?tabs=policy#azure-cli

When I am executing step

  1. Create the policy definition using the following CLI command: az policy definition create --name "AKS-Monitoring-Addon-MSI" --display-name "AKS-Monitoring-Addon-MSI" --mode Indexed --metadata version=1.0.0 category=Kubernetes --rules azure-policy.rules.json --params azure-policy.parameters.json

I am getting error

(InvalidPolicyParameterType) The policy 'AKS-Monitoring-Addon-MSI' has parameter(s) 'enableSyslog,enableContainerLogV2' with invalid types. The allowed parameter definition types are 'String,Array,Object,Boolean,Integer,Float,DateTime'.
Code: InvalidPolicyParameterType
Message: The policy 'AKS-Monitoring-Addon-MSI' has parameter(s) 'enableSyslog,enableContainerLogV2' with invalid types. The allowed parameter definition types are 'String,Array,Object,Boolean,Integer,Float,DateTime'.

Files that are referenced in this page, looks like that have some bug.

Also, sentence after step 3 don't seam accurate

After the policy is assigned to the subscription, whenever you create a new cluster without Prometheus enabled, the policy will run and deploy to enable Prometheus monitoring.

Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

TPavanBalaji commented 4 months ago

@theok-nice Thanks for your feedback! We will investigate and update as appropriate.

AaronMaxwell commented 3 months ago

Thanks for your dedication to our documentation. This issue has been moved to an internal work item for triage and prioritization. Thanks in advance for your understanding as we investigate to provide the most accurate documentation updates. #please-close

Internal work item: https://dev.azure.com/msft-skilling/Content/_workitems/edit/262443

Please also note that GitHub documentation issues are being phased out completely. For more information see: https://aka.ms/ContentUserFeedback.

Our support team is available to assist you if you have any pressing questions or problems that need to be resolved. You can create a support ticket by visiting the following link: https://azure.microsoft.com/support/create-ticket/

You may also ask support questions to our Q&A forums or on Stack Overflow when the questions are related to coding.