redis-status

1.0.3 • Public • Published

redis-status

A node module that checks the health of a Redis server, suitable for use by a service's "health" route.

Installation

npm install redis-status --save

Usage

var express = require('express');
var router = express.Router();
 
// Construct a `RedisStatus` object configured to check the status of
// the Redis server named 'foo' at `redis//localhost:6379`.
var fooStatus = require('redis-status')({
  name: 'foo',
  port: 6379,
  host: 'localhost'
});
 
// If 'foo' is healthy, this route will print 'great'; otherwise it will print
// the reason that 'foo' is not healthy. A monitoring service like Webmon or
// Pingdom can raise non-'great' responses as alerts.
router.get('/health', function(req, res) {
  fooStatus.checkStatus(function(err) {
    res.send(err || 'great');
  });
});

Contributing

We welcome pull requests! Please lint your code.

Release History

  • 1.0.3 Connect to Redis only to check the status and then disconnect.
  • 1.0.2 Keep a persistent connection to Redis.
  • 1.0.1 Fix typo and clean up documentation.
  • 1.0.0 Initial release.

Dependencies (1)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i redis-status

    Weekly Downloads

    75

    Version

    1.0.3

    License

    MIT

    Last publish

    Collaborators

    • alan-hadyk
    • leonardo-mixmax
    • dmytro.prysiazhnyi
    • laszlovaspal
    • akashbhalla
    • hishank
    • danyloderkach
    • sergey.polyarush
    • jordins
    • eugene.safronov.dewais
    • joneslloyd
    • kamilgruszka
    • tharindu-wj
    • aminao
    • enuma
    • adriandmitroca
    • mixmaxkristina
    • corridonimatias
    • mikusd
    • mixmax_it
    • andra.lazariuc
    • danaya
    • adborroto
    • aaavakian
    • dnechay
    • raphaelbs
    • guilhermemj
    • eduard.borges
    • mixmax-codeship
    • bradvogel
    • jessem3
    • jsalvata
    • gabriel-mixmax
    • wearhere