Skip to content
/ sredis Public

🎧 A redis monitoring tool. Demo purpose only.

License

Notifications You must be signed in to change notification settings

cyyyu/sredis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sredis

NPM

Sredis is another redis monitoring tool written in javascript.

Installation

Global installation.

npm install -g sredis

Install as a node module.

npm install --save sredis

Usage

Command line usage.

> sredis -h 127.0.0.1 -p 6379 -a passwd -o ./logs.csv

# show helps
> sredis --help
  Usage: sredis [options]

  Options:

    -h, --help                output usage information
    -V, --version             output the version number
    -v --version              get version
    -h --host <host>          Server hostname (default: 127.0.0.1).
    -p --port <port>          Server port (default: 6379).
    -a --auth <password>      Password for redis server.
    -o --output <filepath>    Output to csv file.
    -i --interval <interval>  Refresh interval, mileseconds (default: 3000).

Module usage.

const Sredis = require('sredis')

let mywatcher = new Sredis({
  host: '', // redis server host(optional), default: 127.0.0.1
  port: '', // redis server port(optional), default: 6379
  password: '', // redis server password(optional)
  output: '', // csv filepath(optional)
  interval: '', // refresh interval, mileseconds(optional), default: 3000
})

Events

  • event#watching

  • event#statusUpdating

  • event#statusUpdated

    mywatcher.on('statusUpdated', function(latestStatus){
      /*
      	  got latest status.
      	  {
            Server: {},
            Client: {}
            ...
      	  }
      */
    })
    
  • event#historyUpdated

    mywatcher.on('historyUpdated', function(history){
      /*
      	  here got seven history status.
      	  [
            {
              Server: {},
              Client: {}
              ...
            }
            ...
      	  ]
      */
    })
    

    ​

  • event#scriptsLoading

    Lua script loading.

  • event#scriptsLoaded

    Lua script loaded.

Screenshots

screenshot


License: MIT

Author: cyyyu

About

🎧 A redis monitoring tool. Demo purpose only.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published