Phusion Passenger has 'passenger-status', shows passenger's process status and other information. But, for continuous monitoring, we want to monitor passenger's status over network.
Apache httpd has 'mod_status'. Now, I wrote Rack middleware 'PassengerMonitor'. It returns passenger's process status with mod_status-like format.
Caution: This works with Passenger-3.x only.
How To Use
- Clone git repository above, or download 'passenger-monitor.rb', and place with your rack application.
- Insert codes below into config.ru (or app.rb for Sinatra project).
require 'passenger-monitor' # or use 'require_relative' for ruby 1.9 without custom $LOAD_PATH use PassengerMonitor, :path => '/___server-status', :allow => ['127.0.0.1', '10.0.0.0/8', '192.168.10.0/24']
- path: PassengerMonitor uses specified path as entry point. You MUST specify not to overwrite your application's path.
- allow: Source IP/Network list you allow to access PassengerMonitor status information.
- Change user Passenger works.
- You must specify owner user of file 'passenger-status-password.txt'.
Busy Processes (Active): 1 Idle Processes: 0 Total Processes (Count): 1 Max Processes: 6 Global Queue Size: 0
'passenger-status' doesn't have 'Idle Process' information. I add this field as (count - active).
What I think to do next...
- Memory status
- Phusion Passenger 3.0 provides memory status, so we can add features to show memory status information. But, usually, we are monitoring memory status per host, not per application server process. How many people wants continuous memory status monitoring of processes over http?
- Passenger's UID
- I think that 'PassengerDefaultUser root' is not good configuration. For this problem, we shoud write patches for passenger. Hmm...