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

undefined method zero?' for nil:NilClass while executing check-rabbitmq-queue-drain-time.rb #116

Open
infa-kparida opened this issue Mar 5, 2019 · 2 comments

Comments

@infa-kparida
Copy link

infa-kparida commented Mar 5, 2019

@majormoses Sometimes We are getting undefined method zero?' for nil:NilClass` while executing check-rabbitmq-queue-drain-time.rb check.Below is the complete error snippet

{"timestamp":"2019-03-04T00:51:07.881054+0000","level":"info","message":"publishing check result","payload":{"client":"sensu-redis-rmq-test","check":{"command":"/opt/sensu/embedded/bin/check-rabbitmq-queue-drain-time.rb","standalone":true,"handler":" ","contact":"","playbook":"","interval":60,"name":"checkRMQqueuedraintime","issued":1551660667,"executed":1551660667,"duration":0.205,"output":"Check failed to run: undefined method `zero?' for nil:NilClass, [\"/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-plugins-rabbitmq-6.0.0/bin/check-rabbitmq-queue-drain-time.rb:129:in `block in run'\", \"/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-plugins-rabbitmq-6.0.0/bin/check-rabbitmq-queue-drain-time.rb:127:in `each'\", \"/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-plugins-rabbitmq-6.0.0/bin/check-rabbitmq-queue-drain-time.rb:127:in `run'\", \"/opt/sensu/embedded/lib/ruby/gems/2.4.0/gems/sensu-plugin-2.7.0/lib/sensu-plugin/cli.rb:57:in `block in <class:CLI>'\"]\n","status":3}}

Environment Details:
sensu enterprise : 1.6.1
sensu-plugins-rabbitmq : 6.0.0
sensu-plugin: 2.7.0

@infa-kparida
Copy link
Author

@majormoses Any progress on this ?

@majormoses
Copy link
Member

No I have not had the time to look, I do not work for sensu and donate time to the community when I have it. If you need immediate support please reach out to [email protected] where they are bound by SLA for enterprise customers per your support plan.I may have some time over the weekend to start taking a look but no promises.

majormoses pushed a commit that referenced this issue Apr 4, 2019
perform nil check before checking if zero
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

No branches or pull requests

2 participants