Query metrics from Azure Monitor.

yaml
type: "io.kestra.plugin.azure.monitoring.Push"

Query CPU utilization from Azure Monitor for multiple VMs

yaml
id: "push"
type: "io.kestra.plugin.azure.monitoring.Push"
id: azure_monitor_query
namespace: company.team
tasks:
  - id: query
    type: io.kestra.plugin.azure.monitoring.Query
    tenantId: "{{ secret('AZURE_TENANT_ID') }}"
    clientId: "{{ secret('AZURE_CLIENT_ID') }}"
    clientSecret: "{{ secret('AZURE_CLIENT_SECRET') }}"
    resourceIds:
      - "/subscriptions/xxx/resourceGroups/rg/providers/Microsoft.Compute/virtualMachines/vm1"
      - "/subscriptions/xxx/resourceGroups/rg/providers/Microsoft.Compute/virtualMachines/vm2"
    metricNames:
      - "Percentage CPU"
    metricsNamespace: "Microsoft.Compute/virtualMachines"
    window: PT5M
    aggregations:
      - "Average"
      - "Maximum"
Properties

Azure Monitor Metrics regional endpoint

Must be the regional endpoint (e.g. https://westeurope.metrics.monitor.azure.com)

Metric data body

DCR ingestion path

Tenant ID

Client ID

Client ID of the Azure service principal. If you don't have a service principal, refer to create a service principal with Azure CLI.

Client Secret

Service principal client secret. The tenantId, clientId and clientSecret of the service principal are required for this credential to acquire an access token.

PEM Certificate

text
Your stored PEM certificate.
The tenantId, clientId and clientCertificate of the service principal are required for this credential to acquire an access token.