{"id":26719795,"url":"https://github.com/simplesurance/jenkins-exporter","last_synced_at":"2025-04-14T04:34:10.973Z","repository":{"id":54676680,"uuid":"191802918","full_name":"simplesurance/jenkins-exporter","owner":"simplesurance","description":"Export Jenkins Build Metrics to Prometheus","archived":false,"fork":false,"pushed_at":"2025-03-24T16:22:48.000Z","size":5521,"stargazers_count":11,"open_issues_count":3,"forks_count":12,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-27T15:02:21.155Z","etag":null,"topics":["golang","jenkins","metrics","prometheus"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simplesurance.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-06-13T17:06:31.000Z","updated_at":"2025-02-03T08:53:19.000Z","dependencies_parsed_at":"2024-01-02T11:25:17.897Z","dependency_job_id":"19829952-9472-4735-a229-c3359d5ab56c","html_url":"https://github.com/simplesurance/jenkins-exporter","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplesurance%2Fjenkins-exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplesurance%2Fjenkins-exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplesurance%2Fjenkins-exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplesurance%2Fjenkins-exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simplesurance","download_url":"https://codeload.github.com/simplesurance/jenkins-exporter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248823085,"owners_count":21167184,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["golang","jenkins","metrics","prometheus"],"created_at":"2025-03-27T18:23:13.691Z","updated_at":"2025-04-14T04:34:10.953Z","avatar_url":"https://github.com/simplesurance.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Jenkins Exporter #\n\nAn exporter for Jenkins Build metrics written in Golang.\nThe program is intended to run as daemon.\nIt fetches periodically metrics for Jenkins builds and Stages via the Jenkins\nAPI and publishes them via an HTTP endpoint in Prometheus format.\n\nIt provides the following Prometheus metrics:\n\n- Histograms:\n  - `jenkins_exporter_job_duration_seconds_bucket`,  \n    `jenkins_exporter_job_duration_seconds_sum`,  \n    `jenkins_exporter_job_duration_seconds_count`  \n    - Labels:\n      - result\n      - jenkins_job: the name of the Jenkins Job\n      - branch: for multibranch Jenkins Jobs, the branch name\n    - type: type of recorded duration, one of:\n      - blocked_time\n      - buildable_time\n      - building_duration\n      - executing_time\n      - waiting_time\n  - `jenkins_exporter_stage_duration_seconds_bucket`,  \n    `jenkins_exporter_stage_duration_seconds_sum`,  \n    `jenkins_exporter_stage_duration_seconds_count`,  \n    - Labels:\n      - result: result of the stage\n      - stage: stage name\n      - type:\n        - duration\n      - branch: for multibranch Jenkins Jobs, the branch name\n- Counter:\n  - `jenkins_exporter_errors`  \n    Counts the number of errors the jenkins-exporter encountered when fetching\n    information from the Jenkins API.\n    - Labels:\n      - type:\n        - jenkins_api\n        - jenkins_wfapi\n\nBy default job metrics are recorded for every finished Jenkins build. The\nJenkins jobs for that builds are recorded can be limited with the\n`--jenkins-job-whitelist` command-line parameter.\nThe duration types that are recorded can also be configured via a command-line\nparameter.\n\nThe exporter can also record durations of individual pipeline stages. This\nrequires that the\n[Pipeline Stage View Plugin](https://plugins.jenkins.io/pipeline-rest-api/) is\ninstalled on the Jenkins server. Recording per stage metrics can be enabled via the\n`-enable-build-stage-metrics` command-line parameter. The\n`-build-stage-allowlist` parameter allows to specify for which jobs and stages,\nper-stage metrics are recorded.\n\nAll parameter can also be specified via environment variables.\nSee `./jenkins-exporter -help` for more information.\n\n## Installation ##\n\n### Binary ###\n\n#### Download Release Binary ####\n\nDownload a release binary from: \u003chttps://github.com/simplesurance/jenkins-exporter/releases\u003e.\n\n#### go install ####\n\n```sh\ngo install github.com/simplesurance/jenkins-exporter@latest\n```\n\n#### git clone #####\n\n```sh\ngit clone --depth 1 https://github.com/simplesurance/jenkins-exporter.git jenkins-exporter\ncd jenkins-exporter\nmake\n```\n\nThen copy the jenkins-exporter into your `$PATH`.\n\n### As Systemd Service ###\n\n1. Install `jenkins-exporter` to `/usr/local/bin`\n2. `cp dist/etc/default/jenkins-exporter /etc/default/`\n3. Configure the jenkins-exporter by editing `/etc/default/jenkins-exporter`\n4. `cp dist/etc/systemd/system/jenkins-exporter.service /etc/systemd/system`\n5. `systemctl daemon-reload \u0026\u0026 systemctl enable jenkins-exporter \u0026\u0026 systemctl start jenkins-exporter`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimplesurance%2Fjenkins-exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimplesurance%2Fjenkins-exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimplesurance%2Fjenkins-exporter/lists"}