Skip to content

Jenkins

Auto-Detection
Built-in Metrics

Bleemeo monitors Jenkins through automatic service detection and metrics collection for executors and build jobs.

Glouton automatically detects Jenkins instances running on the system.

To enable metrics gathering, you must configure the Jenkins URL and API credentials.

If auto-detected parameters are incorrect, you can override them manually.

Terminal window
sudo tee /etc/glouton/conf.d/99-jenkins.conf > /dev/null << 'EOF'
service:
# For a Jenkins running outside a container
- type: "jenkins"
address: "127.0.0.1"
port: 8080
# To enable metric gathering, stats_url, username, and password are required.
stats_url: "http://jenkins.example.com"
username: my_user
password: my_api_token
## TLS configurations (optional)
ca_file: "/myca.pem"
cert_file: "/mycert.pem"
key_file: "/mykey.pem"
ssl_insecure: false
# Choose jobs to include or exclude. Exclude has priority over include.
# Wildcards are supported: ["jobA/*", "jobB/subjob1/*"]. If empty, all jobs are included.
included_items: []
excluded_items: []
# For a Jenkins running in a Docker container
- type: "jenkins"
instance: "CONTAINER_NAME"
port: 8080
stats_url: "http://jenkins.example.com"
username: my_user
password: my_api_token
EOF

Glouton automatically detects configuration changes.

When using Docker, you can use labels to set the configuration:

Terminal window
docker run --label glouton.stats_url="http://jenkins.example.com" --label glouton.username="my_user" [...]
Metric Description
service_status Status of Jenkins
jenkins_busy_executors Number of busy executors
jenkins_total_executors Total number of executors (both busy and idle)
jenkins_job_duration_seconds Job duration in seconds
jenkins_job_number Number of times this job has been run
jenkins_job_result_code Job result code (0 = SUCCESS, 1 = FAILURE, 2 = NOT_BUILD, 3 = UNSTABLE, 4 = ABORTED)