{"id":13581539,"url":"https://github.com/gree-gorey/bash-exporter","last_synced_at":"2025-04-14T11:14:25.468Z","repository":{"id":59676271,"uuid":"139949820","full_name":"gree-gorey/bash-exporter","owner":"gree-gorey","description":"Simple \u0026 minimalistic Prometheus exporter for bash scripts, written in Go","archived":false,"fork":false,"pushed_at":"2023-08-24T19:47:30.000Z","size":21,"stargazers_count":99,"open_issues_count":7,"forks_count":33,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-14T11:14:16.856Z","etag":null,"topics":["bash","go","golang","metrics","prometheus","prometheus-exporter","prometheus-metrics"],"latest_commit_sha":null,"homepage":"https://github.com/gree-gorey/bash-exporter","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gree-gorey.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":"2018-07-06T07:35:44.000Z","updated_at":"2025-03-31T06:50:51.000Z","dependencies_parsed_at":"2024-06-20T09:25:19.812Z","dependency_job_id":"9bbafb14-1f03-4775-bd78-9de6acabe415","html_url":"https://github.com/gree-gorey/bash-exporter","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gree-gorey%2Fbash-exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gree-gorey%2Fbash-exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gree-gorey%2Fbash-exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gree-gorey%2Fbash-exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gree-gorey","download_url":"https://codeload.github.com/gree-gorey/bash-exporter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248868766,"owners_count":21174758,"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":["bash","go","golang","metrics","prometheus","prometheus-exporter","prometheus-metrics"],"created_at":"2024-08-01T15:02:05.102Z","updated_at":"2025-04-14T11:14:25.439Z","avatar_url":"https://github.com/gree-gorey.png","language":"Go","funding_links":[],"categories":["HarmonyOS","Go"],"sub_categories":["Windows Manager"],"readme":"# Prometheus bash exporter\n\nSimple \u0026 minimalistic Prometheus exporter for bash scripts.\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/gree-gorey/bash-exporter)](https://goreportcard.com/report/github.com/gree-gorey/bash-exporter)  \n[![](https://images.microbadger.com/badges/image/greegorey/bash-exporter.svg)](https://microbadger.com/images/greegorey/bash-exporter \"Get your own image badge on microbadger.com\")\n[![](https://images.microbadger.com/badges/version/greegorey/bash-exporter.svg)](https://microbadger.com/images/greegorey/bash-exporter \"Get your own version badge on microbadger.com\")\n\n## Installation\nUse [Docker image](https://hub.docker.com/r/greegorey/bash-exporter/) or binary file from [releases](https://github.com/gree-gorey/bash-exporter/releases).\n\n## Docker quick start\n\n```console\n$ docker run -v $PWD/examples:/scripts -p 9300:9300 greegorey/bash-exporter:2.0.0\n```\n\n```console\n$ curl -s 127.1:9300/metrics | grep ^bash\nbash{env=\"\",hostname=\"node-1\",job=\"job-2\",verb=\"get\"} 0.003\nbash{env=\"\",hostname=\"node-1\",job=\"job-2\",verb=\"put\"} 0.13\nbash{env=\"\",hostname=\"node-1\",job=\"job-2\",verb=\"time\"} 0.5\nbash{env=\"dev\",hostname=\"\",job=\"job-1\",verb=\"items\"} 21\n```\n\n## Usage\n\n```console\nUsage of ./bash-exporter:\n  -debug\n    \tDebug log level\n  -interval int\n    \tInterval for metrics collection in seconds (default 300)\n  -labels string\n    \tadditioanal labels (default \"hostname,env\")\n  -path string\n    \tpath to directory with bash scripts (default \"/scripts\")\n  -prefix string\n    \tPrefix for metrics (default \"bash\")\n  -web.listen-address string\n    \tAddress on which to expose metrics (default \":9300\")\n```  \n\nJust point `-path` flag to the directory with your bash scripts. Names of the files (`(.*).sh`) will be used as the `job` label. Bash scripts should return valid json (see [examples](https://github.com/gree-gorey/bash-exporter/tree/master/examples)).\n\nExample output:\n```console\n# HELP bash bash exporter metrics\n# TYPE bash gauge\nbash{job=\"job-1\",verb=\"items\"} 21\nbash{job=\"job-2\",verb=\"get\"} 0.003\nbash{job=\"job-2\",verb=\"put\"} 0.13\nbash{job=\"job-2\",verb=\"time\"} 0.5\n...\n```\n\n## TODO\n- [x] Docker image\n- [x] Several scripts\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgree-gorey%2Fbash-exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgree-gorey%2Fbash-exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgree-gorey%2Fbash-exporter/lists"}