{"id":26059662,"url":"https://github.com/orange-cloudfoundry/credhub_exporter","last_synced_at":"2026-01-06T05:12:40.817Z","repository":{"id":39995718,"uuid":"144161608","full_name":"orange-cloudfoundry/credhub_exporter","owner":"orange-cloudfoundry","description":" A prometheus exporter for credhub that monitors credential age and certificate expiration","archived":false,"fork":false,"pushed_at":"2025-04-09T03:21:45.000Z","size":7051,"stargazers_count":5,"open_issues_count":4,"forks_count":8,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-09T04:23:35.078Z","etag":null,"topics":["credhub","prometheus","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/orange-cloudfoundry.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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,"zenodo":null}},"created_at":"2018-08-09T14:10:22.000Z","updated_at":"2025-04-09T03:21:34.000Z","dependencies_parsed_at":"2024-01-15T04:41:18.948Z","dependency_job_id":"81ae5833-89d2-4237-adb5-e578e2e446fd","html_url":"https://github.com/orange-cloudfoundry/credhub_exporter","commit_stats":null,"previous_names":[],"tags_count":95,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orange-cloudfoundry%2Fcredhub_exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orange-cloudfoundry%2Fcredhub_exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orange-cloudfoundry%2Fcredhub_exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orange-cloudfoundry%2Fcredhub_exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/orange-cloudfoundry","download_url":"https://codeload.github.com/orange-cloudfoundry/credhub_exporter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248429056,"owners_count":21101779,"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":["credhub","prometheus","prometheus-exporter"],"created_at":"2025-03-08T13:27:18.921Z","updated_at":"2026-01-06T05:12:40.773Z","avatar_url":"https://github.com/orange-cloudfoundry.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Credhub Prometheus Exporter [![Build Status](https://travis-ci.org/orange-cloudfoundry/credhub_exporter.png)](https://travis-ci.org/orange-cloudfoundry/credhub_exporter)\n\nA [Prometheus][prometheus] exporter for [Credhub][credhub]. The exporter currently only exports metrics related to credhub objects, including [certificate](https://github.com/cloudfoundry-incubator/credhub/blob/master/docs/credential-types.md) objects (it does not yet provide metrics about the credhub server health such as error rates, response times, or total number of entries).\n\n\n## Installation\n\n### Binaries\n\nDownload the already existing [binaries][binaries] for your platform:\n\n```bash\n$ ./credhub_exporter \u003cflags\u003e\n```\n\n### From source\n\nUsing the standard `go install` (you must have [Go][golang] already installed in your local machine):\n\n```bash\n$ go install github.com/orange-cloudfoundry/credhub_exporter\n$ credhub_exporter \u003cflags\u003e\n```\n\n### Docker\n\nTo run the credhub exporter as a Docker container, run:\n\n```bash\n$ docker run -p 9358:9358 orangeopensource/credhub-exporter \u003cflags\u003e\n```\n\n\u003c!-- ### BOSH --\u003e\n\n\u003c!-- This exporter can be deployed using the [Prometheus BOSH Release][prometheus-boshrelease]. --\u003e\n\n## Usage\n\n### UAA Client\n\nIn order to connect to the [Credhub API][credhub_api] a `client-id` and `client-secret` must be provided. The `client-id` must have the `creadhub.read` authority.\n\nFor example, to create a new `client-id` and `client-secret` with the right permissions:\n\n```bash\nuaac target https://\u003cYOUR UAA URL\u003e --skip-ssl-validation\nuaac token client get \u003cYOUR ADMIN CLIENT ID\u003e -s \u003cYOUR ADMIN CLIENT SECRET\u003e\nuaac client add prometheus-credhub \\\n  --name prometheus-credhub \\\n  --secret prometheus-credhub-client-secret \\\n  --authorized_grant_types client_credentials,refresh_token \\\n  --authorities credhub.read,credhub.write\n```\n\n### Flags\n\n| Flag / Environment Variable                                                 | Required | Default    | Description                                                                                                                                                                                                                           |\n|-----------------------------------------------------------------------------|----------|------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `credhub.api_url`\u003cbr /\u003e`CREDHUB_EXPORTER_API_URL`                           | Yes      |            | Credhub API URL                                                                                                                                                                                                                       |\n| `credhub.client-id`\u003cbr /\u003e`CREDHUB_EXPORTER_CLIENT_ID`                       | Yes      |            | Credhub Client ID (must have the `credhub.read` scope)                                                                                                                                                                                |\n| `credhub.client-secret`\u003cbr /\u003e`CREDHUB_EXPORTER_CLIENT_SECRET`               | Yes      |            | Credhub Client Secret                                                                                                                                                                                                                 |\n| `credhub.proxy`\u003cbr /\u003e`CREDHUB_EXPORTER_PROXY`                               | No       |            | Socks proxy to open before connecting to credub                                                                                                                                                                                       |\n| `credhub.ca-certs-path`\u003cbr /\u003e`CREDHUB_EXPORTER_CA_CERTS_PATH`               | No       |            | Path to CA certificate to use when connecting credhub                                                                                                                                                                                 |\n| `filters.name-like`\u003cbr /\u003e`CREDHUB_EXPORTER_FILTER_NAMELIKE`                 | No       |            | Fetch from server credentials whose name contains the [query string](https://credhub-api.cfapps.io/#find-credentials) (fetch all credentials when empty)                                                                              |\n| `filters.path`\u003cbr /\u003e`CREDHUB_EXPORTER_FILTER_PATH`                          | No       |            | Fetch from server credentials that exist under the provided path (ignored when `--filters.name-like` is not empty)                                                                                                                    |\n| `filters.generic-certificates`\u003cbr /\u003e`CREDHUB_EXPORTER_GENERIC_CERTIFICATES` | No       | `[]`       | Json list of \\\u003cregexp\\\u003e to match against name of certificate objects fetched from server. Only certificate objects whose name match at least one regexp will have an associated metric emitted.                                       |\n| `metrics.deployment-name`\u003cbr /\u003e`CREDHUB_EXPORTER_METRICS_DEPLOYMENT`        | Yes      |            | Credhub Bosh Deployment Name to be reported as the `deployment` metric label                                                                                                                                                          |\n| `metrics.namespace`\u003cbr /\u003e`CREDHUB_EXPORTER_METRICS_NAMESPACE`               | No       | `credhub`  | Metrics Namespace                                                                                                                                                                                                                     |\n| `metrics.environment`\u003cbr /\u003e`CREDHUB_EXPORTER_METRICS_ENVIRONMENT`           | Yes      |            | Credhub `environment` label to be attached to metrics                                                                                                                                                                                 |\n| `metrics.udpate-interval`\u003cbr /\u003e`CREDHUB_EXPORTER_METRICS_UPDATE_INTERVAL`   | No       | `6h`       | Metrics update interval given as golang duration format                                                                                                                                                                               |\n| `skip-ssl-verify`\u003cbr /\u003e`CREDHUB_EXPORTER_SKIP_SSL_VERIFY`                   | No       | `false`    | Disable SSL Verify                                                                                                                                                                                                                    |\n| `web.listen-address`\u003cbr /\u003e`CREDHUB_EXPORTER_WEB_LISTEN_ADDRESS`             | No       | `:9358`    | Address to listen on for web interface and telemetry                                                                                                                                                                                  |\n| `web.telemetry-path`\u003cbr /\u003e`CREDHUB_EXPORTER_WEB_TELEMETRY_PATH`             | No       | `/metrics` | Path under which to expose Prometheus metrics                                                                                                                                                                                         |\n| `web.auth.username`\u003cbr /\u003e`CREDHUB_EXPORTER_WEB_AUTH_USERNAME`               | No       |            | Username for web interface basic auth                                                                                                                                                                                                 |\n| `web.auth.password`\u003cbr /\u003e`CREDHUB_EXPORTER_WEB_AUTH_PASSWORD`               | No       |            | Password for web interface basic auth                                                                                                                                                                                                 |\n| `web.tls.cert_file`\u003cbr /\u003e`CREDHUB_EXPORTER_WEB_TLS_CERTFILE`                | No       |            | Path to a file that contains the TLS certificate (PEM format). If the certificate is signed by a certificate authority, the file should be the concatenation of the server's certificate, any intermediates, and the CA's certificate |\n| `web.tls.key_file`\u003cbr /\u003e`CREDHUB_EXPORTER_WEB_TLS_KEYFILE`                  | No       |            | Path to a file that contains the TLS private key (PEM format)                                                                                                                                                                         |\n\n\n\n### Metrics\n\nThe exporter returns the following credhub objects metrics:\n\n| Metric                                     | Description                                                               | Labels                                                     |\n|--------------------------------------------|---------------------------------------------------------------------------|------------------------------------------------------------|\n| *metrics.namespace*_credential_created_at  | Unix timestamp of the creation of the last version of a given credential  | `deployment`, `environment`, `id`, `name`, `path`          |\n| *metrics.namespace*_certificate_expires_at | Unix timestamp of the expiration time of a given certificate              | `deployment`, `environment`, `id`, `name`, `path`, `index` |\n| *metrics.namespace*_last_scrap_error       | Number of credentials that the exporter failed to read during last scrape | `deployment`, `environment`                                |\n\n## Contributing\n\nRefer to the [contributing guidelines][contributing].\n\n## License\n\nApache License 2.0, see [LICENSE][license].\n\n[binaries]: https://github.com/orange-cloudfoundry/credhub_exporter/releases\n[credhub]: https://github.com/cloudfoundry-incubator/credhub\n[credhub_api]: https://credhub-api.cfapps.io/\n[cloudfoundry]: https://www.cloudfoundry.org/\n[contributing]: https://github.com/orange-cloudfoundry/credhub_exporter/blob/master/CONTRIBUTING.md\n[faq]: https://github.com/bosh-prometheus/credhub_exporter/blob/master/FAQ.md\n[golang]: https://golang.org/\n[license]: https://github.com/orange-cloudfoundry/credhub_exporter/blob/master/LICENSE\n[prometheus]: https://prometheus.io/\n[prometheus-boshrelease]: https://github.com/bosh-prometheus/prometheus-boshrelease\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forange-cloudfoundry%2Fcredhub_exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Forange-cloudfoundry%2Fcredhub_exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forange-cloudfoundry%2Fcredhub_exporter/lists"}