Skip to content

BalazsGyarmati/jenkins-exporter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jenkins Exporter

Build Status

Jenkins exporter is a exporter to get metrics of Jenkins server, deployed on FSOFT environment.

Jenkins exporter has been written in python3. It's been tested with Jenkins versions 2.143, 2.176.1 and 2.332.2.

Note: Supported python versions are 3.6.4->3.11.x, so make sure you are running Jenkins exporter with those versions

Usage:

You can download source code and build docker yourself, or use docker image we have built.

Step 1: Build image

docker build -t jenkins_exporter .

Step 2: Run Jenkins exporter

docker run -p 9118:9118 --name jenkins_exporter -d \
-e "JENKINS_SERVER=https://jenkins_server" \
-e "JENKINS_HTTPS_INSECURE=true" \
-e "JENKINS_USERNAME=example" \
-e "JENKINS_PASSWORD=123456" \
-e "PROM_METRIC_TYPES=node,queue" \
-e "PROM_EXPORTER_PORT=9118" jenkins_exporter

With:

  • JENKINS_SERVER: is the url of Jenkins
  • JENKINS_HTTPS_INSECURE: true for self-signed certificates, false for valid ones
  • JENKINS_USERNAME: is the user of Jenkins who have permission to access Jenkins resource
  • JENKINS_PASSWORD: is the password of user
  • PROM_METRIC_TYPES: a comma separated list of metric types you would like to see, e.g. "job,node,queue" or simply "all"
  • PROM_EXPORTER_PORT: the port where the exporter will listen.

Or using config file:

docker run -p 9118:9118 --name jenkins_exporter -d \
-v "/link/to/your/jenkins/config/file.ini:/root/config.ini" \
-e "PROM_EXPORTER_PORT=9118" jenkins_exporter

with config.ini:

[DEFAULT]
JENKINS_SERVER=http://jenkins_server:8080
JENKINS_HTTPS_INSECURE=true
JENKINS_USERNAME=username
JENKINS_PASSWORD=password
PROM_METRIC_TYPES=all

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 98.7%
  • Dockerfile 1.3%