Git Product home page Git Product logo

memcached-admin's Introduction

Memcached Admin

Docker Image Size (latest by date) Docker Cloud Build Status Docker Image CI Publish Image

This program allows to see in real-time (top-like) or from the start of the server, stats for get, set, delete, increment, decrement, evictions, reclaimed, cas command, as well as server stats (network, items, server version) with google charts and server internal configuration

You can go further to see each server slabs, occupation, memory wasted and items (key & value).

Another part can execute commands to any memcached server : get, set, delete, flush_all, as well as execute any commands (like stats) with telnet

image

Statistics

  • Stats for each or all memcached servers, items, evicted, reclaimed ...
  • Stats for every command : set, get, delete, incr, decr, cas ...
  • Slabs stats (Memory, pages, memory wasted, items)
  • Items stats (View items in slabs, then data for each key)
  • Network stats (Traffic, bandwidth)

Commands

  • Execute commands : get, set, delete, flush_all on servers to administrate or debug it
  • Get data with key on servers
  • Delete keys on servers
  • Flush servers
  • Execute telnet command directly from phpMemcachedAdmin
  • Search for specific pattern into all keys

Live Stats

  • Top-like real time stats with configurable alerts

Configuration

  • Edit configuration directly from web page
  • phpMemcachedAdmin can use socket communication, PECL Memcache or Memcached API
  • Organize your servers into cluster

Install

Single server setup

Environments :

  • MEMCACHED_HOST : Default address of the server
  • MEMCACHED_PORT : Default port of the server
docker run --rm -p 8080:80 -e MEMCACHED_HOST='127.0.0.1' -e MEMCACHED_PORT='11211' hatamiarash7/memcached-admin:master

Multiple server setup (using the Default cluster)

Environments :

  • MEMCACHED_HOST : Comma separated hostname and optional port
  • MEMCACHED_PORT : Default port of the hostnames not having a port specified
docker run --rm -p 8080:80 -e MEMCACHED_HOST='127.0.0.1:11211,127.0.0.1:11212' hatamiarash7/memcached-admin:master
# or
docker run --rm -p 8080:80 -e MEMCACHED_HOST='127.0.0.1,127.0.0.2' -e MEMCACHED_PORT='11211' hatamiarash7/memcached-admin:master
# or
docker run --rm -p 8080:80 -e MEMCACHED_HOST='127.0.0.1:11212,127.0.0.1' -e MEMCACHED_PORT='11211' hatamiarash7/memcached-admin:master

You can define your cluster in Configuration section

Test

We have a docker-compose.yml file here for testing purpose. You can run it with the following command:

docker compose up -d

Open your browser and go to http://localhost:8085/index.php?server=memcached:11211 to see the dashboard.


Support

Donate with Bitcoin Donate with Ethereum

ko-fi

Contributing

Don't be shy to be a contributor ๐Ÿ˜‰

  1. Fork it !
  2. Create your feature branch : git checkout -b my-new-feature
  3. Commit your changes : git commit -am 'Add some feature'
  4. Push to the branch : git push origin my-new-feature
  5. Submit a pull request

Issues

Each project may have many problems. Contributing to the better development of this project by reporting them.

memcached-admin's People

Contributors

hatamiarash7 avatar leroy0211 avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

memcached-admin's Issues

SASL support

Is your feature request related to a problem?

Currently it's not possible to connect to a SASL enabled server.

Describe the solution you'd like

Being able to set SASL user and password, preferably per server or cluster, but could be globally.

Describe alternatives you've considered

I actually built an image on top of this that adds the following code to Library_Command_Memcached::__construct():

$user = getenv('MEMCACHED_SASL_USER');
$pass = getenv('MEMCACHED_SASL_PASS');
if ($user && $pass) {
    self::$_memcache->setOption(Memcached::OPT_BINARY_PROTOCOL, true);
    self::$_memcache->setSaslAuthData($user, $pass);
}

and runs the following inside its Dockerfile:

RUN apt-get update && apt-get install --no-install-recommends -y \
    libmemcached-dev \
    libsasl2-modules \
    libzip-dev \
    zip \
    && pecl install memcached \
    && docker-php-ext-enable memcached.so \
    && docker-php-ext-install zip \
    && rm -rf /var/lib/apt/lists/*

and setting the env variables MEMCACHED_SASL_USER and MEMCACHED_SASL_PASS, and configuring the GUI to use PECL Memcached for each function did get me connected to the SASL authenticated server. However all the stat graphs are broken, showing instead Warning: A non-numeric value encountered in /var/www/html/Library/Data/Analysis.php on line 56

However, the table near the bottom with the NAME, SIZE, %MEM (etc.) columns does work, so there's probably some incompatibility in the PECL Memcached code pathway.

Additional context

Screenshot of my hack in action, just for reference
image

Fatal error: __autoload() is no longer supported, use spl_autoload_register() instead in /var/www/html/Library/Loader.php on line 11

Describe the bug

Fatal error: __autoload() is no longer supported, use spl_autoload_register() instead in /var/www/html/Library/Loader.php on line 11

Screenshot 2022-08-31 154244

To Reproduce

Simply run this docker command:
docker run --rm -p 8080:80 -e MEMCACHED_HOST='<my_aws_host>' -e MEMCACHED_PORT='11211' hatamiarash7/memcached-admin:master

It seems that your PHP version is too old. Please update your Docker image.

Thank you.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

docker-compose
docker-compose.yml
  • docker.io/bitnami/memcached 1
dockerfile
Dockerfile
  • php 8.3-apache
github-actions
.github/workflows/docker-image.yml
  • actions/checkout v4@3df4ab11eba7bda6032a0b82a6bb43b11571feac
  • github/codeql-action v2
.github/workflows/docker-publish.yml
  • actions/checkout v4@3df4ab11eba7bda6032a0b82a6bb43b11571feac
  • docker/login-action v3.1.0
  • docker/metadata-action v4.6.0
  • docker/build-push-action v5.3.0
.github/workflows/dockerhub.yml
  • actions/checkout v4@3df4ab11eba7bda6032a0b82a6bb43b11571feac
  • docker/login-action v3.1.0
  • docker/metadata-action v4.6.0
  • docker/build-push-action v5.3.0

  • Check this box to trigger a request for Renovate to run again on this repository

Fix or suppress PHP warnings

There are many PHP warnings:

Warning:  A non-numeric value encountered in /var/www/html/Library/Data/Analysis.php on line 56

in /stats.php

Warning: A non-numeric value encountered in /var/www/html/Library/Data/Analysis.php on line 28
Warning: Undefined array key "mem_requested" in /var/www/html/Library/Data/Analysis.php on line 196`

in index.php

Environment

Docker image (hatamiarash7/memcached-admin:master@sha256:91a587ae6b6de18b11eb739a48fc145aff312ad2fdccec838b37d9078fee487d)

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.