Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
R

redmon

> 编程语言
Open source

A web interface for managing redis: cli, admin, and live monitoring

1.6K stars0 likes1 views
WebsiteGitHub

About

A web interface for managing redis: cli, admin, and live monitoring

Redmon

Simple sinatra based dashboard for redis. After seeing the fnordmetric project I was inspired to write this. Some of the ideas there have be carried over here.


Watch your redis server live (with configurable pooling seconds).


Interact with redis using a familiar cli interface.


Dynamically update your server configuration.


Installation

Redmon is available as a RubyGem:

bash
gem install redmon

Usage

…

If you want to simulate a weak load on redis

bash
$ ruby load_sim.rb

Open your browser to 0.0.0.0:4567

Using in a Rails application

Add to Gemfile:

ruby
gem 'redmon', require: false

Mount redmon in config/routes.rb:

ruby
mount Redmon::App => '/redmon'

Create a config/initializers/redmon.rb file:

ruby
require 'redmon/config'
require 'redmon/redis'
require 'redmon/app'

#
# Optional config overrides
#
Redmon.configure do |config|
  config.redis_url = 'redis://127.0.0.1:6379'
  config.namespace = 'redmon'
end

This will mount the Redmon application to the /redmon path.

Stats worker

The worker that gathers the Redis info stats will not be started when Redmon is mounted like this. In order to get a EventMachine worker running inside your Rails app you can try this Railtie based approach. If you are using a system to execute background tasks in your app (like Sidekiq, Resque, or Delayed Job), you can write your own worker to update the info stats.

A simple worker for Sidekiq looks like this:

ruby
class RedmonWorker
  include Sidekiq::Worker

  def perform
    worker = Redmon::Worker.new
    worker.record_stats
    worker.cleanup_old_stats
  ensure
    self.class.perform_in Redmon.config.poll_interval.seconds
  end
end

Once enqueued, the worker updates the stats and automatically enqueues itself to be performed again after the defined poll interval.

Using with another Sinatra application

Create/Edit config.ru:

ruby
require './app.rb'
require 'redmon'

map '/' do
  run Sinatra::Application
end
map '/redmon' do
  if EM.reactor_running?
    Redmon::Worker.new.run!
  else
    fork do
      trap('INT') { EM.stop }
      trap('TERM') { EM.stop }
      EM.run { Redmon::Worker.new.run! }
    end
  end

  run Redmon::App
end

In order to configure Redmon use this code in your app.rb file:

ruby
Redmon.configure do |config|
  config.redis_url = 'redis://127.0.0.1:6379'
  config.namespace = 'redmon'
end

This will mount the Redmon application to the /redmon path.

License

Copyright (c) 2012-2017 Sean McDaniel

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to use, copy and modify copies of the Software, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Ruby

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言