Skip to content

Argo Workflows Metrics Quick Fix - Prometheus Monitoring

DodaTech Updated 2026-06-26 1 min read

Argo Workflows exposes Prometheus metrics for monitoring workflow execution. Misconfigured metrics or missing annotations prevent monitoring integration. This guide covers the fix.

Quick Fix

Wrong

metrics:
  prometheus:
  - name: workflow_duration_seconds
    help: "Duration of workflow"

The issue: missing counter or gauge type definition, no labels for filtering, and no metricScope to distinguish between workflow and step-level metrics.

metrics:
  prometheus:
  - name: workflow_duration_seconds
    help: "Duration of workflow in seconds"
    gauge:
      value: "{{workflow.duration}}"
    labels:
    - key: name
      value: "{{workflow.name}}"
    - key: status
      value: "{{workflow.status}}"
# Expected output after applying the fix
# Prometheus metric: argo_workflows_workflow_duration_seconds
# Labels: name="my-workflow", status="Succeeded"
# Value: 123.45 (seconds)
# Available at /metrics endpoint on argo-server

Prevention

  • Always specify metric type (gauge, counter, histogram)
  • Add meaningful labels for metric filtering and aggregation
  • Use {{workflow.*}} and {{steps.*}} variables for metric values
  • Verify metrics at argo-server:2746/metrics
  • Use metricScope: Step for step-level metrics instead of workflow-level

DodaTech Tools

Doda Browser's metrics dashboard visualizes Argo workflow metrics with Grafana. DodaZIP archives metric configurations for monitoring setup. Durga Antivirus Pro monitors metric anomalies for incident detection.

FAQ

What Argo Workflows metrics are available by default?

Argo exposes counters for workflow count, step count, and error rates. Custom metrics require configuration in each workflow or workflow template. ||| Can I create histograms for workflow durations? Yes, use the histogram metric type with buckets configuration. Example: histogram: { buckets: [1, 5, 10, 30, 60, 120] }. ||| How do I add custom labels to workflow metrics? Define labels in the metric configuration. Use workflow variables like {{workflow.name}}, {{workflow.status}}, or custom parameter references.

Built by the developers of DodaTech

Doda Browser, DodaZIP & Durga Antivirus Pro