Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Passenger monitoring with Monit
branch: master
Failed to load latest commit information.
test Allow pid_dir and pid_file to be configured from PassengerMonit
.gitignore Add .gitignore and gemspec
MIT-LICENSE Initial commit Update readme, gemspec
Rakefile Remove obsolete rake/rdoctask
VERSION Version bump to 0.1.1
init.rb Initial commit
passenger_monit.gemspec Regenerate gemspec for version 0.1.1


This plugin provides means for monitoring Rails application which run under Passenger with Monit.

The pid file name (hardcoded) is /var/tmp/, where X denotes the instance number.


Add this line to your Gemfile:

gem 'passenger_monit', :group => :production

Example Monit configuration

check process instance1 with pidfile /var/tmp/
    group web
    start program = "/bin/true" with timeout 30 seconds
    stop program = "/bin/sh -c 'kill `cat /var/tmp/`'"
    if totalmem > 120.0 MB for 5 cycles then restart
    if changed pid 2 times within 2 cycles then alert
    if changed ppid 2 times within 2 cycles then alert

Bugs and missing features

  1. Only tested with nginx
  2. The pid file location is hardcoded
  3. Sometimes there are more passenger instances in the air than anticipated, so when one goes down, there might be first pid file missing, e.g.: from [,] to [,,] to [,] - monit will complain that the first instance is missing.

Copyright (c) 2011 Roman Shterenzon, released under the MIT license

Something went wrong with that request. Please try again.