Collecting Jenkins Pipeline Build Data with InfluxDB and Visualizing It in Grafana on Kubernetes
This article explains how to gather build metrics from Jenkins pipelines, store them in InfluxDB deployed on Kubernetes, and display the data using Grafana dashboards, providing a practical DevOps solution for continuous delivery measurement and feedback.
In continuous delivery, measuring and feedback are crucial; a metrics platform can assess delivery status and development efficiency. This guide shows how to collect Jenkins pipeline build data and analyze it.
1. Overall Architecture and Solution Overview – The process involves using a Jenkins Pipeline script to collect build metrics (duration, unit test results, detailed build info), sending the data via HTTP API to InfluxDB, and finally visualizing it with Grafana using a custom dashboard template.
2. Deploying InfluxDB on Kubernetes – A Kubernetes Deployment YAML is created, including a persistent volume and exposing port 8086. The YAML file is available in a GitHub repository (https://github.com/zeyangli/devops-on-k8s/blob/master/devops/influxdb.yml).
3. Jenkins Pipeline Data Collection – The pipeline uses InfluxDB's HTTP API to write metrics such as build time and test results. Screenshots illustrate the HTTP request and the data being sent.
4. Importing Grafana Template for Data Visualization – A Grafana dashboard template (ID 10557) originally designed for GitHub + Jenkins stage plugin is imported. The template’s queries are adapted to match the InfluxDB schema, enabling visualization of the collected metrics. Example screenshots of the original and customized dashboards are provided.
The article concludes with a promise to share the customized Grafana template for others to use.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
DevOps Cloud Academy
Exploring industry DevOps practices and technical expertise.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
