{"id":15655657,"url":"https://github.com/caarlos0/version_exporter","last_synced_at":"2025-04-14T21:51:41.223Z","repository":{"id":25728859,"uuid":"105702351","full_name":"caarlos0/version_exporter","owner":"caarlos0","description":"Monitor the versions of the things you run and care about","archived":false,"fork":false,"pushed_at":"2025-04-08T08:46:36.000Z","size":358,"stargazers_count":26,"open_issues_count":2,"forks_count":13,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-08T09:44:46.654Z","etag":null,"topics":["github-api","prometheus-exporter"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/caarlos0.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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},"funding":{"github":["caarlos0"]}},"created_at":"2017-10-03T20:55:46.000Z","updated_at":"2025-04-08T08:46:39.000Z","dependencies_parsed_at":"2023-11-08T12:43:10.192Z","dependency_job_id":"8ad206f7-c479-4340-9110-0d1daccd8ee6","html_url":"https://github.com/caarlos0/version_exporter","commit_stats":{"total_commits":147,"total_committers":6,"mean_commits":24.5,"dds":0.5034013605442177,"last_synced_commit":"602929405337c28e376214388738ad93fee25575"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caarlos0%2Fversion_exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caarlos0%2Fversion_exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caarlos0%2Fversion_exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caarlos0%2Fversion_exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/caarlos0","download_url":"https://codeload.github.com/caarlos0/version_exporter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248968741,"owners_count":21191158,"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":["github-api","prometheus-exporter"],"created_at":"2024-10-03T13:00:14.840Z","updated_at":"2025-04-14T21:51:41.184Z","avatar_url":"https://github.com/caarlos0.png","language":"Go","funding_links":["https://github.com/sponsors/caarlos0"],"categories":[],"sub_categories":[],"readme":"# version_exporter\n\nExports versions of GitHub projects as Prometheus metrics, with constraint\nversion, from a configuration file, and latest version, fetched from GitHub, as\nlabels.\n\n## Running\n\n```bash\nversion_exporter --bind \":9333\"\n```\n\nOr with docker:\n\n```bash\ndocker run -p 127.0.0.1:9333:9333 -v $PWD/config.yaml:/config.yaml caarlos0/version_exporter\n```\n\nOr with `docker-compose`:\n\n```yaml\nversion: '3'\nservices:\n  releases:\n    image: caarlos0/version_exporter:v1\n    restart: always\n    volumes:\n    - /path/to/config.yml:/etc/config.yml\n    command:\n    - '--config.file=/etc/config.yml'\n    ports:\n    - 9333:9333\n```\n\nYou can personalize the `config.yaml` file like following:\n\n```yaml\nrepositories:\n  # repository: semver constraint (check https://github.com/masterminds/semver#working-with-pre-release-versions)\n  prometheus/alertmanager: ~v0.14.0\n  prometheus/prometheus: ^2.1.0\n  caarlos0/version_exporter: 0.0.5\n```\n\n\u003e You can reload the configuration file by sending a `SIGHUP` to\n\u003e `version_exporter` process.\n\nOn the Prometheus settings, add the `version_exporter` job:\n\n```yaml\nscrape_configs:\n  - job_name: version\n    static_configs:\n      - targets: [ 'version_exporter:9333' ]\n```\n\nAlerting rules example:\n\n```yaml\ngroups:\n- name: versions\n  rules:\n  - alert: SoftwareOutOfDate\n    expr: version_up_to_date == 0\n    for: 1s\n    labels:\n      severity: warning\n    annotations:\n      summary: \"{{$labels.repository}}: out of date\"\n      description: \"latest version {{ $labels.latest }} is not within constraint {{ $labels.constraint }}\"\n```\n\n## Building locally\n\nInstall the needed tooling and libs:\n\n```bash\ngo mod tidy\n```\n\nRun with:\n\n```bash\ngo run main.go\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaarlos0%2Fversion_exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcaarlos0%2Fversion_exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaarlos0%2Fversion_exporter/lists"}