Query metrics from Azure Monitor.
type: "io.kestra.plugin.azure.monitoring.Push"Examples
Query CPU utilization from Azure Monitor for multiple VMs
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
endpoint *Requiredstring
Azure Monitor Metrics regional endpoint
Must be the regional endpoint (e.g. https://westeurope.metrics.monitor.azure.com)
metrics *Requiredobject
Metric data body
path *Requiredstring
DCR ingestion path
tenantId *Requiredstring
Tenant ID
clientId string
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.
clientSecret string
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.
pemCertificate string
PEM Certificate
Your stored PEM certificate.
The tenantId, clientId and clientCertificate of the service principal are required for this credential to acquire an access token.