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

Percona input plugin #1645

Closed
xert opened this issue Aug 17, 2016 · 7 comments
Closed

Percona input plugin #1645

xert opened this issue Aug 17, 2016 · 7 comments
Labels
area/mysql feature request Requests for new plugin and for new features to existing plugins
Milestone

Comments

@xert
Copy link
Contributor

xert commented Aug 17, 2016

Feature Request

Proposal:

I wish to add Percona user statistics https://www.percona.com/doc/percona-server/5.6/diagnostics/user_stats.html into the mysql input plugin.

I have a working patch for this. Should I add PR?

Current behavior:

Percona user statistics currently not implemented in the mysql plugin

Desired behavior:

Add Percona user statistics to mysql input plugin

Use case: [Why is this important (helps with prioritizing requests)]

Allows to monitor user, client, table and index usage (see the Percona documentation linked above)

@sparrc
Copy link
Contributor

sparrc commented Aug 19, 2016

@xert rather than overloading the mysql plugin, I would prefer if we had a separate percona input plugin, unless there is a significant efficiency to be gained from integrating it directly into the mysql plugin.

@xert
Copy link
Contributor Author

xert commented Aug 19, 2016

@sparrc That was my initial perspective too and it's still a possible option, of course.

I see this possible solutions:

  1. Make separate percona plugin, collecting just userstat metrics (disadvantage - the DSN must be configured twice, telegraf will make unnecessary additional connections to the server)
  2. Copy mysql as percona and add userstats to it (DSN needs to be configured just once, but this solution it's not good for maintenance)
  3. Extend mysql plugin capabilities (better then 2. for sure, but adds complexity to the plugin)
  4. Separate common functionality needed by both plugins to a shared piece of code (generic sql plugin?) and make plugins mysql and percona (maybe mariadb too - I am not sure if mariadb has some differences in performance / information schema)

I think that the best approach is 3. and then work on 4. Currently I see there are opportunities for improvement in the mysql plugin. For example the metric queries are defined as constants at the top of the file and are used later in functions. If You change the SQL it's not obvious which parts of code are affected by this change. I think it lead to missing column in #1647.

What do You think?

@sparrc
Copy link
Contributor

sparrc commented Aug 19, 2016

Personally I still prefer (1), because when we're talking about a MySQL database I don't think adding 1 more connection is much overhead. Although percona is obviously closely related to MySQL, it's definitely a separate product and I think it makes sense to collect percona-specific metrics only.

@xert
Copy link
Contributor Author

xert commented Aug 23, 2016

Ok, I'll try to make a new plugin collecting just percona specifics.

@jwilder jwilder added the feature request Requests for new plugin and for new features to existing plugins label Sep 1, 2016
@sparrc sparrc changed the title [Feature request] Percona user statistics in mysql input plugin Percona input plugin Sep 1, 2016
@akrus
Copy link

akrus commented Jun 7, 2017

Is there any update here?

@joelsdc
Copy link

joelsdc commented Feb 2, 2018

Hi @xert, can you share your current working patch please? I'd love to give it a try... :D

@danielnelson
Copy link
Contributor

Closed in #4306

@danielnelson danielnelson added this to the 1.7.1 milestone Jun 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/mysql feature request Requests for new plugin and for new features to existing plugins
Projects
None yet
Development

No branches or pull requests

6 participants