cloudartisan/sd-passenger — pull request #4 by jshafton (2014-03-31 21:21:35+00:00)
Title: Update to support Passenger 4.0 changes to status output

I can't tell when they actually changed the output, but this commit uses the output in 4.0.10 and above. Because the output has changed so dramatically, we had to change some of the metrics being monitored.

We also added an `available_pool_size` metric so we could see how close we were to running out of the request pool. We calculate this by adding up the number of sessions being reported by the Passenger processes and then subtracting that number from the maximum pool size.

Finally, we threw `sudo` in the command calls because our configurations (and most, I'm guessing) require that configuration; feel free to edit that out for a less strict environment.