{"id":17150311,"url":"https://github.com/maxbrunet/prometheus-elasticache-sd","last_synced_at":"2026-05-07T23:11:58.138Z","repository":{"id":37792864,"uuid":"446282262","full_name":"maxbrunet/prometheus-elasticache-sd","owner":"maxbrunet","description":"Prometheus Service Discovery for AWS ElastiCache","archived":false,"fork":false,"pushed_at":"2026-04-26T22:27:49.000Z","size":2260,"stargazers_count":9,"open_issues_count":5,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-27T00:21:58.321Z","etag":null,"topics":["aws","aws-elasticache","elasticache","memcached","prometheus","redis","service-discovery"],"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/maxbrunet.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"NOTICE","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-01-10T04:40:05.000Z","updated_at":"2026-04-26T22:27:53.000Z","dependencies_parsed_at":"2023-10-19T20:06:06.509Z","dependency_job_id":"71f238b0-01e3-43cc-a486-16b1824cac2f","html_url":"https://github.com/maxbrunet/prometheus-elasticache-sd","commit_stats":null,"previous_names":[],"tags_count":514,"template":false,"template_full_name":null,"purl":"pkg:github/maxbrunet/prometheus-elasticache-sd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxbrunet%2Fprometheus-elasticache-sd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxbrunet%2Fprometheus-elasticache-sd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxbrunet%2Fprometheus-elasticache-sd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxbrunet%2Fprometheus-elasticache-sd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxbrunet","download_url":"https://codeload.github.com/maxbrunet/prometheus-elasticache-sd/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxbrunet%2Fprometheus-elasticache-sd/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32481555,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"ssl_error","status_checked_at":"2026-04-30T13:12:06.837Z","response_time":57,"last_error":"SSL_read: 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":["aws","aws-elasticache","elasticache","memcached","prometheus","redis","service-discovery"],"created_at":"2024-10-14T21:35:21.135Z","updated_at":"2026-05-01T01:01:39.344Z","avatar_url":"https://github.com/maxbrunet.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Prometheus AWS ElastiCache Service Discovery\n\n[![release](https://img.shields.io/github/v/release/maxbrunet/prometheus-elasticache-sd?sort=semver)](https://github.com/maxbrunet/prometheus-elasticache-sd/releases)\n[![build](https://github.com/maxbrunet/prometheus-elasticache-sd/actions/workflows/build.yml/badge.svg)](https://github.com/maxbrunet/prometheus-elasticache-sd/actions/workflows/build.yml)\n[![go report](https://goreportcard.com/badge/github.com/maxbrunet/prometheus-elasticache-sd)](https://goreportcard.com/report/github.com/maxbrunet/prometheus-elasticache-sd)\n\nElastiCache SD allows retrieving scrape targets from [AWS ElastiCache](https://aws.amazon.com/elasticache/) cache nodes for [Prometheus](https://prometheus.io/). **No address is defined by default**, it must be configured with relabeling and requires a [third-party exporter](https://prometheus.io/docs/instrumenting/exporters/#third-party-exporters) supporting the [multi-target pattern](https://prometheus.io/docs/guides/multi-target-exporter/).\n\n## Configuration\n\nHelp on flags:\n\n```\n./prometheus-elasticache-sd --help\n```\n\nThe following meta labels are available on targets during [relabeling](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config):\n\n* `__meta_elasticache_cache_cluster_id`: The identifier of the cluster.\n* `__meta_elasticache_cache_cluster_status`: The current state of this cluster. See `CacheClusterStatus` in the [API Reference](https://docs.aws.amazon.com/AmazonElastiCache/latest/APIReference/API_CacheCluster.html) for possible values.\n* `__meta_elasticache_cache_node_id`: The cache node identifier. A node ID is a numeric identifier (0001, 0002, etc.). The combination of cluster ID and node ID uniquely identifies every cache node used in a customer's Amazon account.\n* `__meta_elasticache_cache_node_status`: The current state of this cache node. See `CacheNodeStatus` in the [API Reference](https://docs.aws.amazon.com/AmazonElastiCache/latest/APIReference/API_CacheNode.html) for possible values.\n* `__meta_elasticache_cache_node_type`: The name of the compute and memory capacity node type for the cluster.\n* `__meta_elasticache_cache_parameter_group_name`: The name of the cache parameter group.\n* `__meta_elasticache_cache_subnet_group_name`: The name of the cache subnet group associated with the cluster.\n* `__meta_elasticache_customer_availability_zone`: The Availability Zone where this node was created and now resides.\n* `__meta_elasticache_endpoint_address`: The DNS hostname of the cache node.\n* `__meta_elasticache_endpoint_port`: The port number that the cache engine is listening on.\n* `__meta_elasticache_engine_version`: The version of the cache engine that is used in this cluster.\n* `__meta_elasticache_engine`: The name of the cache engine (`memcached` or `redis`) used for this cluster.\n* `__meta_elasticache_preferred_availability_zone`: The name of the Availability Zone in which the cluster is located or \"Multiple\" if the cache nodes are located in different Availability Zones.\n* `__meta_elasticache_replication_group_id`: The replication group to which this cluster belongs. If this label is absent, the cluster is not associated with any replication group.\n* `__meta_elasticache_tag_\u003ctagkey\u003e`: The tag's value.\n\nThe following AWS IAM permissions are required:\n\n* `elasticache:DescribeCacheClusters`\n* `elasticache:ListTagsForResource`\n\n## Usage\n\n### Docker\n\nTo run the ElastiCache SD as a Docker container, run:\n\n```\ndocker run ghcr.io/maxbrunet/prometheus-elasticache-sd:latest --help\n```\n\n### oliver006/redis_exporter\n\nThis service discovery can be used with [oliver006/redis_exporter](https://github.com/oliver006/redis_exporter#prometheus-configuration-to-scrape-multiple-redis-hosts), here is a sample Prometheus configuration:\n\n```yaml\nscrape_configs:\n  - job_name: \"redis_exporter_targets\"\n    file_sd_configs:\n    - files:\n        - /path/to/elasticache.json  # Set file path with --output.file flag\n    metrics_path: /scrape\n    relabel_configs:\n      # Filter for Redis cache nodes\n      - source_labels: [__meta_elasticache_engine]\n        regex: redis\n        action: keep\n      # Build Redis URL to use as target parameter for the exporter\n      - source_labels:\n          - __meta_elasticache_endpoint_address\n          - __meta_elasticache_endpoint_port\n        replacement: redis://$1\n        separator: ':'\n        target_label: __param_target\n      # Use Redis URL as instance label\n      - source_labels: [__param_target]\n        target_label: instance\n      # Set exporter address\n      - target_label: __address__\n        replacement: \u003c\u003cREDIS-EXPORTER-HOSTNAME\u003e\u003e:9121\n```\n\n### prometheus/memcached_exporter\n\nThis service discovery can be used with the official [memcached_exporter](https://github.com/prometheus/memcached_exporter),\nsee its [README](https://github.com/prometheus/memcached_exporter#multi-target) for details.\n\n## Development\n\n### Build\n\nBinary:\n\n```\ngo build .\n```\n\nContainer image with [ko](https://ko.build):\n\n```\nko build --base-import-paths --local .\n```\n\n### Test\n\n```\ngo test -v ./...\n```\n\n## License\n\nApache License 2.0, see [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxbrunet%2Fprometheus-elasticache-sd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxbrunet%2Fprometheus-elasticache-sd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxbrunet%2Fprometheus-elasticache-sd/lists"}