Jenkins monitoring from Instana is an important part of the software delivery process. This article explores the native Jenkins monitoring options, strengths and weaknesses, and the benefits gained by using Instana to monitor Jenkins.
What is Jenkins
From the Jenkins website: “Jenkins is a self-contained, open source automation server which can be used to automate all sorts of tasks related to building, testing, and delivering or deploying software.”
Jenkins is a popular automated Continuous Integration (CI) tool that helps facilitate Continuous Deployment (CD) although it does not perform the deployment action natively (see Kubernetes). Jenkins automatically builds software when triggered to do so. There are multiple ways to trigger builds with the most common methods being post-commit or on a schedule.
Jenkins is written in Java (making it an ideal candidate to be monitored by Instana) and can be extended via plugins. There are thousands of plugins, created and maintained by the community, that provide a range of functionality from unit testing, to security, to compliance reporting.
How to monitor Jenkins
As you may have already guessed, there is a monitoring plugin for Jenkins that provides a lot of data about what’s going on within Jenkins and about the tasks being performed by Jenkins. The Jenkins monitoring plugin relies on JavaMelody which is a basic metric charting tool. There is a demo of JavaMelody available for those who want to see what it’s like. While it does contain a lot of data, the understanding of what is happening in the environment is left for the user to figure out. There is also no data collected about the application services being built by Jenkins.
Monitor Jenkins using Instana
Using Instana, you can achieve a fully integrated view of Jenkins, the application services it builds, the underlying infrastructure, and the state of the deployment tool (such as Kubernetes).
In the screenshot above (figure 1) you can see an overview of the Jobs and Builds executed by Jenkins over the selected time period (last 12 hours). The “Last Build Duration” chart is used to see if there are any anomalies or spikes in the time it takes to complete a build. Any changes in build duration over time are easily visible here.
When you expand the Jobs section (figure 2) you can see more detail about each job such as type of job, number of last build, status of last build (Failed, Success), health status of recent builds (success percentage), duration of last build, estimated duration for last build, and start time of last build. Obviously this is where you can check to see if any build jobs are failing and investigate why that might be happening.
Notice the breadcrumb trail at the top of the screenshot (figure 3). It shows the dependencies between the Jenkins service, the JVM it runs in, the Java process, and the running host. You can select any of the components in the breadcrumb trail to see more details about that component. In this case you see details relevant to the JVM. If there were any thread, heap, or memory pool issues they would show up here. It’s important to monitor the stack that Jenkins runs on so that you will know if there are any resource contention issues slowing down Jenkins and delaying your builds and deployments.
The final screenshot shows host level details for the Jenkins server. There is a wealth of meta-data collected for every monitored component and every time series metric that Instana collects has a granularity of 1 second. This high granularity data ensures that you will be able to identify any resource spike that causes problems in your build pipelines.
Instana is able to automatically detect issues and identify the root cause of problems in your Jenkins build pipeline because it understands the relationships between Jenkins and the full stack supporting the Jenkins service. You can start monitoring Jenkins and all of your application services today by signing up for the Instana free trial.