{"id":51167664,"url":"https://github.com/clear-route/vault-client-count-exporter","last_synced_at":"2026-06-26T21:01:38.554Z","repository":{"id":336843174,"uuid":"1150983941","full_name":"clear-route/vault-client-count-exporter","owner":"clear-route","description":"A dead-simple Prometheus exporter to monitor Vaults Client Count for the entire Cluster and each Namespace","archived":false,"fork":false,"pushed_at":"2026-04-16T01:02:40.000Z","size":3227,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-16T02:28:25.556Z","etag":null,"topics":["adoption","prometheus","sre","vault"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/clear-route.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-05T23:12:41.000Z","updated_at":"2026-04-16T00:40:42.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/clear-route/vault-client-count-exporter","commit_stats":null,"previous_names":["clear-route/vault-usage-exporter","clear-route/vault-client-count-exporter"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/clear-route/vault-client-count-exporter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clear-route%2Fvault-client-count-exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clear-route%2Fvault-client-count-exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clear-route%2Fvault-client-count-exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clear-route%2Fvault-client-count-exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/clear-route","download_url":"https://codeload.github.com/clear-route/vault-client-count-exporter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clear-route%2Fvault-client-count-exporter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34832916,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-26T02:00:06.560Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["adoption","prometheus","sre","vault"],"created_at":"2026-06-26T21:01:37.741Z","updated_at":"2026-06-26T21:01:38.532Z","avatar_url":"https://github.com/clear-route.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vault Client Count Exporter\nA dead-simple Prometheus exporter to monitor Vaults Client Count for the entire Cluster and each Namespace.\n\nIt uses [`sys/internal/counters/activity`](https://developer.hashicorp.com/vault/api-docs/system/internal-counters#client-count) (or [`sys/internal/counters/activity/monthly`](https://developer.hashicorp.com/vault/api-docs/system/internal-counters#partial-month-client-count) when started with `-monthly`) to fetch the Client Counts of the entire Cluster and every namespace and attributed to every mount_paths.\n\n[Make sure you understand Vaults Client Count and Aggregation of these endpoints before using this Exporter](https://developer.hashicorp.com/vault/api-docs/system/internal-counters#sys-internal-counters).\n\n## Requirements\n- Vault Version \u003e `v1.20`\n- If your use Vaults Community Edition, you will have to make sure to enable Data Collection first (https://developer.hashicorp.com/vault/docs/concepts/billing/clients/client-usage#enable-client-usage-metrics)\n- A Vault Token Policy that allows `read` on either `sys/internal/counters/activity` and/or `sys/internal/counters/activity/monthly` :\n\n\u003cdetails\u003e\n  \u003csummary\u003eExample Token Policy\u003c/summary\u003e\n\n```hcl\npath \"sys/internal/counters/activity\" {\n  capabilities = [\"read\"]\n}\n\npath \"sys/internal/counters/activity/monthly\" {\n  capabilities = [\"read\"]\n}\n```\n\u003c/details\u003e\n\n\n## Example Dashboard\n### Cluster Overview\n![img](./assets/cluster_overview.png)\n\n### Namespace Details\n![img](./assets/namespace_details.png)\n\n## Available Metrics\n- `vault_client_count_monthly_clients{start_time=\"\u003cRFC3339\u003e\",end_time=\"\u003cRFC3339\u003e\",month=\"\u003cYYYY-MM\u003e\",client_type=\"\u003cclient_type\u003e\"}`; Gauge of monthly total client counts reported by Vault\n- `vault_client_count_monthly_namespace_clients{start_time=\"\u003cRFC3339\u003e\",end_time=\"\u003cRFC3339\u003e\",month=\"\u003cYYYY-MM\u003e\",namespace=\"\u003cnamespace\u003e\",namespace_id=\"\u003cnamespace_id\u003e\",namespace_path=\"\u003cnamespace_path\u003e\",client_type=\"\u003cclient_type\u003e\"}`; Gauge of monthly client counts attributed to a namespace\n- `vault_client_count_monthly_mount_clients{start_time=\"\u003cRFC3339\u003e\",end_time=\"\u003cRFC3339\u003e\",month=\"\u003cYYYY-MM\u003e\",namespace=\"\u003cnamespace\u003e\",namespace_id=\"\u003cnamespace_id\u003e\",namespace_path=\"\u003cnamespace_path\u003e\",mount_path=\"\u003cmount_path\u003e\",mount_type=\"\u003cmount_type\u003e\",client_type=\"\u003cclient_type\u003e\"}`; Gauge of monthly client counts attributed to a mount\n- `vault_client_count_current_namespace_clients{start_time=\"\u003cRFC3339\u003e\",end_time=\"\u003cRFC3339\u003e\",namespace=\"\u003cnamespace\u003e\",namespace_id=\"\u003cnamespace_id\u003e\",namespace_path=\"\u003cnamespace_path\u003e\",client_type=\"\u003cclient_type\u003e\"}`; Gauge of current snapshot client counts from `data.by_namespace`\n- `vault_client_count_current_mount_clients{start_time=\"\u003cRFC3339\u003e\",end_time=\"\u003cRFC3339\u003e\",namespace=\"\u003cnamespace\u003e\",namespace_id=\"\u003cnamespace_id\u003e\",namespace_path=\"\u003cnamespace_path\u003e\",mount_path=\"\u003cmount_path\u003e\",mount_type=\"\u003cmount_type\u003e\",client_type=\"\u003cclient_type\u003e\"}`; Gauge of current snapshot mount counts from `data.by_namespace[].mounts`\n- `vault_client_count_activity_period_info{start_time=\"\u003cRFC3339\u003e\",end_time=\"\u003cRFC3339\u003e\"}`; Gauge set to `1` carrying `data.start_time` and `data.end_time` as labels\n- `vault_client_count_exporter_version{version=\"\u003cversion\u003e\"}`; Gauge set to `1`\n- `vault_client_count_refresh_success`; Gauge set to `1` when the last refresh succeeded, otherwise `0`\n- `vault_client_count_refresh_timestamp_seconds`; Gauge of the Unix timestamp for the last refresh attempt\n- `vault_client_count_refresh_duration_seconds`; Gauge of the last refresh duration in seconds\n\n\n## Installation\nThe `vault-client-count-exporter` [publishes binaries/executables](https://github.com/clear-route/vault-client-count-exporter/releases) and [Docker images for `arm64` and `amd64`](https://github.com/orgs/clear-route/packages?repo_name=vault-client-count-exporter).\n\n## Configuration\nAll of [Vaults Environment Variables](https://developer.hashicorp.com/vault/docs/commands) are supported. You will need at least have to provide `VAULT_ADDR` and `VAULT_TOKEN`.\n\n## Usage\n```bash\n\u003e vault-client-count-exporter -h\n  -address string\n        address for metrics HTTP server (default \"0.0.0.0\")\n  -port string\n        address for metrics HTTP server (default \"9090\")\n  -refresh-interval duration\n        interval between Vault refreshes (default 5m0s)\n  -start_time string\n        optional RFC3339 or Unix epoch activity query start time\n  -end_time string\n        optional RFC3339 or Unix epoch activity query end time\n  -monthly\n        use sys/internal/counters/activity/monthly instead of sys/internal/counters/activity\n  -timeout duration\n        timeout for each Vault refresh request (default 5s)\n```\n\n## Demo\nCheckout [./docker/docker-compose.yml](./docker/docker-compose.yml) to find a prepared demo env with Prometheus, Grafana, Vault and the `vault-client-count-exporter` automatically set up:\n\n```bash\n\u003e cd docker\n\u003e docker compose up\n```\n\nYou should find Vault on [http://localhost:8200](http://localhost:8200), Grafana on [http://localhost:3000](http://localhost:3000), Prometheus on [http://localhost:9090](http://localhost:9090) and the `vault-client-count-exporter` running on [http://localhost:8090](http://localhost:8090).\n\nThe Demo stack is to designed to use [dummy client count data](assets/sample.json). You can disable these by removing the `VAULT_MONTHLY_ACTIVITY_FILE` environment file from [./docker/docker-compose.yml](./docker/docker-compose.yml)\n\nYou can find the sample dashboard in [assets/dashboard.json](./assets/dashboard.json) as well as in the local Grafana Instance.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclear-route%2Fvault-client-count-exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclear-route%2Fvault-client-count-exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclear-route%2Fvault-client-count-exporter/lists"}