Skip to content

Monitoringβš“οΈŽ

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:

Create and Apply the Additional Scrape Configβš“οΈŽ

To create and apply the additional scrape config, follow the steps below:

  1. Create the kubernetes secret file with the additional scrape config:

    additional-scrape-configs.yaml file
    apiVersion: v1
    kind: Secret
    metadata:
      name: additional-scrape-configs
    stringData:
      prometheus-additional-job.yaml: |
        - job_name: "tekton-pipelines"
          scrape_interval: 30s
          static_configs:
          - targets: ["tekton-pipelines-controller.<tekton-pipelines-namespace>.svc.cluster.local:9090"]
    
  2. Apply the created secret:

    kubectl apply -f additional-scrape-configs.yaml -n <monitoring-namespace>
    
  3. Update the prometheus stack:

    helm update --install prometheus prometheus-community/kube-prometheus-stack --values values.yaml -n <monitoring-namespace>
    

    The values.yaml file should have the following contents:

    values.yaml file
    prometheus:
      prometheusSpec:
        additionalScrapeConfigsSecret:
          enabled: true
          name: additional-scrape-configs
          key: prometheus-additional-job.yaml
    
  4. Download the KubeRocketCi dashboard:

    Import dashboard grafana
    Import Grafana dashboard

    a. Click on the dashboard menu;

    b. In the dropdown menu, click the + Import button;

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

    Import dashboard grafana options
    Import Grafana dashboard: Options

    d. Type the name of the dashboard;

    e. Select the folder for the dashboard;

    f. Type the UID (set of eight numbers or letters and symbols);

    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
Tekton dashboard