Azure scale set

Hi,

I am trying to add a custom autoscale setting for Machine Scale Set Azure but i am having the following error:

module.vmss_idotest-w.azurerm_monitor_autoscale_setting.auto: Modifying… [id=/…/providers/microsoft.insights/autoscalesettings/auto-scale-set-…-idotest-w]

Error: Error creating AutoScale Setting “auto-scale-set-…-idotest-w” (Resource Group “…”): insights.AutoscaleSettingsClient#CreateOrUpdate: Failure responding to request: StatusCode=400 – Original Error: autorest/azure: Service returned an error. Status=400 Code=“UnsupportedMetric” Message=“Exception of type ‘Microsoft.WindowsAzure.Management.Monitoring.MonitoringServiceException’ was thrown.”

Is it possible to define “metric namespace” ?

Thanks,
Ido

Hi @idokaplan
Is there any code-snipped you could share?

Hi,

Is it enough?

    metric_trigger {
      metric_name        = "XXX"
      metric_resource_id = azurerm_windows_virtual_machine_scale_set.winsrv_vmss.id
      time_grain         = "PT1M"
      statistic          = "Average"
      time_window        = "PT5M"
      time_aggregation   = "Average"
      operator           = "GreaterThan"
      threshold          = 50 
    }

Thanks,
Ido

Are you looking for a custom metric instead of the predefined ones?

yes, i’m looking for a custom metric instead of the “XXX”