Skip to content
Beta. VectorStep is in beta.Let us know if something breaks.

Viewing pipelines in Grafana

If you already run Grafana beside VectorStep, you can see your pipelines there as a graph, next to your dashboards and alerts. Each step is a circle, joined to the step that follows it. The ring around a step shows what share of its recent runs completed, escalated or failed.

A Grafana Node Graph panel showing a pipeline with a human gate, parallel steps and a fan-out. Each step has a ring that is mostly green, with yellow for escalated runs and red for failed ones.

This uses Grafana’s built-in Node Graph panel and the free Infinity data source plugin. There is no VectorStep plugin to install. VectorStep serves the graph from one endpoint, GET /graph/grafana, already in the shape the panel reads.

  • It shows VectorStep’s own signals. The rings come from run history (completed, escalated, failed), and a step waiting for a person shows how many approvals are pending. Nothing here depends on Grafana.
  • It can’t colour a step by a Grafana alert. The Node Graph panel has no way to overlay alert state on a node. Put the Alert list panel and a State timeline next to it instead, as the sample dashboard does. Pipelines that react to alerts are covered in Triggering pipelines from Grafana alerts.
  • It is read-only. You can’t edit a pipeline here. The pipeline diagram in the VectorStep UI is the better view for one pipeline in detail, with branch groupings and click-through.
  • It is best for a handful of pipelines at a time. The panel draws every pipeline you give it, so all of them at once is a tall stack of small chains. The dashboard has a variable to pick pipelines, see Large installations.
Grafana Infinity Result
13.0.2 (OSS) 4.1.6 Works, including the rings and the Alert list, State timeline and Prometheus panels
11.6.5 (OSS) 3.11.1 Works, same dashboard

Newer Infinity releases (4.x) declare that they need Grafana 11.6.11 or later (or 12.0.10, 12.1.7, 12.2.5). For an older Grafana, install an older Infinity: 3.11.1 needs 11.6.0 or later. Grafana versions before 11.6 were not tested. Grafana Cloud was not tested either, and it would need to reach your VectorStep from the internet, which is not something to do lightly: see Securing a deployment.

Grafana calls VectorStep from its own server, so it needs a token. Create one with the viewer role, used for nothing else:

Terminal window
openssl rand -hex 24
auth:
tokens:
- name: grafana
token: "<the value you just generated>"
role: viewer

A viewer can read pipelines and stats and can’t change anything. Don’t reuse an operator or admin token: Grafana stores the header value so it can’t be read back, but anyone who can edit the data source can point it at a different address and capture the token, and those tokens can run pipelines or change configuration. Limit who can edit the data source, and see Teams and roles for the roles.

Test it before involving Grafana (it should print a JSON object with nodes and edges):

Terminal window
curl -s -H "Authorization: Bearer <token>" http://vectorstep:8000/graph/grafana | head -c 300

Infinity (yesoreyeram-infinity-datasource) lets Grafana read JSON from a URL. Install it from the Grafana plugin catalogue. For the Grafana container image, set:

Terminal window
GF_INSTALL_PLUGINS=yesoreyeram-infinity-datasource

To pin a version for an older Grafana, give the version after a space: GF_INSTALL_PLUGINS="yesoreyeram-infinity-datasource 3.11.1".

Grafana’s own server must be able to reach VectorStep, so use an address that works from the Grafana container or host, not from your browser. Provisioning it from a file is the most repeatable way (/etc/grafana/provisioning/datasources/vectorstep.yaml):

apiVersion: 1
datasources:
- name: VectorStep
uid: vectorstep
type: yesoreyeram-infinity-datasource
access: proxy
url: http://vectorstep:8000 # base URL, as Grafana sees it
jsonData:
auth_method: none
allowedHosts:
- http://vectorstep:8000 # Infinity only calls hosts you list here
httpHeaderName1: Authorization
secureJsonData:
httpHeaderValue1: "Bearer <the viewer token>"

You can create the same data source in the Grafana UI: set the base URL, list it under the allowed hosts, and add a custom Authorization header whose value is Bearer <token>.

