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

check-rabbitmq-queue-drain-time.rb match virtualhost #74

Open
lbeucher opened this issue Sep 15, 2017 · 4 comments
Open

check-rabbitmq-queue-drain-time.rb match virtualhost #74

lbeucher opened this issue Sep 15, 2017 · 4 comments

Comments

@lbeucher
Copy link

We use this check with the option vhost.
We have two virtualHost (xxx and xxx-test).
The problems is this check queue in virtualhost xxx and xxx-test.
To correct the problem, i have replace:
return queues.select { |x| x['vhost'].match(config[:vhost]) }

By
return queues.select { |x| x['vhost']==config[:vhost] }.

Can you integrate this modification ?

@majormoses
Copy link
Member

I think that we could maybe add an option to do exact match rather than regex. Also you could pass a regex that would exclude the test one. I would be happy to accept a PR to do this.

@lbeucher
Copy link
Author

lbeucher commented Oct 6, 2017

Hum, i'm not an ruby's expert.

@majormoses
Copy link
Member

You can use --filter 'xxx$' to anchor your regex I believe.

@lbeucher
Copy link
Author

lbeucher commented Oct 9, 2017

The problems, we have two virtual host with same name of queue.
With the --filter option, the check return value for:
truc of xxx and truc of xxx-test

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

No branches or pull requests

3 participants