munin-plugins-rails icon indicating copy to clipboard operation
munin-plugins-rails copied to clipboard

Match version 4 or 5 in passenger-status output.

Open bradland opened this issue 9 years ago • 0 comments

This minor change allows the use of munin-plugins-rails with Passenger version 5. The output of passenger-status in v5 is otherwise compatible with the v4 regex matching.

Before change:

    $ munin-run munin_passenger_queue
    requests.value 
    $ munin-run munin_passenger_status 
    max.value 
    running.value 
    active.value 
    sessions.value 0

After change:

    $ munin-run munin_passenger_queue
    requests.value 0
    $ munin-run munin_passenger_status 
    max.value 6
    running.value 6
    active.value 0
    sessions.value 0

I used a character class for matching, but I'm wondering if this shouldn't be refactored to a capture group and a case block for better modularity. I may submit a separate pull request with an altered implementation.

bradland avatar Nov 02 '15 22:11 bradland