aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/plugin/mysql.php
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--plugin/mysql.php47
1 files changed, 47 insertions, 0 deletions
diff --git a/plugin/mysql.php b/plugin/mysql.php
index aac9e88..acab7ac 100644
--- a/plugin/mysql.php
+++ b/plugin/mysql.php
@@ -13,11 +13,35 @@ $obj->rrd_format = '%5.1lf%s';
13 13
14switch($obj->args['type']) 14switch($obj->args['type'])
15{ 15{
16 case 'cache_result':
17 $obj->ds_names = array(
18 'qcache-not_cached' => 'Not Cached',
19 'qcache-inserts' => 'Inserts',
20 'qcache-hits' => 'Hits',
21 'qcache-prunes' => 'Lowmem Prunes',
22 );
23 $obj->colors = array(
24 'qcache-not_cached' => 'f0a000',
25 'qcache-inserts' => '0000ff',
26 'qcache-hits' => '00e000',
27 'qcache-prunes' => 'ff0000',
28 );
29 $obj->rrd_title = sprintf('MySQL query cache (%s)', $obj->args['pinstance']);
30 $obj->rrd_vertical = 'Queries/s';
31 break;
32 case 'cache_size':
33 $obj->ds_names = array(
34 'qcache' => 'Queries',
35 );
36 $obj->rrd_title = sprintf('MySQL query cache size (%s)', $obj->args['pinstance']);
37 $obj->rrd_vertical = 'Queries in cache';
38 break;
16 case 'mysql_commands': 39 case 'mysql_commands':
17 $obj->rrd_title = sprintf('MySQL commands (%s)', $obj->args['pinstance']); 40 $obj->rrd_title = sprintf('MySQL commands (%s)', $obj->args['pinstance']);
18 $obj->rrd_vertical = 'Issues/s'; 41 $obj->rrd_vertical = 'Issues/s';
19 break; 42 break;
20 case 'mysql_handler': 43 case 'mysql_handler':
44 $obj->order = array('commit', 'delete', 'read_first', 'read_key', 'read_next', 'read_prev', 'read_rnd', 'read_rnd_next', 'update', 'write', 'rollback');
21 $obj->colors = array( 45 $obj->colors = array(
22 'commit' => 'ff0000', 46 'commit' => 'ff0000',
23 'delete' => 'ff00e7', 47 'delete' => 'ff00e7',
@@ -55,6 +79,28 @@ switch($obj->args['type'])
55 $obj->rrd_title = sprintf('MySQL traffic (%s)', $obj->args['pinstance']); 79 $obj->rrd_title = sprintf('MySQL traffic (%s)', $obj->args['pinstance']);
56 $obj->rrd_vertical = 'Bits per second'; 80 $obj->rrd_vertical = 'Bits per second';
57 break; 81 break;
82 case 'threads':
83 $obj->ds_names = array(
84 'cached' => 'Cached',
85 'connected' => 'Connected',
86 'running' => 'Running',
87 );
88 $obj->colors = array(
89 'cached' => '00e000',
90 'connected' => '0000ff',
91 'running' => 'ff0000',
92 );
93 $obj->rrd_title = sprintf('MySQL threads (%s)', $obj->args['pinstance']);
94 $obj->rrd_vertical = 'Threads';
95 break;
96 case 'total_threads':
97 $obj->ds_names = array(
98 'created' => 'Created',
99 );
100 $obj->rrd_title = sprintf('MySQL created threads (%s)', $obj->args['pinstance']);
101 $obj->rrd_vertical = 'Created Threads';
102 break;
103 # mysql_qcache is removed since commit collectd-4.10.0-104-g9ae3541
58 case 'mysql_qcache': 104 case 'mysql_qcache':
59 $obj->data_sources = array('not_cached', 'inserts', 'hits', 'lowmem_prunes', 'queries_in_cache'); 105 $obj->data_sources = array('not_cached', 'inserts', 'hits', 'lowmem_prunes', 'queries_in_cache');
60 $obj->ds_names = array( 106 $obj->ds_names = array(
@@ -74,6 +120,7 @@ switch($obj->args['type'])
74 $obj->rrd_title = sprintf('MySQL query cache (%s)', $obj->args['pinstance']); 120 $obj->rrd_title = sprintf('MySQL query cache (%s)', $obj->args['pinstance']);
75 $obj->rrd_vertical = 'Queries/s'; 121 $obj->rrd_vertical = 'Queries/s';
76 break; 122 break;
123 # mysql_threads is removed since commit collectd-4.10.0-105-g6c48fca
77 case 'mysql_threads': 124 case 'mysql_threads':
78 $obj->data_sources = array('cached', 'connected', 'running', 'created'); 125 $obj->data_sources = array('cached', 'connected', 'running', 'created');
79 $obj->ds_names = array( 126 $obj->ds_names = array(