@cryptotaxi247 / netdata-1 / commits / 7e276ccbc

Add query types to mysql plugin (#4347)

This adds a graph which shows the queries by type (select, delete, update, insert, cache_hits, replace). Inspired by the graphs from Munin.

Sander Klein committed Oct 4, 2018 at 12:18 UTC 7e276ccbc7ab4dfc7c19e49bdaa4385d5cc77735
1 file changed +18 -1
python.d/mysql.chart.py
+18 -1
@@ -127,7 +127,12 @@ GLOBAL_STATS = [
127 'wsrep_replicated_bytes',
128 'wsrep_local_bf_aborts',
129 'wsrep_local_cert_failures',
130 - 'wsrep_flow_control_paused_ns'
130 + 'wsrep_flow_control_paused_ns',
131 + 'Com_delete',
132 + 'Com_insert',
133 + 'Com_select',
134 + 'Com_update',
135 + 'Com_replace'
136 ]
137
138
@@ -155,6 +160,7 @@ VARIABLES = [
160 ORDER = [
161 'net',
162 'queries',
163 + 'queries_type',
164 'handlers',
165 'table_locks',
166 'join_issues',
@@ -214,6 +220,17 @@ CHARTS = {
220 ['Slow_queries', 'slow_queries', 'incremental']
221 ]
222 },
223 + 'queries_type': {
224 + 'options': [None, 'mysql Query type', 'queries/s', 'query_types', 'mysql.queries_type', 'stacked'],
225 + 'lines': [
226 + ['Com_select', 'select', 'incremental'],
227 + ['Com_delete', 'delete', 'incremental'],
228 + ['Com_update', 'update', 'incremental'],
229 + ['Com_insert', 'insert', 'incremental'],
230 + ['Qcache_hits', 'cache_hits', 'incremental'],
231 + ['Com_replace', 'replace', 'incremental']
232 + ]
233 + },
234 'handlers': {
235 'options': [None, 'mysql Handlers', 'handlers/s', 'handlers', 'mysql.handlers', 'line'],
236 'lines': [