Advanced Jenkins

Jenkins Administration and Monitoring

Jenkins Supervision

Effective CI/CD workflows depend on proactive Jenkins supervision. By monitoring your Jenkins server, you can catch system errors, plugin failures, or pipeline issues before they impact your testing and deployments.

The image is an infographic titled "Jenkins Supervision," highlighting common monitoring areas like system errors, plugin malfunctions, and pipeline code issues, along with key benefits such as preventing disruptions, reducing delays, and maintaining efficiency.

In this guide, we’ll cover three critical facets of Jenkins supervision:

  1. Logs and their insights
  2. Performance and resource monitoring
  3. Auditing user activity and configuration changes

1. Logs: The Foundation of Jenkins Insights

Jenkins logs reveal crucial details about server operations and pipeline executions. Depending on your setup, log locations vary:

# Running Jenkins directly
java -jar jenkins.war

# Linux system logs
cat /var/log/jenkins/jenkins.log

# Windows installer
cat %JENKINS_HOME%/jenkins.out

# Docker container
docker logs <containerId>

# Configure custom log paths
# Debian-based systems
sudo vi /etc/default/jenkins
# Red Hat-based systems
sudo vi /etc/sysconfig/jenkins

You can also view and filter logs in the Jenkins UI under Manage Jenkins → System Log.

Tip

Rotate and compress your logs regularly to prevent disk overload. Adjust the maxFileSize and maxBackupIndex settings in your logging configuration.


2. Performance and Resource Monitoring

Jenkins offers built-in dashboards to track server health:

  • Available executors: Idle workers ready for builds
  • Busy executors: Currently running jobs
  • Pending jobs: Queued builds
  • Overall server load: Aggregate workload metric

The image shows a Jenkins supervision monitoring interface with a graph displaying load statistics for a Linux system, alongside a flowchart highlighting logs, monitoring, and auditing.

Key Plugins for Jenkins Monitoring

PluginPurposeMajor Features
Monitoring PluginJVM & system metricsCPU, memory, load, response times, HTTP sessions, GC details
Disk Usage PluginDisk space analysisJob/workspace usage breakdown, historical trends
Build Monitor PluginVisual job statusCustomizable job view, failure highlights

The image shows a Jenkins supervision monitoring dashboard with various performance metrics displayed in graphs, such as memory usage, CPU usage, and active threads. It also includes a flowchart with sections labeled "Logs," "Monitoring," and "Auditing."

Integrating with External Systems

For centralized dashboards, use:

The image illustrates Jenkins supervision and monitoring using Grafana and Datadog, featuring dashboards and a flowchart with logs, monitoring, and auditing.

This flexibility lets you align Jenkins metrics with your existing observability stack.


3. Auditing and Configuration Changes

Tracking who did what—and when—is vital for compliance and troubleshooting. Two complementary plugins capture user actions and config updates:

PluginFunctionHighlights
Audit Trail PluginUser action loggingFile, Syslog, Elasticsearch, or Console logger options
Job Config History PluginVersion control for configsRecords config.xml changes, diff view, and rollback capability

The image illustrates Jenkins supervision for auditing, showing the use of the Audit Trail Plugin and Job Config History Plugin, with various loggers like File Logger and Syslog Logger.

Audit Trail Logger Options

  1. File Logger (default, rotating files)
  2. Syslog Logger (central syslog server)
  3. Console Logger (for quick debugging)
  4. Elasticsearch Logger (powerful search & analytics)

Warning

Avoid using the Console Logger in production—it can expose sensitive data in build logs.

Many teams combine both plugins so you can see who made a change and exactly what was modified.


References

Watch Video

Watch video content

Previous
Scripted Pipeline K8S Agent