From 29bcf05fb844a7a76dca1f76fa22332e8dc04ade Mon Sep 17 00:00:00 2001 From: Keisuke Umegaki <41987730+keisku@users.noreply.github.com> Date: Fri, 6 Dec 2024 21:46:23 +0900 Subject: [PATCH] Add `mysql.performance.performance_schema_digest_lost` (#19121) * new metrics from Performance_schema_digest_lost * fix tests * add metric to metadata.csv * changelog * move to STATUS_VARS * fix test --- mysql/changelog.d/19121.added | 1 + mysql/datadog_checks/mysql/const.py | 2 ++ mysql/metadata.csv | 1 + mysql/tests/variables.py | 2 ++ 4 files changed, 6 insertions(+) create mode 100644 mysql/changelog.d/19121.added diff --git a/mysql/changelog.d/19121.added b/mysql/changelog.d/19121.added new file mode 100644 index 0000000000000..97990bdf0ca9b --- /dev/null +++ b/mysql/changelog.d/19121.added @@ -0,0 +1 @@ +Add `mysql.performance.performance_schema_digest_lost`, the number of digest instances that could not be instrumented in the `events_statements_summary_by_digest` table. diff --git a/mysql/datadog_checks/mysql/const.py b/mysql/datadog_checks/mysql/const.py index fc2cb7d1f2e48..d69dc33dae014 100644 --- a/mysql/datadog_checks/mysql/const.py +++ b/mysql/datadog_checks/mysql/const.py @@ -39,6 +39,8 @@ # Table Cache Metrics 'Open_files': ('mysql.performance.open_files', GAUGE), 'Open_tables': ('mysql.performance.open_tables', GAUGE), + # Performance schema metrics + 'Performance_schema_digest_lost': ('mysql.performance.performance_schema_digest_lost', GAUGE), # Network Metrics 'Bytes_sent': ('mysql.performance.bytes_sent', RATE), 'Bytes_received': ('mysql.performance.bytes_received', RATE), diff --git a/mysql/metadata.csv b/mysql/metadata.csv index 4737e971e22c2..027b8ce425e3a 100644 --- a/mysql/metadata.csv +++ b/mysql/metadata.csv @@ -170,6 +170,7 @@ mysql.performance.max_prepared_stmt_count,gauge,,,,The maximum allowed prepared mysql.performance.open_files,gauge,,file,,The number of open files.,0,mysql,open files, mysql.performance.open_tables,gauge,,table,,The number of of tables that are open.,0,mysql,open tables, mysql.performance.opened_tables,gauge,,table,second,"The number of tables that have been opened. If `opened_tables` is big, your `table_open_cache` value is probably too small.",0,mysql,mysql performance opened_tables, +mysql.performance.performance_schema_digest_lost,gauge,,,,The number of digest instances that could not be instrumented in the events_statements_summary_by_digest table. This can be nonzero if the value of performance_schema_digests_size is too small.,0,mysql,mysql performance performance schema digest lost, mysql.performance.prepared_stmt_count,gauge,,query,second,The current number of prepared statements.,0,mysql,current prepared statements, mysql.performance.qcache.utilization,gauge,,fraction,,Fraction of the query cache memory currently being used.,0,mysql,mysql performance qcache utilization, mysql.performance.qcache_free_blocks,gauge,,block,,The number of free memory blocks in the query cache.,0,mysql,mysql performance qcache_free_blocks, diff --git a/mysql/tests/variables.py b/mysql/tests/variables.py index 246616bc1c426..825c44307f76e 100644 --- a/mysql/tests/variables.py +++ b/mysql/tests/variables.py @@ -25,6 +25,8 @@ # Table Cache Metrics 'mysql.performance.open_files', 'mysql.performance.open_tables', + # Performance schema metrics + 'mysql.performance.performance_schema_digest_lost', # Network Metrics 'mysql.performance.bytes_sent', 'mysql.performance.bytes_received',