Azure / Azure/azure-cli

autoscale rule create doesn't consider work for GuestOS metric from CLI

Open
#25,986 1 comment 0 reactions 1 assignee Claimed by @AllyW View on GitHub
act-observability-squad Auto-Assign Azure CLI Team customer-reported feature-request Monitor
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

az monitor autoscale rule create doesn't work when creating rules based on guest OS metrics emitted by AzureMonitorLinuxAgent.

```
root@0ac2a8a4db55:~# az monitor autoscale rule create --resource-group ls1-xxx-11583-rg --autoscale-name ls1-xxx-11583-nginx-scaleset-001 --condition 'azure.vm.linux.guestmetrics mem/used_percent > 75 avg 10m' --scale out 1
(UnsupportedMetric) resource: /subscriptions/xxxxxxxxxxx/resourceGroups/ls1-xxx-11583-rg/providers/Microsoft.Compute/virtualMachineScaleSets/ls1-xxx-11583-nginx-scaleset-001, metricnamespace: metricNamespace is null, metricname: azure.vm.linux.guestmetrics mem/used_percent
Code: UnsupportedMetric
Message: resource: /subscriptions/xxxxxxxxxxx/resourceGroups/ls1-xxx-11583-rg/providers/Microsoft.Compute/virtualMachineScaleSets/ls1-xxx-11583-nginx-scaleset-001, metricnamespace: metricNamespace is null, metricname: azure.vm.linux.guestmetrics mem/used_percent
root@0ac2a8a4db55:~#
```
P.S.: I have replaced the subscription ID with xxxxx

Metric name is not being taken into account. This works from Portal and via terraform but CLI doesn't seem to consider metric namespace azure.vm.linux.guestmetrics

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.