Skip to content

Error in Rhel 7 Ruby 2.0 #7

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

Closed
brvolpini opened this issue Jun 16, 2016 · 5 comments
Closed

Error in Rhel 7 Ruby 2.0 #7

brvolpini opened this issue Jun 16, 2016 · 5 comments

Comments

@brvolpini
Copy link

brvolpini commented Jun 16, 2016

Hi,
I have an issue executing the script on the nagios server. That´s what i do:

/usr/lib64/nagios/plugins/check_haproxy.rb -u http://xxx.xxx.xxx.xxx:port
And the output is:

/usr/lib64/nagios/plugins/check_haproxy.rb:162:in /': divided by 0 (ZeroDivisionError) from /usr/lib64/nagios/plugins/check_haproxy.rb:162:inblock in

'
from /usr/lib64/nagios/plugins/check_haproxy.rb:98:in each' from /usr/lib64/nagios/plugins/check_haproxy.rb:98:in'

Greetings.

pulecp pushed a commit to pulecp/nagios-checks that referenced this issue Aug 25, 2016
Do not calculate statistics when there is no session so far. Return zero
instead of that.

Signed-off-by: Pavel Pulec <[email protected]>
@pulecp
Copy link

pulecp commented Aug 25, 2016

You can try my fix.

The issue is that this plugin tries to calculate session statistics even when there was no session in total so far.

pulecp pushed a commit to pulecp/nagios-checks that referenced this issue Aug 25, 2016
Do not calculate statistics when there is no session so far. Return zero
instead of that.

Signed-off-by: Pavel Pulec <[email protected]>
@pulecp
Copy link

pulecp commented Aug 25, 2016

one more condition

@benprew
Copy link
Owner

benprew commented Aug 31, 2016

@pulecp This is great, thanks for contributing to this project! I had a few comments on your pull request, get them fixed up and I'll merge it. Thanks again for your help, I really appreciate it!

benprew added a commit that referenced this issue Jan 5, 2017
@benprew
Copy link
Owner

benprew commented Jan 5, 2017

#8 fixes this issue.

@benprew
Copy link
Owner

benprew commented Jan 5, 2017

@pulecp Thanks again for your changes, I've finally had a chance to review and merge them.

@benprew benprew closed this as completed Jan 5, 2017
@benprew benprew mentioned this issue Jan 5, 2017
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

3 participants