Monitor a group of processes with mon
Shell JavaScript
Latest commit 06a9df6 Jan 22, 2014 @jgallen23 Release 0.4.1
Failed to load latest commit information.
bin Merge pull request #13 from adam12/bug/check_directories_are_writable Jan 21, 2014
example added TEST=1 to example to verify that it will pass through Feb 7, 2013
.gitignore renamed to monapp Apr 30, 2012 Release 0.4.1 Jan 21, 2014
Makefile makefile May 1, 2012


mongroup is a wrapper for mon. It allows you to create easily monitor a group of processes.


make install


(mkdir /tmp/mongroup && cd /tmp/mongroup && curl -L# | tar zx --strip 1 && make install)


Usage: mongroup [options] [command]


    -c, --config <path>  set config path. defaults to ./mongroup.conf
    -V, --version        output program version
    -h, --help           output help information


    start [app]          start [app] or all apps
    restart [app]        restart [app] or all apps
    stop [app]           stops [app] or all apps
    status               shows the status of all running apps
    log [app]            tail the [app]'s log or all apps
    logf [app]           tail -f the [app]'s log or all apps
    update               update mongroup to the latest version

Config File

A config file lets you define what process you want to run in your mongroup. It also lets you set the directories for where your pids and logs are stored. Here is an example config file:

    pids = /var/run/
    logs = /var/log/
    on-error = ./alert error
    on-restart = ./alert restart
    web = node server 8001
    web2 = node server 8002
    redis = redis-server

Failure Hooks

Mongroup leverages mon(1)'s --on-error <cmd> and --on-restart <cmd> flags to facilitate reporting and alerting. For example here's a simple non-useful node script outputting to stdio:

#!/usr/bin/env node




[ 'node',
  '58119' ]