githubpartners / microsoft-learn

The planning and tracking of GitHub modules on MS Learn
7 stars 6 forks source link

MS Learn Module Update Request: Run Docker containers with Azure Container Instances #175

Closed mjbear closed 1 month ago

mjbear commented 1 month ago

Which of the MS Learn modules from the dropdown are you submitting an update request?

None

Additional information

Information about the requested update

module: Run Docker containers with Azure Container Instances unit: Exercise - Troubleshoot Azure Container Instances url: https://learn.microsoft.com/en-us/training/modules/run-docker-with-azure-container-instances/6-troubleshoot-aci section: Monitor CPU and memory usage on your container

The az monitor metrics list commands don't seem to work as advertised (in the training unit) since they do not display CPU or memory values.

CONTAINER_ID=$(az container show --resource-group learn-deploy-aci-rg --name aci-demo-files --query id --output tsv)

yourname [ ~ ]$ az monitor metrics list --resource $CONTAINER_ID --metrics CPUUsage 
--output table
Timestamp             Name
--------------------  ---------
2024-09-29T13:44:00Z  CPU Usage
2024-09-29T13:45:00Z  CPU Usage
2024-09-29T13:46:00Z  CPU Usage
2024-09-29T13:47:00Z  CPU Usage
... snipped ...

yourname [ ~ ]$ az monitor metrics list --resource $CONTAINER_ID --metrics MemoryUsage --output table
Timestamp             Name
--------------------  ------------
2024-09-29T13:45:00Z  Memory Usage
2024-09-29T13:46:00Z  Memory Usage
2024-09-29T13:47:00Z  Memory Usage
2024-09-29T13:48:00Z  Memory Usage
2024-09-29T13:49:00Z  Memory Usage
... snipped ...

https://learn.microsoft.com/en-us/cli/azure/monitor/metrics?view=azure-cli-latest#az-monitor-metrics-list

:arrow_right: What am I missing or doing wrong :question:

a-a-ron commented 1 month ago

Hey @mjbear, thanks for reaching out. Unfortunately, our team does not maintain this module. Please refer to the help link provided at the end of the summary unit within the module for support.

mjbear commented 1 month ago

Hey @mjbear, thanks for reaching out. Unfortunately, our team does not maintain this module. Please refer to the help link provided at the end of the summary unit within the module for support.

Thank you @a-a-ron! Apologies for the noise ... and goodness knows I've sent your group a few items. :hand_over_mouth:

mjbear commented 1 month ago

In case someone has the same problem and finds this in the future, I opened the following Microsoft Q&A topic. https://learn.microsoft.com/en-us/answers/questions/2085377/az-monitor-metrics-command-output-missing-averages