{"id":32715119,"url":"https://github.com/woblerr/medusa_exporter","last_synced_at":"2026-05-06T14:36:53.115Z","repository":{"id":321802255,"uuid":"1077163170","full_name":"woblerr/medusa_exporter","owner":"woblerr","description":"Prometheus exporter for Medusa for Apache Cassandra","archived":false,"fork":false,"pushed_at":"2025-11-28T18:18:35.000Z","size":3166,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-11-30T01:34:17.108Z","etag":null,"topics":["backup","cassandra","cassandra-medusa","collected-metrics","docker","exporter","metrics","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/woblerr.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-15T21:40:27.000Z","updated_at":"2025-11-28T17:21:32.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/woblerr/medusa_exporter","commit_stats":null,"previous_names":["woblerr/medusa_exporter"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/woblerr/medusa_exporter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/woblerr%2Fmedusa_exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/woblerr%2Fmedusa_exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/woblerr%2Fmedusa_exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/woblerr%2Fmedusa_exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/woblerr","download_url":"https://codeload.github.com/woblerr/medusa_exporter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/woblerr%2Fmedusa_exporter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32698587,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-06T08:33:17.875Z","status":"ssl_error","status_checked_at":"2026-05-06T08:33:17.221Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["backup","cassandra","cassandra-medusa","collected-metrics","docker","exporter","metrics","prometheus","prometheus-exporter"],"created_at":"2025-11-02T14:00:28.195Z","updated_at":"2026-05-06T14:36:53.110Z","avatar_url":"https://github.com/woblerr.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Medusa Exporter for Apache Cassandra\n\n[![Actions Status](https://github.com/woblerr/medusa_exporter/workflows/build/badge.svg)](https://github.com/woblerr/medusa_exporter/actions)\n[![Coverage Status](https://coveralls.io/repos/github/woblerr/medusa_exporter/badge.svg?branch=master)](https://coveralls.io/github/woblerr/medusa_exporter?branch=master)\n[![Go Report Card](https://goreportcard.com/badge/github.com/woblerr/medusa_exporter)](https://goreportcard.com/report/github.com/woblerr/medusa_exporter)\n\nPrometheus exporter for [cassandra-medusa](https://github.com/thelastpickle/cassandra-medusa).\n\nThe metrics are collected based on result of `medusa list-backups --output json` command. You need to run exporter on the same host where Medusa was installed or inside Docker.\n\n## Grafana dashboard\n\nTo get a dashboard for visualizing the collected metrics, you can use a ready-made dashboard [Medusa Exporter Dashboard](https://github.com/woblerr/medusa_exporter-dashboard) or make your own.\n\n## Collected metrics\n### Backup metrics\n\n| Metric | Description |  Labels | Additional Info |\n| ----------- | ------------------ | ------------- | --------------- |\n| `medusa_backup_info` | backup info | backup_name, backup_type, prefix, start_time | Values description:\u003cbr\u003e `1` - info about backup is exist. |\n| `medusa_backup_status` | backup status | backup_name, backup_type | Values description:\u003cbr\u003e `0` - backup is complete,\u003cbr\u003e `1` - backup is not complete. |\n| `medusa_backup_duration_seconds` | backup duration in seconds | backup_name, backup_type, start_time, stop_time | |\n| `medusa_backup_size_bytes` | backup size in bytes | backup_name, backup_type | |\n| `medusa_backup_objects` | number of objects in backup | backup_name, backup_type | |\n| `medusa_backup_completed_nodes` | number of completed nodes in backup | backup_name, backup_type | |\n| `medusa_backup_incomplete_nodes` | number of incomplete nodes in backup | backup_name, backup_type | |\n| `medusa_backup_missing_nodes` | number of missing nodes in backup | backup_name, backup_type | |\n| `medusa_node_backup_info` | node backup info | backup_name, backup_type, node_fqdn, prefix, release_version, server_type, start_time | Values description:\u003cbr\u003e `1` - info about node backup is exist.\u003cbr\u003eFor missing nodes: `release_version`, `server_type`, and `start_time` labels are set to `none`. |\n| `medusa_node_backup_status` | node backup status | backup_name, backup_type, node_fqdn | Values description:\u003cbr\u003e `0` - node backup is complete,\u003cbr\u003e `1` - node backup is not complete,\u003cbr\u003e `2` - node is missing. |\n| `medusa_node_backup_duration_seconds` | node backup duration in seconds | backup_name, backup_type, node_fqdn, start_time, stop_time | For missing nodes: `start_time` and `stop_time` labels are set to `none`, value is `0`. |\n| `medusa_node_backup_size_bytes` | node backup size in bytes | backup_name, backup_type, node_fqdn | For missing nodes: value is `0`. |\n| `medusa_node_backup_objects` | number of objects in node backup | backup_name, backup_type, node_fqdn | For missing nodes: value is `0`. |\n\n### Last backup metrics\n\n| Metric | Description |  Labels | Additional Info |\n| ----------- | ------------------ | ------------- | --------------- |\n| `medusa_backup_since_last_completion_seconds` | seconds since the last completed full or differential  backup | backup_type | |\n| `medusa_backup_last_duration_seconds` | backup duration for the last full or differential backup | backup_type | |\n| `medusa_backup_last_size_bytes` | backup size for the last full or differential backup | backup_type | |\n| `medusa_backup_last_objects` | number of objects in backup for the last full or differential backup | backup_type | |\n\n### Exporter metrics\n\n| Metric | Description |  Labels | Additional Info |\n| ----------- | ------------------ | ------------- | --------------- |\n| `medusa_exporter_build_info` | information about Medusa exporter | branch, goarch, goos, goversion, revision, tags, version | |\n| `medusa_exporter_status` | Medusa exporter get data status | prefix | Values description:\u003cbr\u003e `0` - errors occurred when fetching information from Medusa,\u003cbr\u003e `1` - information successfully fetched from Medusa. |\n\n### Additional description of metrics\n\nFor `medusa_backup_duration_seconds` and `medusa_node_backup_duration_seconds` metrics the following logic is applied:\n* if backup/node backup is complete then value calculated;\n* if backup/node backup is not complete, then value is `0`, labels `stop_time` is `none`;\n* for missing nodes: value is `0`, labels `start_time` and `stop_time` are set to `none`.\n\nFor missing nodes, `medusa_node_backup_*` metrics are set with default values:\n* `medusa_node_backup_info`: labels `release_version`, `server_type`, and `start_time` are set to `none`;\n* `medusa_node_backup_status`: value is `2` (missing);\n* `medusa_node_backup_duration_seconds`, `medusa_node_backup_size_bytes`, `medusa_node_backup_objects`: value is `0`.\n\nFor `medusa_*_last_*` metrics the following logic is applied:\n  * metrics are calculated only for completed backups;\n  * if only full completed backups exist, only `backup_type=\"full\"` metrics will be set;\n  * if only differential backups exist, only `backup_type=\"differential\"` metrics will be set;\n  * if both types exist, both labels will be set with their respective latest backups;\n  * metrics are not set if no completed backups exist at all.\n  * Medusa allows creating only differential backups without full backups - in this case, only `backup_type=\"differential\"` metrics will be available.\n\n\n## Compatibility with cassandra-medusa versions\n\nThe number of collected metrics may vary depending on cassandra-medusa version.\n\nFor different versions, some metrics may not be collected or have insignificant label values:\n\n* `cassandra-medusa \u003c v0.27.0`\n\n  Changes from [cassandra-medusa/pull/899](https://github.com/thelastpickle/cassandra-medusa/pull/899) PR are required for the exporter.\n\n## Getting Started\n### Building and running\n\n```bash\ngit clone https://github.com/woblerr/medusa_exporter.git\ncd medusa_exporter\nmake build\n./medusa_exporter \u003cflags\u003e\n```\n\nAvailable configuration flags:\n\n```bash\nusage: medusa_exporter [\u003cflags\u003e]\n\n\nFlags:\n  -h, --[no-]help              Show context-sensitive help (also try --help-long and --help-man).\n      --web.telemetry-path=\"/metrics\"  \n                               Path under which to expose metrics.\n      --web.listen-address=:19500 ...  \n                               Addresses on which to expose metrics and web interface. Repeatable for multiple\n                               addresses. Examples: `:9100` or `[::1]:9100` for http, `vsock://:9100` for vsock\n      --web.config.file=\"\"     Path to configuration file that can enable TLS or authentication. See:\n                               https://github.com/prometheus/exporter-toolkit/blob/master/docs/web-configuration.md\n      --collect.interval=600   Collecting metrics interval in seconds.\n      --medusa.config-file=\"\"  Full path to Medusa configuration file.\n      --medusa.prefix=\"\"       Prefix for shared storage.\n      --log.level=info         Only log messages with the given severity or above. One of: [debug, info, warn, error]\n      --log.format=logfmt      Output format of log messages. One of: [logfmt, json]\n      --[no-]version           Show application version.\n```\n\n#### Additional description of flags\n\nCustom `config` for `medusa` command can be specified via `--medusa.config` flag. Full paths must be specified.\u003cbr\u003e\nFor example, `--medusa.config=/tmp/medusa.conf`.\n\nWhen `--log.level=debug` is specified - information of values and labels for metrics is printing to the log.\n\nThe flag `--web.config.file` allows to specify the path to the configuration for TLS and/or basic authentication.\u003cbr\u003e\nThe description of TLS configuration and basic authentication can be found at [exporter-toolkit/web](https://github.com/prometheus/exporter-toolkit/blob/v0.14.1/docs/web-configuration.md).\n\n\n### Running as systemd service\n\n* Register `medusa_exporter` (already builded, if not - exec `make build` before) as a systemd service:\n\n```bash\nmake prepare-service\n```\n\nValidate prepared file `medusa_exporter.service` and run:\n\n```bash\nsudo make install-service\n```\n\n* View service logs:\n\n```bash\njournalctl -u medusa_exporter.service\n```\n\n* Delete systemd service:\n\n```bash\nsudo make remove-service\n```\n\n---\nManual register systemd service:\n\n```bash\ncp medusa_exporter.service.template medusa_exporter.service\n```\n\nIn file `medusa_exporter.service` replace `{PATH_TO_FILE}` to full path to `medusa_exporter`.\n\n```bash\nsudo cp medusa_exporter.service /etc/systemd/system/medusa_exporter.service\nsudo systemctl daemon-reload\nsudo systemctl enable medusa_exporter.service\nsudo systemctl restart medusa_exporter.service\nsystemctl -l status medusa_exporter.service\n```\n\n### RPM/DEB packages\n\nYou can use the already prepared rpm/deb package to install the exporter. Only the medusa_exporter binary  and the service file are installed by package.\n\nFor example:\n```bash\nrpm -ql medusa_exporter\n\n/etc/systemd/system/medusa_exporter.service\n/usr/bin/medusa_exporter\n```\n\n### Running tests\n\nRun the unit tests:\n\n```bash\nmake test\n```\n\nRun the end-to-end tests:\n\n```bash\nmake test-e2e\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwoblerr%2Fmedusa_exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwoblerr%2Fmedusa_exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwoblerr%2Fmedusa_exporter/lists"}