Code

add more innodb metrics
authorMarek Becka <marek.becka@superhosting.cz>
Sat, 9 Aug 2014 18:46:03 +0000 (20:46 +0200)
committerMarek Becka <marek.becka@superhosting.cz>
Sat, 9 Aug 2014 18:46:03 +0000 (20:46 +0200)
src/mysql.c
src/types.db

index 7d5eddd17bce73fd85ff84420b27b159569cad43..edff4ad8769e0da338221e93dda0fd22133356fb 100644 (file)
@@ -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);
index fcdea23ba1c3096a6042b6154311e13e9051ba40..d9b182f4b74db5f5f373b2f3bc98be657d1d0a35 100644 (file)
@@ -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