{"id":13582428,"url":"https://github.com/digitalocean/ceph_exporter","last_synced_at":"2025-06-11T01:09:13.299Z","repository":{"id":3361726,"uuid":"48766703","full_name":"digitalocean/ceph_exporter","owner":"digitalocean","description":"Prometheus exporter that scrapes meta information about a ceph cluster.","archived":false,"fork":false,"pushed_at":"2025-01-09T16:56:45.000Z","size":800,"stargazers_count":419,"open_issues_count":3,"forks_count":149,"subscribers_count":33,"default_branch":"main","last_synced_at":"2025-04-06T14:36:28.766Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/digitalocean.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}},"created_at":"2015-12-29T20:53:14.000Z","updated_at":"2025-03-15T18:17:46.000Z","dependencies_parsed_at":"2023-11-23T17:39:31.644Z","dependency_job_id":"8b32ec37-3309-4ade-9921-e24f9534be9c","html_url":"https://github.com/digitalocean/ceph_exporter","commit_stats":{"total_commits":213,"total_committers":43,"mean_commits":4.953488372093023,"dds":0.8685446009389671,"last_synced_commit":"46b06f317f1c7721fcbe814c003937d8ef3a241e"},"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalocean%2Fceph_exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalocean%2Fceph_exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalocean%2Fceph_exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalocean%2Fceph_exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/digitalocean","download_url":"https://codeload.github.com/digitalocean/ceph_exporter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalocean%2Fceph_exporter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259178526,"owners_count":22817388,"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":[],"created_at":"2024-08-01T15:02:42.189Z","updated_at":"2025-06-11T01:09:13.273Z","avatar_url":"https://github.com/digitalocean.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# Ceph Exporter  [![GoDoc](https://godoc.org/github.com/digitalocean/ceph_exporter?status.svg)](https://godoc.org/github.com/digitalocean/ceph_exporter) ![build](https://github.com/digitalocean/ceph_exporter/actions/workflows/run_build.yml/badge.svg) ![tests](https://github.com/digitalocean/ceph_exporter/actions/workflows/run_tests.yml/badge.svg)  [![Go Report Card](https://goreportcard.com/badge/digitalocean/ceph_exporter)](https://goreportcard.com/report/digitalocean/ceph_exporter)\n\nA Prometheus exporter that scrapes meta information about a running Ceph\ncluster. All the information gathered from the cluster is done by interacting\nwith the monitors using an appropriate wrapper over\n`rados_mon_command()`. Hence, no additional setup is necessary other than\nhaving a working Ceph cluster.\n\nA List of all the metrics collected is available on [METRICS.md](./METRICS.md) page.\n\n## Dependencies\n\nYou should ideally run this exporter from the client that can talk to the Ceph\ncluster. Like any other Ceph client, it needs the following files to run\ncorrectly.\n\n* `ceph.conf` containing your Ceph configuration.\n* `ceph.client.\u003cuser\u003e.keyring` in order to authenticate to your Ceph cluster.\n\nThe `ceph_exporter` will automatically pick those up if they are present in\nany of the [default\nlocations](http://docs.ceph.com/docs/master/rados/configuration/ceph-conf/#the-configuration-file). Otherwise\nyou will need to provide the configuration manually using environment\nvariables:\n\n* `CEPH_CLUSTER`: cluster's name (default `ceph`)\n* `CEPH_CONFIG`: configuration file that a Ceph client uses to connect to\n  the cluster (default `/etc/ceph/ceph.conf`)\n* `CEPH_USER`: a Ceph client user used to connect to the cluster (default\n  `admin`)\n\nWe use Ceph's [official Golang client](https://github.com/ceph/go-ceph) to run\ncommands on the cluster.\n\n`ceph_exporter` is currently in use and tested against Nautilus, Pacific, and Reef.\nIt might not work as expected with older or non-LTS versions of Ceph.\n\n## Environment Variables\n\n| Name                    | Description                                                                                    | Default                  |\n|-------------------------|------------------------------------------------------------------------------------------------|--------------------------|\n| `TELEMETRY_ADDR`        | Host:Port for ceph_exporter's metrics endpoint                                                 | `*:9128`                 |\n| `TELEMETRY_PATH`        | URL Path for surfacing metrics to Prometheus                                                   | `/metrics`               |\n| `EXPORTER_CONFIG`       | Path to ceph_exporter configuration file                                                       | `/etc/ceph/exporter.yml` |\n| `RGW_MODE`              | Enable collection of stats from RGW (0:disabled 1:enabled 2:background)                        | `0`                      |\n| `CEPH_CLUSTER`          | Ceph cluster name                                                                              | `ceph`                   |\n| `CEPH_CONFIG`           | Path to Ceph configuration file                                                                | `/etc/ceph/ceph.conf`    |\n| `CEPH_USER`             | Ceph user to connect to cluster                                                                | `admin`                  |\n| `CEPH_RADOS_OP_TIMEOUT` | Ceph rados_osd_op_timeout and rados_mon_op_timeout used to contact cluster (0s means no limit) | `30s`                    |\n| `LOG_LEVEL`             | Logging level. One of: [trace, debug, info, warn, error, fatal, panic]                         | `info`                   |\n| `TLS_CERT_FILE_PATH`    | Path to the x509 certificate file for enabling TLS (the key file path must also be specified)  |                          |\n| `TLS_KEY_FILE_PATH`     | Path to the x509 key file for enabling TLS (the cert file path must also be specified)         |                          |\n\n## Installation\n\nThe typical Go way of installing or building should work provided you have the [cgo dependencies](https://github.com/ceph/go-ceph#installation).\n\n```\n$ go install -tags nautilus\n```\n\n```\n$ go build -o ceph_exporter -tags nautilus\n```\n\nWe build the client with support for nautilus specifically but the binary will work for Octopus and Pacific as well.\n\n## Docker Image\n\n### Docker Hub\n\nThe official docker image is available at\n[digitalocean/ceph_exporter](https://hub.docker.com/r/digitalocean/ceph_exporter/).\n\n### Build From Source\n\nIt is also possible to build your own locally from the source. The port `9128`\nis exposed as a default port for `ceph_exporter`.\n\nThe exporter needs your Ceph configuration in order to establish communication\nwith the Ceph monitors. You can either pass it in as an additional command or\nmount the directory containing both your `ceph.conf` and your user's keyring\nunder the default `/etc/ceph` location that Ceph checks for.\n\nA sample build command would look like:\n\n```bash\n$ docker build -t digitalocean/ceph_exporter .\n```\n\nA `--build-args TEST=true` flag can be added to the build command above to\nalso run Golang's unit tests during build:\n\n```bash\ndocker build -t digitalocean/ceph_exporter . --build-arg TEST=true --no-cache\n```\n\nYou can start running your `ceph_exporter` container now.\n\n```bash\n$ docker run -v /etc/ceph:/etc/ceph -p=9128:9128 -it digitalocean/ceph_exporter\n```\n\nYou would have to ensure your image can talk over to the monitors. If it needs\naccess to your host's network stack you might need to add `--net=host` to the\nabove command. It makes the port mapping redundant so the `-p` flag can be\nremoved.\n\nPoint your Prometheus to scrape from `:9128` on your host now (or your port\nof choice if you decide to change it).\n\n## Contributing\n\nPlease refer to the [CONTRIBUTING](CONTRIBUTING.md) guide for more\ninformation on how to submit your changes to this repository.\n\n## Sample view\n\nSee `./examples` for a `docker-compose` file with Grafana if you'd like to\nquickly get a test environment up and running.\n\nLink to official documentation explaining `docker-compose`:\nhttps://docs.docker.com/compose/\n\nThe `docker-compose` file itself has comments on how to change it to adapt to\nyour environment. It does use volumes in order to persist data.  Docker\nvolumes documentation: https://docs.docker.com/engine/tutorials/dockervolumes/\n\nIf you have [promdash](https://github.com/prometheus/promdash) set up you\ncan generate views like:\n\n![](sample.png)\n\nCopyright @ 2016-2023 DigitalOcean™ Inc.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigitalocean%2Fceph_exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdigitalocean%2Fceph_exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigitalocean%2Fceph_exporter/lists"}