From: Marek Becka Date: Sat, 9 Aug 2014 18:46:03 +0000 (+0200) Subject: add more innodb metrics X-Git-Tag: collectd-5.5.0~134^2~1 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=458c6d8f21ce284f23783c80f86cdbd792275497;p=collectd.git add more innodb metrics --- diff --git a/src/mysql.c b/src/mysql.c index 7d5eddd1..edff4ad8 100644 --- a/src/mysql.c +++ b/src/mysql.c @@ -707,6 +707,10 @@ static int mysql_read (user_data_t *ud) counter_submit ("mysql_bpool_counters", "reads", val, db); else if (strcmp (key, "Innodb_buffer_pool_write_requests") == 0) counter_submit ("mysql_bpool_counters", "write_requests", val, db); + else if (strcmp (key, "Innodb_buffer_pool_bytes_data") == 0) + counter_submit ("mysql_bpool_bytes", "data", val, db); + else if (strcmp (key, "Innodb_buffer_pool_bytes_dirty") == 0) + counter_submit ("mysql_bpool_bytes", "dirty", val, db); /* data */ if (strcmp (key, "Innodb_data_fsyncs") == 0) @@ -726,6 +730,32 @@ static int mysql_read (user_data_t *ud) else if (strcmp (key, "Innodb_dblwr_pages_written") == 0) counter_submit ("mysql_innodb_dblwr", "written", val, db); + /* log */ + else if (strcmp (key, "Innodb_log_waits") == 0) + counter_submit ("mysql_innodb_log", "waits", val, db); + else if (strcmp (key, "Innodb_log_write_requests") == 0) + counter_submit ("mysql_innodb_log", "write_requests", val, db); + else if (strcmp (key, "Innodb_log_writes") == 0) + counter_submit ("mysql_innodb_log", "writes", val, db); + else if (strcmp (key, "Innodb_os_log_fsyncs") == 0) + counter_submit ("mysql_innodb_log", "fsyncs", val, db); + else if (strcmp (key, "Innodb_os_log_written") == 0) + counter_submit ("mysql_innodb_log", "written", val, db); + + /* pages */ + else if (strcmp (key, "Innodb_pages_created") == 0) + counter_submit ("mysql_innodb_pages", "created", val, db); + else if (strcmp (key, "Innodb_pages_read") == 0) + counter_submit ("mysql_innodb_pages", "read", val, db); + else if (strcmp (key, "Innodb_pages_written") == 0) + counter_submit ("mysql_innodb_pages", "written", val, db); + + /* row lock */ + else if (strcmp (key, "Innodb_row_lock_time") == 0) + counter_submit ("mysql_innodb_row_lock", "time", val, db); + else if (strcmp (key, "Innodb_row_lock_waits") == 0) + counter_submit ("mysql_innodb_row_lock", "waits", val, db); + /* rows */ else if (strcmp (key, "Innodb_rows_deleted") == 0) counter_submit ("mysql_innodb_rows", "deleted", val, db); diff --git a/src/types.db b/src/types.db index fcdea23b..d9b182f4 100644 --- a/src/types.db +++ b/src/types.db @@ -107,9 +107,13 @@ mysql_locks value:DERIVE:0:U mysql_log_position value:DERIVE:0:U mysql_octets rx:DERIVE:0:U, tx:DERIVE:0:U mysql_bpool_pages value:GAUGE:0:U +mysql_bpool_bytes value:GAUGE:0:U mysql_bpool_counters value:DERIVE:0:U mysql_innodb_data value:DERIVE:0:U mysql_innodb_dblwr value:DERIVE:0:U +mysql_innodb_log value:DERIVE:0:U +mysql_innodb_pages value:DERIVE:0:U +mysql_innodb_row_lock value:DERIVE:0:U mysql_innodb_rows value:DERIVE:0:U mysql_select value:DERIVE:0:U mysql_sort value:DERIVE:0:U