Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Match version 4 or 5 in passenger-status output. #28

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Match version 4 or 5 in passenger-status output. #28

wants to merge 1 commit into from

Conversation

bradland
Copy link

@bradland bradland commented Nov 2, 2015

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant