Blueprints

Expose custom metrics from a Shell script

Source

yaml
id: metrics-from-shell-commands
namespace: company.team

tasks:
  - id: process
    type: io.kestra.plugin.scripts.shell.Commands
    commands:
      - echo '::{"metrics":[{"name":"count","type":"counter","value":1}]}::'

About this blueprint

Metrics Software Engineering

This blueprint shows how to expose metrics within a Shell script. Metrics are intended to track custom numeric (metric type: counter) or duration (metric type: timer) attributes that you may want to visualize across task runs and flow executions.

Commands

More Related Blueprints

New to Kestra?

Use blueprints to kickstart your first workflows.

Get started with Kestra