Registry / devops / health-check-redis

health-check-redis

JSON →
library0.0.9jsnpmunverified

Lightweight Redis health check library for Node.js (v0.0.9, no recent updates). Accepts an array of Redis connection configs (host/port) and returns a promise with aggregated health status, success/error counts, and per-connection details. Uses callback-based async pattern. No TypeScript types, no browser support. Suitable for simple health endpoints but lacks active maintenance and modern features like ESM or clustering.

npm install health-check-redis
INSTALL
IMPORT
SIG · HEALTH-CHECK-REDIS
H
health-check-redis
devopsjavascriptv0.0.9
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
const healthCheckRedis = require('health-check-redis');
import healthCheckRedis from 'health-check-redis';
Package exports a single function via module.exports, not ESM compatible.
do
healthCheckRedis.do(configs);
healthCheckRedis(configs);
The exported object has a 'do' method; calling directly will throw TypeError.
TypeScript
// No types available; use @ts-ignore or declare module
import healthCheckRedis from 'health-check-redis'; // TS will error
Package has no TypeScript definitions; use require with any type or create your own .d.ts.

Checks health of multiple Redis instances and logs aggregated result with per-instance details.

const healthCheckRedis = require('health-check-redis'); const configs = [ { host: '127.0.0.1', port: 6379 }, { host: 'wrong host', port: 6379 } ]; healthCheckRedis.do(configs) .then(result => { console.log(result); /* { health: false, success: 1, error: 1, details: [ { name: '127.0.0.1:6379', health: true, message: '' }, { name: 'wrong host:6379', health: false, message: 'Redis connection to wrong host:6379 failed - getaddrinfo ENOTFOUND wrong host wrong host:6379' } ] } */ }) .catch(error => { console.error(error); });
Debug
Known issues
breakingThe exported object's 'do' method must be called; direct invocation of the required module does not work.
fix
Use healthCheckRedis.do(configs) instead of healthCheckRedis(configs).
affects: >=0.0.0
gotchaAll hosts in the array must have 'host' and 'port' properties; missing keys will cause runtime errors.
fix
Ensure each config object includes both 'host' and 'port'.
affects: >=0.0.0
deprecatedPackage is outdated and no longer maintained. Last update 2015.
fix
Consider alternatives like ioredis health check or implement your own.
affects: >=0.0.0
gotchaThe 'redis' package used internally may have compatibility issues with Node.js versions >12.
fix
Pin Node.js version or switch to a modern Redis client.
affects: >=0.0.0
Errors
Common errors & fixes
TypeError: healthCheckRedis is not a function
Calling the required module directly instead of using the 'do' method.
fix
healthCheckRedis.do(configs);
TypeError: Cannot read property 'do' of undefined
Package not installed correctly or require path is wrong.
fix
npm install health-check-redis --save
const healthCheckRedis = require('health-check-redis');
Error: Redis connection to <host>:<port> failed - getaddrinfo ENOTFOUND
Invalid hostname or network issue.
fix
Verify Redis host and port are correct and accessible.
Upgrade
Version history
0.0.9latest on npm
Audit
Dependencies
redisrequiredUsed to connect to Redis instances
Agent activity
6 hits · last 30 days
node
6
Resources
health-check-redis — npm install health-check-redis · libregistry