Skip to content

Fixing some buggy data handling, add some logging#17

Open
cswingler wants to merge 4 commits into
chrisboulton:masterfrom
cswingler:master
Open

Fixing some buggy data handling, add some logging#17
cswingler wants to merge 4 commits into
chrisboulton:masterfrom
cswingler:master

Conversation

@cswingler

Copy link
Copy Markdown
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

winmutt commented Mar 14, 2017

Copy link
Copy Markdown

Would love to see this merged.

@chrisboulton

Copy link
Copy Markdown
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
Copy Markdown
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