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.com>wrote:

> 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 GitHub<https://github.com/DataDog/dd-agent/pull/726/files#r9061026>
> .
>