From 97157c93a71aa4291a9158f635f8b29081b775f6 Mon Sep 17 00:00:00 2001 From: "a.ledizes" Date: Thu, 18 Nov 2021 10:35:25 +0100 Subject: [PATCH 1/3] add more galera useful metric for mysql --- mysql/datadog_checks/mysql/const.py | 3 +++ mysql/metadata.csv | 3 +++ 2 files changed, 6 insertions(+) diff --git a/mysql/datadog_checks/mysql/const.py b/mysql/datadog_checks/mysql/const.py index 079cb405532b1..53f2f9af8dd00 100644 --- a/mysql/datadog_checks/mysql/const.py +++ b/mysql/datadog_checks/mysql/const.py @@ -235,6 +235,9 @@ 'wsrep_flow_control_sent': ('mysql.galera.wsrep_flow_control_sent', MONOTONIC), 'wsrep_cert_deps_distance': ('mysql.galera.wsrep_cert_deps_distance', GAUGE), 'wsrep_local_send_queue_avg': ('mysql.galera.wsrep_local_send_queue_avg', GAUGE), + 'wsrep_replicated_bytes': ('mysql.galera.wsrep_replicated_bytes', GAUGE), + 'wsrep_received_bytes': ('mysql.galera.wsrep_received_bytes', GAUGE), + 'wsrep_local_state_comment': ('mysql.galera.wsrep_local_state_comment', GAUGE), } PERFORMANCE_VARS = { diff --git a/mysql/metadata.csv b/mysql/metadata.csv index 596763cf121f7..f8e3243b20d09 100644 --- a/mysql/metadata.csv +++ b/mysql/metadata.csv @@ -192,6 +192,9 @@ mysql.galera.wsrep_flow_control_recv,count,,,,"Shows the number of times the gal mysql.galera.wsrep_flow_control_sent,count,,,,"Shows the number of times the galera node has sent a pausing Flow Control message to others",0,mysql,mysql galera wsrep_flow_control_sent mysql.galera.wsrep_cert_deps_distance,gauge,,,,"Shows the average distance between the lowest and highest sequence number, or seqno, values that the node can possibly apply in parallel.",0,mysql,mysql galera wsrep_cert_deps_distance mysql.galera.wsrep_local_send_queue_avg,gauge,,,,"Show an average for the send queue length since the last FLUSH STATUS query.",0,mysql,mysql galera wsrep_local_send_queue_avg +mysql.galera.wsrep_replicated_bytes,gauge,,,,"Total size (in bytes) of writesets sent to other nodes.",0,mysql,mysql galera wsrep_replicated_bytes +mysql.galera.wsrep_received_bytes,gauge,,,,"Total size (in bytes) of writesets received from other nodes.",0,mysql,mysql galera wsrep_received_bytes +mysql.galera.wsrep_local_state_comment,gauge,,,,"Comment of the node’s state.",0,mysql,mysql galera wsrep_local_state_comment mysql.performance.qcache.utilization,gauge,,fraction,,Fraction of the query cache memory currently being used.,0,mysql,mysql performance qcache utilization mysql.performance.digest_95th_percentile.avg_us,gauge,,microsecond,,Query response time 95th percentile per schema.,0,mysql,mysql response time 95th mysql.performance.query_run_time.avg,gauge,,microsecond,,Avg query response time per schema.,0,mysql,mysql response time avg From 66fe3568b888a527d10e68a8f787247d3fdeb639 Mon Sep 17 00:00:00 2001 From: "a.ledizes" Date: Mon, 22 Nov 2021 15:41:51 +0100 Subject: [PATCH 2/3] add wresp_received, wresp_local_state and wresp_local_cert_failures --- mysql/datadog_checks/mysql/const.py | 4 +++- mysql/metadata.csv | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/mysql/datadog_checks/mysql/const.py b/mysql/datadog_checks/mysql/const.py index 53f2f9af8dd00..6c205ced7e808 100644 --- a/mysql/datadog_checks/mysql/const.py +++ b/mysql/datadog_checks/mysql/const.py @@ -237,7 +237,9 @@ 'wsrep_local_send_queue_avg': ('mysql.galera.wsrep_local_send_queue_avg', GAUGE), 'wsrep_replicated_bytes': ('mysql.galera.wsrep_replicated_bytes', GAUGE), 'wsrep_received_bytes': ('mysql.galera.wsrep_received_bytes', GAUGE), - 'wsrep_local_state_comment': ('mysql.galera.wsrep_local_state_comment', GAUGE), + 'wsrep_received': ('mysql.galera.wsrep_received', GAUGE), + 'wsrep_local_state': ('mysql.galera.wsrep_local_state', GAUGE), + 'wsrep_local_cert_failures': ('mysql.galera.wsrep_local_cert_failures', GAUGE), } PERFORMANCE_VARS = { diff --git a/mysql/metadata.csv b/mysql/metadata.csv index f8e3243b20d09..7ea82ce83a230 100644 --- a/mysql/metadata.csv +++ b/mysql/metadata.csv @@ -194,7 +194,9 @@ mysql.galera.wsrep_cert_deps_distance,gauge,,,,"Shows the average distance betwe mysql.galera.wsrep_local_send_queue_avg,gauge,,,,"Show an average for the send queue length since the last FLUSH STATUS query.",0,mysql,mysql galera wsrep_local_send_queue_avg mysql.galera.wsrep_replicated_bytes,gauge,,,,"Total size (in bytes) of writesets sent to other nodes.",0,mysql,mysql galera wsrep_replicated_bytes mysql.galera.wsrep_received_bytes,gauge,,,,"Total size (in bytes) of writesets received from other nodes.",0,mysql,mysql galera wsrep_received_bytes -mysql.galera.wsrep_local_state_comment,gauge,,,,"Comment of the node’s state.",0,mysql,mysql galera wsrep_local_state_comment +mysql.galera.wsrep_received,gauge,,,,"Total number of write-sets received from other nodes.",0,mysql,mysql galera wsrep_received +mysql.galera.wsrep_local_state,gauge,,,,"Internal Galera cluster state number",0,mysql,mysql galera wsrep_local_state +mysql.galera.wsrep_local_cert_failures,gauge,,,,"Total number of local transactions that failed certification test.",0,mysql,mysql galera wsrep_local_cert_failures mysql.performance.qcache.utilization,gauge,,fraction,,Fraction of the query cache memory currently being used.,0,mysql,mysql performance qcache utilization mysql.performance.digest_95th_percentile.avg_us,gauge,,microsecond,,Query response time 95th percentile per schema.,0,mysql,mysql response time 95th mysql.performance.query_run_time.avg,gauge,,microsecond,,Avg query response time per schema.,0,mysql,mysql response time avg From 9adb0ce2252a998eb238464239ff76e54fa6604a Mon Sep 17 00:00:00 2001 From: "a.ledizes" Date: Mon, 6 Dec 2021 12:20:03 +0100 Subject: [PATCH 3/3] set wsrep_local_cert_failures as MONOTONIC --- mysql/datadog_checks/mysql/const.py | 2 +- mysql/metadata.csv | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mysql/datadog_checks/mysql/const.py b/mysql/datadog_checks/mysql/const.py index 6c205ced7e808..183d1f9033e75 100644 --- a/mysql/datadog_checks/mysql/const.py +++ b/mysql/datadog_checks/mysql/const.py @@ -239,7 +239,7 @@ 'wsrep_received_bytes': ('mysql.galera.wsrep_received_bytes', GAUGE), 'wsrep_received': ('mysql.galera.wsrep_received', GAUGE), 'wsrep_local_state': ('mysql.galera.wsrep_local_state', GAUGE), - 'wsrep_local_cert_failures': ('mysql.galera.wsrep_local_cert_failures', GAUGE), + 'wsrep_local_cert_failures': ('mysql.galera.wsrep_local_cert_failures', MONOTONIC), } PERFORMANCE_VARS = { diff --git a/mysql/metadata.csv b/mysql/metadata.csv index 7ea82ce83a230..4e3f653cbb13e 100644 --- a/mysql/metadata.csv +++ b/mysql/metadata.csv @@ -196,7 +196,7 @@ mysql.galera.wsrep_replicated_bytes,gauge,,,,"Total size (in bytes) of writesets mysql.galera.wsrep_received_bytes,gauge,,,,"Total size (in bytes) of writesets received from other nodes.",0,mysql,mysql galera wsrep_received_bytes mysql.galera.wsrep_received,gauge,,,,"Total number of write-sets received from other nodes.",0,mysql,mysql galera wsrep_received mysql.galera.wsrep_local_state,gauge,,,,"Internal Galera cluster state number",0,mysql,mysql galera wsrep_local_state -mysql.galera.wsrep_local_cert_failures,gauge,,,,"Total number of local transactions that failed certification test.",0,mysql,mysql galera wsrep_local_cert_failures +mysql.galera.wsrep_local_cert_failures,count,,,,"Total number of local transactions that failed certification test.",0,mysql,mysql galera wsrep_local_cert_failures mysql.performance.qcache.utilization,gauge,,fraction,,Fraction of the query cache memory currently being used.,0,mysql,mysql performance qcache utilization mysql.performance.digest_95th_percentile.avg_us,gauge,,microsecond,,Query response time 95th percentile per schema.,0,mysql,mysql response time 95th mysql.performance.query_run_time.avg,gauge,,microsecond,,Avg query response time per schema.,0,mysql,mysql response time avg