GithubHelp home page GithubHelp logo

cofess / redis-stats Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tessus/redis-stats

0.0 0.0 0.0 165 KB

A lightweight dashboard to show statistics about a Redis server.

License: MIT License

PHP 100.00%

redis-stats's Introduction

redis-stats

Features

  • lightweight
  • no PHP redis module required
  • connection via IP/port or socket
  • password support (including Redis 6 ACLs)
  • show details
  • flush database (async support)
  • flush instance (async support)
  • command mapping support (when rename-command is used on the server)
  • auto refresh
  • check for update

Installation

git clone --depth 1 https://github.com/tessus/redis-stats.git
cd redis-stats
cp config.template.php config.php

Configuration

Server information

Servers are defined as an array. There are a few examples in the config.template.php file.

Field Type Description
Name string name shown in drop-down list (also used for command mapping)
IP/Socket string IP address or socket (unix://) of the server
Port integer port of server, use -1 for socket
Password string, array credentials for the server (optional)
string: password
array: ['user', 'password'] for Redis ACLs

e.g.:

$servers = [
	[ 'Local', '127.0.0.1', 6379 ],
	[ 'Local socket', 'unix:///var/run/redis.sock', -1 ],
	[ 'Local with password', '127.0.0.1', 6379, 'password_here' ],
	[ 'Local with user and password', '127.0.0.1', 6379, ['username', 'password_here'] ],
];

Misc options

Name Default Description
FLUSHDB true Show a 'Flush' button for databases
CONFIRM_FLUSHDB true Ask for confirmation before flushing database
FLUSHALL true Show a 'Flush All' button for the instance
CONFIRM_FLUSHALL true Ask for confirmation before flushing the entire instance
STATUS_LINE "bottom" Position of status line: "bottom" or "top"
CHECK_FOR_UPDATE true Show a 'Check for update' button
DEBUG false debug mode - you don't want to set this to true!

Command mapping

In case commands have been renamed on the server, there's support to map these commands in the config file.

e.g.:

$command = [
	'Local'    => [         // must be a server name (first field in server array, name shown in drop-down list)
		'FLUSHDB'  => 'fdb-5dea06694ff64',
		'FLUSHALL' => 'fa-5dea067c9bbd6',
		'AUTH'     => '',
		'INFO'     => '',
	],
];

Screenshot

Acknowledgements

I found the original script at https://gist.github.com/kabel/10023961

redis-stats's People

Contributors

tessus avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.