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

Added reverse_check_levels function #5

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

Conversation

sgargel
Copy link

@sgargel sgargel commented Mar 22, 2017

Adding reverse_check_levels function to be used when CRITICAL value should be lower than WARNING value

@agustin013
Copy link

./jboss7.py -H 10.xxx.xxx.xx -A datasource -P 9990 -u user -p password -d dsname -s ActiveCount -W 15 -C 30
CRITICAL - DataSource ActiveCount 2

My problem is the following of the ActiveCount value is correct, but I get the critical output message when I actually return an OK, any idea?

@sgargel
Copy link
Author

sgargel commented Apr 5, 2017

I can't reproduce your issue. It works as expected:

check_jbossas7.py -H 127.0.0.1 -A datasource -P 9990 -u user -p password -d myDS -s ActiveCount -W 15 -C 30
OK - DataSource ActiveCount 0

@agustin013
Copy link

agustin013 commented Apr 5, 2017

Ok, change the warning by 0 to see if the output changes to Warning your ActiveCount is set to 0 right now
check_jbossas7.py -H 127.0.0.1 -A datasource -P 9990 -u user -p password -d myDS -s ActiveCount -W 0 -C 5

I should show you a warning

@sgargel
Copy link
Author

sgargel commented Apr 5, 2017

I'm pretty sure your problem is not from this pull requests. Can you check your issue with master?
By the way doing some other test:

$ python check_jbossas7.py -H localhost -A datasource -P 9990 -u deploy -p password -d myDS -s ActiveCount -W 0 -C 15
WARNING - DataSource ActiveCount 0

Works as expected. Check is not well working only using strange values:

$ python check_jbossas7.py -H localhost -A datasource -P 9990 -u deploy -p password -d myDS -s ActiveCount -W 0 -C 0
WARNING - DataSource ActiveCount 0
$ python check_jbossas7.py -H localhost -A datasource -P 9990 -u deploy -p password -d myDS -s ActiveCount -W 1 -C 0
OK - DataSource ActiveCount 0

@agustin013
Copy link

My version is the same as the master, I just cloned with command git clone, the same problem looking at the code I do not see the error when it enters check_levels def.
You can attach your check_jbossas7.py?

@sgargel
Copy link
Author

sgargel commented Apr 5, 2017

My version is the same as the master, I just cloned with command git clone

.. so your problem is not related to this Pull Request. I think you have to open a new Issue for that.
If you want try my version just clone my fork ;-)

@agustin013
Copy link

fix the problem by touching the code, thanks

@sgargel
Copy link
Author

sgargel commented Apr 6, 2017

Happy you have solved your problem. Appreciated if you will push a new PullRequest :-)

@agustin013
Copy link

Thanks, already create a pull request

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.

2 participants