Skip to content
runit web monitoring tool
Ruby HTML JavaScript Shell Other
Pull request Compare This branch is 1 commit ahead, 3 commits behind akzhan:master.
Latest commit a0b910d Mar 1, 2015 @numbata numbata Update DESCRIPTION
Failed to load latest commit information.
bin Rename runit-man.rb to runit-man, READMORE to INSTALL. Feb 18, 2010
cookbooks update paths to the box ruby. Nov 10, 2012
goodies Example test service with multiple logs per service. Nov 30, 2011
i18n Fix USR1 and USR2 signal translations Jan 13, 2015
lib/runit-man Code style May 30, 2013
public Update Twitter Boostrap to 2.3.2 May 23, 2013
script Ressurection of console (it was broken after 0.1) Mar 5, 2010
spec Move application code to RunitMan::App class. It prevents exceptions … Mar 23, 2012
sv Use read_write_mode for generated run script Sep 5, 2011
views Merge Sep 25, 2012
.gitignore Update screenshot with 2.4.3 styling. Apr 19, 2012
.gitmodules Use build-essential as submodule. Nov 10, 2012
.yardopts Start to document the project using YARD. Apr 10, 2012
CHANGELOG.md Version bump to 2.4.11 Nov 10, 2012
DESCRIPTION Update DESCRIPTION Mar 1, 2015
Gemfile Start to document the project using YARD. Apr 10, 2012
INSTALL.md Information about runit-man cookbook. Apr 23, 2012
LICENSE update license Sep 13, 2011
README.md Update README.md Oct 6, 2013
README_ru.md tables in readme [ci skip] Oct 6, 2013
Rakefile Start to document the project using YARD. Apr 10, 2012
Vagrantfile Use build-essential as submodule. Nov 10, 2012
local-run.rb Rename runit-man.rb to runit-man, READMORE to INSTALL. Feb 18, 2010
runit-man-screenshot.gif Update screenshot with 2.4.3 styling. Apr 19, 2012
runit-man.gemspec Start to document the project using YARD. Apr 10, 2012

README.md

Description

Simple runit web management tool with internationalization support.

Server will run by runit-man script. Take a note that runit-man must have privileges like runsvdir process ones.

Screenshot

Screenshot

Installation

Opscode Chef

We provide runit-man cookbook to automate setup of runit-man using Opscode Chef.

Manual installation

Usually You should install both runit-man and thin gems to run this tool fine.

gem install runit-man thin

Pragmatic approach is to setup runit-man as runit service like this:

runit-man -p 14500 -r

This command installs runit-man as runit service (using default folders /etc/sv/ and /etc/service/).

Look at {file:INSTALL.md} for details.

rackup configuration

Take a note that runit-man gem also provides config.ru rackup configuration file. It's useful for running under unicorn/rainbows etc. runit-man --rackup=command option does cd config.ru directory && set environment && exec command.

Customization

This tool can provide additional information or actions through it's Web page.

View names and content of files that related to concrete service

For each known runit service this tool looks for ./runit-man/files-to-view/ folder. Every symlink there will be shown as link to view target file content.

Show links that related to concrete service

For each known runit service this tool looks for ./runit-man/urls-to-view/ folder. Every file ended with .url will be shown as link to view target location (location should be written as content of this file).

Indicate services with any of watched files are modified since service startup

For each known runit service this tool looks for ./runit-man/files-to-watch/ folder. Symlink targets there will be tested for its mtime to be less than service start time. Service will be indicated as dangerous (as red color) to restart if any watched file is modified since service startup.

Show buttons that send signals to concrete service

For each known runit service this tool looks for ./runit-man/allowed-signals/ folder. Each one-letter-named file declares that signal button should be shown in Web UI.

Signal letters listed below in REST API section.

REST API

Get state

You can read current state of services in JSON format using GET /services.json

Management

You can manage your services using POST /<service name>/<command>

Supported commands: up, down, restart, switch_up (activates service), switch_down (deactivates service).

You can also send any signal to service using POST /<service name>/signal/<signal>

Supported signals and their's meaning:

Signal Meaning
t TERM
k KILL
i INT
1 USR1
2 USR2
a ALARM
q QUIT
x EXIT
p PAUSE
c CONT
h HUP
o ONCE

Read logs

svlogd

You can read tail of service log using GET /<service name>/log/<count of tailing lines>.txt

Note that to use this feature You must do logging using

exec svlogd <options> $LOG_DIRECTORY_LOCATION

logger

Use logger like:

exec logger  -i -t "runit-man" -p local1.info

and use option -l "logger:/var/log/" where base logs directory shown after period.

Localization

Localization can be done by editing of ./i18n/*.yml locale files. Contributions are welcome.

Development

Runit-man provides a useful Vagrant file. To have a complete development environment:

Now you have an Ubuntu 12.04 system with runit and runit-man running inside your Vagrant box

Links

Something went wrong with that request. Please try again.