-
Notifications
You must be signed in to change notification settings - Fork 812
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
Adding more MySQL metrics #726
Conversation
Thanks @skingry ! |
I think there is, 5.5. On Fri, Jan 10, 2014 at 5:34 PM, Remi Hakim notifications@github.comwrote:
|
'Created_tmp_files': ('mysql.performance.created_tmp_files', RATE), | ||
'Innodb_row_lock_waits': ('mysql.innodb.row_lock_waits', RATE), | ||
'Innodb_row_lock_time': ('mysql.innodb.row_lock_time', RATE), | ||
'Innodb_current_row_locks': ('mysql.innodb.current_row_locks', RATE), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't that metric be a gauge instead ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW adding my 2 cents.
If you intend to add metrics like Com_select, Com_insert, Com_update and
Com_delete, you are only covering several of the primary operations of
SELECT and DML.
Technically you need to include com_insert_select, com_update_multi,
com_delete_multi, com_replace and com_replace_select.
Honestly, the correct way to calculate properly:
SELECT com_select + qcache_hits
INSERT com_insert + com_insert_select
UPDATE com_update + com_update_multi
DELETE com_delete + com_delete_multi
REPLACE com_replace + com_replace_select
On Tue, Jan 21, 2014 at 7:25 PM, Remi Hakim notifications@github.comwrote:
In checks.d/mysql.py:
'Slow_queries': ('mysql.performance.slow_queries', RATE), 'Questions': ('mysql.performance.questions', RATE), 'Queries': ('mysql.performance.queries', RATE),
- 'Com_select': ('mysql.performance.com_select', RATE),
- 'Com_insert': ('mysql.performance.com_insert', RATE),
- 'Com_update': ('mysql.performance.com_update', RATE),
- 'Com_delete': ('mysql.performance.com_delete', RATE),
- 'Innodb_mutex_spin_waits': ('mysql.innodb.mutex_spin_waits', RATE),
- 'Innodb_mutex_spin_rounds': ('mysql.innodb.mutex_spin_rounds', RATE),
- 'Innodb_mutex_os_waits': ('mysql.innodb.mutex_os_waits', RATE),
- 'Created_tmp_tables': ('mysql.performance.created_tmp_tables', RATE),
- 'Created_tmp_disk_tables': ('mysql.performance.created_tmp_disk_tables', RATE),
- 'Created_tmp_files': ('mysql.performance.created_tmp_files', RATE),
- 'Innodb_row_lock_waits': ('mysql.innodb.row_lock_waits', RATE),
- 'Innodb_row_lock_time': ('mysql.innodb.row_lock_time', RATE),
- 'Innodb_current_row_locks': ('mysql.innodb.current_row_locks', RATE),
Shouldn't that metric be a gauge instead ?
—
Reply to this email directly or view it on GitHubhttps://github.com//pull/726/files#r9061026
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the input @ronaldbradford !
@skingry we should probably add the fields @ronaldbradford is talking about separately.
What do you think ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the late reply, all of that sounds good, and yes it looks like
'innodb_current_row_locks' should be a gauge and not a counter
On Thu, Jan 23, 2014 at 4:22 PM, Remi Hakim notifications@github.comwrote:
In checks.d/mysql.py:
'Slow_queries': ('mysql.performance.slow_queries', RATE), 'Questions': ('mysql.performance.questions', RATE), 'Queries': ('mysql.performance.queries', RATE),
- 'Com_select': ('mysql.performance.com_select', RATE),
- 'Com_insert': ('mysql.performance.com_insert', RATE),
- 'Com_update': ('mysql.performance.com_update', RATE),
- 'Com_delete': ('mysql.performance.com_delete', RATE),
- 'Innodb_mutex_spin_waits': ('mysql.innodb.mutex_spin_waits', RATE),
- 'Innodb_mutex_spin_rounds': ('mysql.innodb.mutex_spin_rounds', RATE),
- 'Innodb_mutex_os_waits': ('mysql.innodb.mutex_os_waits', RATE),
- 'Created_tmp_tables': ('mysql.performance.created_tmp_tables', RATE),
- 'Created_tmp_disk_tables': ('mysql.performance.created_tmp_disk_tables', RATE),
- 'Created_tmp_files': ('mysql.performance.created_tmp_files', RATE),
- 'Innodb_row_lock_waits': ('mysql.innodb.row_lock_waits', RATE),
- 'Innodb_row_lock_time': ('mysql.innodb.row_lock_time', RATE),
- 'Innodb_current_row_locks': ('mysql.innodb.current_row_locks', RATE),
Thanks for the input @ronaldbradford https://github.com/ronaldbradford !
@skingry https://github.com/skingry we should probably add the fields
@ronaldbradford https://github.com/ronaldbradford is talking about
separately.What do you think ?
—
Reply to this email directly or view it on GitHubhttps://github.com//pull/726/files#r9130361
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...actually on what @ronaldbradford had added, I personally would against
doing the calculations in the check... the metrics themselves should be
measured as unadulterated as possible, and then any calculations should be
performed at the presentation layer (ie. graphing)
On Thu, Jan 23, 2014 at 5:06 PM, Seth Kingry sjkingry@gmail.com wrote:
Sorry for the late reply, all of that sounds good, and yes it looks like
'innodb_current_row_locks' should be a gauge and not a counterOn Thu, Jan 23, 2014 at 4:22 PM, Remi Hakim notifications@github.comwrote:
In checks.d/mysql.py:
'Slow_queries': ('mysql.performance.slow_queries', RATE), 'Questions': ('mysql.performance.questions', RATE), 'Queries': ('mysql.performance.queries', RATE),
- 'Com_select': ('mysql.performance.com_select', RATE),
- 'Com_insert': ('mysql.performance.com_insert', RATE),
- 'Com_update': ('mysql.performance.com_update', RATE),
- 'Com_delete': ('mysql.performance.com_delete', RATE),
- 'Innodb_mutex_spin_waits': ('mysql.innodb.mutex_spin_waits', RATE),
- 'Innodb_mutex_spin_rounds': ('mysql.innodb.mutex_spin_rounds', RATE),
- 'Innodb_mutex_os_waits': ('mysql.innodb.mutex_os_waits', RATE),
- 'Created_tmp_tables': ('mysql.performance.created_tmp_tables', RATE),
- 'Created_tmp_disk_tables': ('mysql.performance.created_tmp_disk_tables', RATE),
- 'Created_tmp_files': ('mysql.performance.created_tmp_files', RATE),
- 'Innodb_row_lock_waits': ('mysql.innodb.row_lock_waits', RATE),
- 'Innodb_row_lock_time': ('mysql.innodb.row_lock_time', RATE),
- 'Innodb_current_row_locks': ('mysql.innodb.current_row_locks', RATE),
Thanks for the input @ronaldbradford https://github.com/ronaldbradford!
@skingry https://github.com/skingry we should probably add the fields
@ronaldbradford https://github.com/ronaldbradford is talking about
separately.What do you think ?
—
Reply to this email directly or view it on GitHubhttps://github.com//pull/726/files#r9130361
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep agree with that, it should be collected separately.
Could you add them in your PR please ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added!
Thanks @skingry Can you just tell me what you think about the question I asked about Innodb_current_row_locks ? Other than that it looks good and I'm going to merge it soon. |
…sert, update, delete
Thanks! |
Note that the 'created_tmp_*' status vars are all counters in MySQL... so the corresponding type should be RATE and not GAUGE.