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

Fixing some buggy data handling, add some logging #17

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

cswingler
Copy link
Contributor

I'm fixing a few things in this plugin:

  1. Wrapping a bunch of the SHOW ENGINE INNODB STATUS; parsing code in try/except blocks. This change is a little on the blind side - we were seeing the plugin get unloaded with this in the collectd logs:
    [2016-12-19 10:33:41] mysql plugin: Sending value: response_time_count/13=0
    [2016-12-19 10:33:41] Unhandled python exception in read callback: ValueError: invalid literal for int() with base 10: 'ROLLING'
    [2016-12-19 10:33:41] read-function of plugin `python.mysql' failed. Will suspend it for 60.000 seconds.
    

The output from SHOW ENGINE INNODB STATUS; is a bit unpredictable and difficult to parse, so I'm making the assumption that defensive coding here is the way to go.
2. not 0 == True, so not value will drop any values that are 0 on the floor. Check that value is not 0 before doing that return.
3. Add a little more useful verbose logging.

@winmutt
Copy link

winmutt commented Mar 14, 2017

Would love to see this merged.

@chrisboulton
Copy link
Owner

@cswingler: would you mind addressing the conflicts in this and we'll get it down? If you don't have the time, I can take a stab.

@cswingler
Copy link
Contributor Author

finally got around to doing this :)

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.

3 participants