Skip to main content
In this lesson, we explore how the Jenkins Prometheus Metrics Plugin automatically exposes Jenkins metrics on a dedicated endpoint. By accessing the URL http://<jenkins_server_ip>:8080/Prometheus, you can view metrics output similar to the sample below:
The Prometheus plugin installed on your Jenkins server automatically generates this output. The plugin configures the /Prometheus endpoint to expose metrics in a format that Prometheus can seamlessly scrape.
The image shows the Jenkins Prometheus Metrics Plugin page, detailing its version, installation count, and features like metrics exposure and environment variables.
The metrics output follows a structured format that is similar to JSON or key-value pairs. Consistent formatting ensures that Prometheus understands and properly ingests the data. Although subsequent scrapes might reflect updated values or minor variations in metric names—such as differences in build duration or class loading statistics—the overall structure remains unchanged. Once Prometheus scrapes the /Prometheus endpoint, you can explore these metrics directly within the Prometheus dashboard. For example, entering a query like “Jenkins” in the Prometheus expression browser retrieves various Jenkins-specific metrics, including build success counts. Consider the following query output:
This output confirms that your Jenkins jobs—specifically “go-full-pipeline,” “test1,” and “test2”—have successfully completed builds. Jobs that have not been triggered, such as “Git test build pipeline” or “SH test build pipeline,” will not appear in these metrics.
The image shows a Prometheus monitoring dashboard with two targets, Jenkins and Prometheus, both in "UP" state, displaying endpoint details and scrape metrics.
You can further analyze your Jenkins data by experimenting with different queries in the Prometheus web interface. Typing “Jenkins” in the expression field displays all available metrics, including task durations and build counts, to help you better understand your CI/CD performance.
The image shows a Prometheus interface displaying various Jenkins metrics, such as task durations and build counts, with options for query history and autocomplete enabled.
Keep in mind that the IP address shown in the examples might differ from your actual setup, as it reflects the specific instance or runtime conditions of your Jenkins server.
This lesson has provided an overview of how Prometheus scrapes and displays Jenkins metrics. We hope this helps you effectively monitor and analyze your Jenkins environment. See you in the next lesson!

Watch Video

Practice Lab