If VectorStep serves TLS with a certificate from a private CA, add that CA certificate in the data source’s TLS settings. (That path was not tested here; the setup above used plain HTTP on a local network.)

Download vectorstep-pipelines.dashboard.json, then in Grafana choose Dashboards → New → Import, upload the file and pick your two data sources: the VectorStep one from step 3 and a Prometheus that scrapes VectorStep’s /metrics.

The dashboard has:

  • the Node Graph of your pipelines, with the rings described below;
  • Runs by status, Approvals pending and Runs in progress from VectorStep’s Prometheus metrics;
  • a State timeline of whether VectorStep is being scraped, and an Alert list of your firing Grafana alerts, so the picture of “what the pipelines are doing” and “what is on fire” sit together;
  • three variables: Stats range (24 hours, 7 days, 30 days or all time), Stage (production, testing or all) and Pipelines, a box where you can type pipeline names separated by commas. Empty means all of them.
  • A circle with a pipeline’s name and N steps is that pipeline’s entry point. Pipelines that call other pipelines have a line to the called pipeline’s entry point.
  • Every other circle is a step. Its subtitle says the pipeline it belongs to and its executor. Steps inside a parallel group say parallel.
  • Click a step to see its details, listed as detail__… fields: the agent, confidence threshold, average cost and duration, the parallel group it is in, its when: condition and its loop. Clicking also labels the lines around it (next, skipped unless …, abort), which are otherwise unlabelled to keep a large graph readable.
  • The ring shows the share of runs in the chosen range and stage that completed (green), were escalated (yellow) or failed, aborted or stopped (red). The text inside gives the success rate and the number of runs. A step with no runs in range has no ring and says no runs.
  • A line labelled skipped unless … is the path taken when a step’s when: is false. A line labelled abort goes to a red ends the run circle: that is on_low_confidence: abort.
  • Steps that loop (loop_until) show the loop in their detail__loop field when you click them, rather than as a line.

What’s left out by default. escalate is the default for every step and every step implicitly aborts on failure, so drawing those would bury the structure. The endpoint leaves them out unless you ask: add ?edge_kinds=all to the URL in the two queries to include them.

The dashboard does all of this for you. If you’d rather build it by hand, add a Node Graph panel with two queries to the VectorStep data source, both with Type JSON, Parser JSONata (the Backend parser), Source URL and the same URL:

/graph/grafana?time_range=7d&stage=production
Query Format Root selector
A Nodes - Node Graph nodes
B Edges - Node Graph edges

Leave the columns empty. Infinity works out the field names and types itself. Then, in the panel’s options under Arc sections, add three arcs, because the panel only takes ring colours from this option, not from field overrides:

Arc field Colour
arc__ok green
arc__escalated yellow
arc__failed red

The Node Graph panel starts at a fixed zoom, so a graph with many pipelines opens showing nothing in the middle of a large canvas. Zoom out with the panel’s minus button, or limit what is drawn:

  • Type the pipelines you care about into the Pipelines variable, or add &pipeline=name to the query URL (repeat it for several, or separate them with commas). A pipeline you filter to keeps the pipelines it calls, shown as a single circle.

  • VectorStep refuses to build a graph with more than graph.max_nodes nodes (default 500). It answers 422 with a message that names the limit and suggests ?pipeline=. Raise it in config.yaml if you really want a bigger graph:

    graph:
    max_nodes: 800
What you see Cause
The panel says there is no data, or the request returns 401 The token is wrong, or the header isn’t Authorization: Bearer <token>. Run the curl from step 1 from the Grafana host.
403 The token isn’t a viewer (or higher) token. A webhook token can’t read the graph.
422 The graph is over graph.max_nodes. Filter by pipeline.
The panel is empty but its legend lists mainstat The graph is there but off screen. Zoom out.
The rings are all grey The three arcs aren’t set in the panel’s Arc sections option.
Infinity refuses the request The VectorStep address isn’t in the data source’s allowed hosts.