{"id":30883289,"url":"https://github.com/globocom/redis-healthy","last_synced_at":"2025-09-08T09:44:18.318Z","repository":{"id":66161266,"uuid":"74674310","full_name":"globocom/redis-healthy","owner":"globocom","description":"It retrieves metrics, periodically, from Redis (or sentinel) and send them to Logstash","archived":false,"fork":false,"pushed_at":"2018-06-21T18:49:52.000Z","size":164,"stargazers_count":59,"open_issues_count":1,"forks_count":4,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-08-14T10:39:53.019Z","etag":null,"topics":["health-check","logstash","metrics","monitor","redis","sentinel"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/globocom.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}},"created_at":"2016-11-24T13:09:36.000Z","updated_at":"2025-05-09T09:46:45.000Z","dependencies_parsed_at":"2023-05-04T09:39:38.758Z","dependency_job_id":null,"html_url":"https://github.com/globocom/redis-healthy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/globocom/redis-healthy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/globocom%2Fredis-healthy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/globocom%2Fredis-healthy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/globocom%2Fredis-healthy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/globocom%2Fredis-healthy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/globocom","download_url":"https://codeload.github.com/globocom/redis-healthy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/globocom%2Fredis-healthy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274166943,"owners_count":25233959,"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","status":"online","status_checked_at":"2025-09-08T02:00:09.813Z","response_time":121,"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":["health-check","logstash","metrics","monitor","redis","sentinel"],"created_at":"2025-09-08T09:44:15.567Z","updated_at":"2025-09-08T09:44:18.299Z","avatar_url":"https://github.com/globocom.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![license](https://img.shields.io/badge/license-BSD--3--Clause-blue.svg)](https://img.shields.io/badge/license-BSD--3--Clause-blue.svg)\n[![Go Report Card](https://goreportcard.com/badge/github.com/globocom/redis-healthy)](https://goreportcard.com/report/github.com/globocom/redis-healthy)\n[![Build Status](https://travis-ci.org/globocom/redis-healthy.svg?branch=master)](https://travis-ci.org/globocom/redis-healthy)\n\n# redis-healthy\n\nIt retrieves metrics periodically from [Redis](http://redis.io) (or sentinel) (such as [`latency`](http://redis.io/topics/latency), `connected_clients`, `instantaneous_ops_per_sec` and [others](http://redis.io/commands/INFO)) and send them to [Logstash](https://www.elastic.co/products/logstash).\n\n## Plotting the metrics with Grafana\n\n![Redis Sample Metrics](sample.png \"Redis Sample Metrics\")\n\n## Tests\n\n```bash\nmake test\n```\n\n## Metrics\n\n```javascript\n{\n   client_longest_output_list: 15,\n   instantaneous_input_kbps: 0,\n   sync_partial_err: 0,\n   latency: 361,\n   connected_clients: 398,\n   blocked_clients: 0,\n   keyspace_hits: 201980,\n   client: 'app-redis',\n   instantaneous_ops_per_sec: 1092,\n   instantaneous_output_kbps: 504,\n   sync_full: 0,\n   keyspace_misses: 1093,\n   mem_fragmentation_ratio: 0,\n   rejected_connections: 0,\n   sync_partial_ok: 0\n}\n```\n\n## Options\n\n| Variable | Mandatory | Description |\n|:---------|:----------|:------------|\n| PROJECT | Y | An identifier for the metrics.\u003cbr\u003eIt'll be send as `\"client\": PROJECT + \"-redis\"` |\n| PING_FREQUENCY | | Frequency in seconds that the metrics are fetched.\u003cbr\u003e**Default:** `10` |\n| REDIS_HOST | Y | Redis host with port.\u003cbr\u003eIf you're using redis sentinel, then REDIS_HOST will host the sentinel hosts separated by commas (\"host:port,host:port\") |\n| REDIS_PWD | | Redis password.\u003cbr\u003e**Default:** `\"\"` |\n| REDIS_SENTINEL | | Whether you're using sentinel or not.\u003cbr\u003e**Default:** `\"\"` |\n| REDIS_MASTER_NAME | | Redis sentinel master name.\u003cbr\u003e**Default:** `\"\"` |\n| REDIS_LATENCY_THRESHOLD | | Redis latency threshold in ms.\u003cbr\u003eWhen any command take longer than the threshold, then it sends data about latency. After `PING_FREQUENCY` has passed, it sends 0.\u003cbr\u003e**Default:** `\"\"` |\n| REDIS_METRICS_TO_WATCH | | The fields you want to keep track from the output of the command \"info\".\u003cbr\u003e**Default:** `\"client_longest_output_list,connected_clients,blocked_clients,rejected_connections,instantaneous_input_kbps,instantaneous_output_kbps,instantaneous_ops_per_sec,keyspace_hits,keyspace_misses,mem_fragmentation_ratio,sync_full,sync_partial_ok,sync_partial_err\"` |\n| LOGSTASH_HOST | Y | Logstash host |\n| LOGSTASH_PORT | Y | Logstash port |\n| LOGSTASH_PROTOCOL | | The transport protocol used by logstash.\u003cbr\u003e**Default:** `\"udp\"` |\n\n## Usage\n\n```bash\nREDIS_LATENCY_THRESHOLD=\"250\" REDIS_HOST=\"localhost:6379\" LOGSTASH_HOST=\"logstash.mine\" LOGSTASH_PORT=\"8515\" PROJECT=\"myapp\" go run main.go\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglobocom%2Fredis-healthy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fglobocom%2Fredis-healthy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglobocom%2Fredis-healthy/lists"}