Skip to main content
Version: 3.10

Pipeline Monitoring with Prometheus and Grafana

This documentation describes how to integrate tekton-pipelines metrics with Prometheus and Grafana monitoring stack.

Prerequisites​

Ensure the following requirements are met first before moving ahead:

Integration Overview​

Currently, there are two methods for integrating tekton-pipelines metrics with the Prometheus and Grafana monitoring stack.

Integration via Service Monitor​

To implement Pipeline Monitoring using the Service Monitor resource, follow the steps below:

  1. Create a Service Monitor resource file with the following configuration:

    apiVersion: monitoring.coreos.com/v1
    kind: ServiceMonitor
    metadata:
    labels:
    release: prom # kube-prometheus-stack release name
    name: tekton-overview
    spec:
    endpoints:
    - interval: 10s
    path: /metrics
    port: http-metrics
    scrapeTimeout: 10s
    namespaceSelector:
    matchNames:
    - tekton-pipelines
    selector:
    matchLabels:
    app.kubernetes.io/component: controller
    app.kubernetes.io/part-of: tekton-pipelines
  2. Apply the created resource to the tekton-pipelines namespace:

    kubectl apply -f service-monitor.yaml -n tekton-pipelines
  3. Download the KubeRocketCi dashboard:

    a. Click on the dashboard menu;

    b. In the upper right corner, click on the New button. In the dropdown menu, click the Import;

    Import dashboard grafana

    c. Select the downloaded 18321_rev*.json file;

    Import dashboard grafana options

    d. Type the name of the dashboard;

    e. Select the folder for the dashboard;

    f. Change the UID if necessary;

    g. Click the Import button.

As soon as the dashboard procedure is completed, you can track the newcoming metrics in the dashboard menu:

Tekton dashboard

Integration via edp-install Helm Chart​

The edp-install helm chart allows to integrate tekton-pipelines metrics with the Prometheus and Grafana stack through the edp-tekton.grafana.enabled field in values.yaml file. To enable integration, set the edp-tekton.grafana.enabled field to true and apply the changes to the cluster.

edp-tekton:
grafana:
enabled: true

After the changes are applied, the tekton-pipelines metrics will be available in the KRCI Tekton overview Grafana dashboard:

Tekton dashboard