From 879d3fcbe9b2ac1f66dc42e83a35cd8f60024613 Mon Sep 17 00:00:00 2001 From: Nenad Noveljic <18366081+nenadnoveljic@users.noreply.github.com> Date: Fri, 6 Jun 2025 13:15:28 +0200 Subject: [PATCH 1/5] Adapt MySQL integration dashboards for OTel --- .../dashboards/overview-screenboard.json | 257 +++++-- mysql/assets/dashboards/overview.json | 713 ++++++++++++++---- 2 files changed, 755 insertions(+), 215 deletions(-) diff --git a/mysql/assets/dashboards/overview-screenboard.json b/mysql/assets/dashboards/overview-screenboard.json index fe3e551c1f8aa..b2ea7df058a3b 100644 --- a/mysql/assets/dashboards/overview-screenboard.json +++ b/mysql/assets/dashboards/overview-screenboard.json @@ -1,15 +1,15 @@ { "title": "MySQL", - "description": "Using this dashboard, you can get a high-level view of your MySQL metrics related to throughput, performance, and resource utilization.\n\nTo learn more about our MySQL integration, see:\n\n- [Our official integration documentation](https://docs.datadoghq.com/integrations/mysql/?tab=host).\n\n- [Monitoring MySQL Performance Metrics](https://www.datadoghq.com/blog/monitoring-mysql-performance-metrics/).\n\n- [Collecting MySQL statistics and metrics](https://www.datadoghq.com/blog/collecting-mysql-statistics-and-metrics/).\n\n- [Our blog post on MySQL monitoring](https://www.datadoghq.com/blog/mysql-monitoring-with-datadog/).\n\n\nYou can clone this dashboard, copy and paste widgets from other out-of-the-box dashboards, and create your own visualizations for your custom applications.", + "description": "Using this dashboard, you can get a high-level view of your MySQL metrics related to throughput, performance, and resource utilization.\n\nTo learn more about our MySQL integration, see:\n\n- [Our official integration documentation](https://docs.datadoghq.com/integrations/mysql/?tab=host).\n\n- [Monitoring MySQL Performance Metrics](https://www.datadoghq.com/blog/monitoring-mysql-performance-metrics/).\n\n- [Collecting MySQL statistics and metrics](https://www.datadoghq.com/blog/collecting-mysql-statistics-and-metrics/).\n\n- [Our blog post on MySQL monitoring](https://www.datadoghq.com/blog/mysql-monitoring-with-datadog/).\n\n\nYou can clone this dashboard, copy and paste widgets from other out-of-the-box dashboards, and create your own visualizations for your custom applications. (cloned)", "widgets": [ { "id": 2101495049883950, "definition": { "title": "About MySQL", "title_align": "center", - "type": "group", "banner_img": "/static/images/integration_dashboard/mysql_hero_1.jpeg", "show_title": false, + "type": "group", "layout_type": "ordered", "widgets": [ { @@ -68,8 +68,8 @@ "definition": { "title": "Basic Activity Monitor", "title_align": "center", - "type": "group", "background_color": "white", + "type": "group", "layout_type": "ordered", "widgets": [ { @@ -81,8 +81,6 @@ "type": "query_value", "requests": [ { - "q": "avg:mysql.net.aborted_connects{$scope}", - "aggregator": "avg", "conditional_formats": [ { "comparator": "<=", @@ -94,6 +92,20 @@ "palette": "white_on_red", "value": 0 } + ], + "response_format": "scalar", + "queries": [ + { + "data_source": "metrics", + "name": "query1", + "query": "avg:mysql.net.aborted_connects{$scope}", + "semantic_mode": "combined" + } + ], + "formulas": [ + { + "formula": "reduce(equiv_otel(query1), 'avg')" + } ] } ], @@ -115,8 +127,19 @@ "type": "query_value", "requests": [ { - "q": "avg:mysql.net.connections{$scope}", - "aggregator": "avg" + "response_format": "scalar", + "queries": [ + { + "data_source": "metrics", + "name": "query1", + "query": "avg:mysql.net.connections{$scope}" + } + ], + "formulas": [ + { + "formula": "reduce(equiv_otel(query1), 'avg')" + } + ] } ], "precision": 2 @@ -137,8 +160,15 @@ "type": "query_value", "requests": [ { - "q": "avg:mysql.net.max_connections{$scope}", - "aggregator": "avg" + "response_format": "scalar", + "queries": [ + { + "data_source": "metrics", + "name": "query1", + "query": "avg:mysql.net.max_connections{$scope}", + "aggregator": "avg" + } + ] } ], "autoscale": true, @@ -165,8 +195,8 @@ "definition": { "title": "Performance", "title_align": "center", - "type": "group", "background_color": "vivid_blue", + "type": "group", "layout_type": "ordered", "widgets": [ { @@ -176,7 +206,6 @@ "title_size": "16", "title_align": "left", "show_legend": false, - "legend_size": "0", "legend_layout": "auto", "legend_columns": [ "avg", @@ -194,12 +223,12 @@ } ], "response_format": "timeseries", - "on_right_yaxis": false, "queries": [ { "query": "avg:mysql.performance.slow_queries{$scope}", "data_source": "metrics", - "name": "query1" + "name": "query1", + "semantic_mode": "combined" } ], "style": { @@ -297,8 +326,8 @@ "definition": { "title": "Throughput", "title_align": "center", - "type": "group", "background_color": "blue", + "type": "group", "layout_type": "ordered", "widgets": [ { @@ -308,7 +337,6 @@ "title_size": "16", "title_align": "left", "show_legend": false, - "legend_size": "0", "legend_layout": "auto", "legend_columns": [ "avg", @@ -320,13 +348,18 @@ "type": "timeseries", "requests": [ { - "on_right_yaxis": false, "response_format": "timeseries", "queries": [ { "query": "avg:mysql.performance.com_select{$scope}", "data_source": "metrics", - "name": "query1" + "name": "query1", + "semantic_mode": "combined" + } + ], + "formulas": [ + { + "formula": "query1" } ], "style": { @@ -371,13 +404,18 @@ "type": "timeseries", "requests": [ { - "on_right_yaxis": false, "response_format": "timeseries", "queries": [ { "query": "avg:mysql.performance.com_insert{$scope}", "data_source": "metrics", - "name": "query1" + "name": "query1", + "semantic_mode": "combined" + } + ], + "formulas": [ + { + "formula": "query1" } ], "style": { @@ -428,12 +466,12 @@ } ], "response_format": "timeseries", - "on_right_yaxis": false, "queries": [ { "query": "avg:mysql.performance.com_update{$scope}", "data_source": "metrics", - "name": "query1" + "name": "query1", + "semantic_mode": "combined" } ], "style": { @@ -478,13 +516,18 @@ "type": "timeseries", "requests": [ { - "on_right_yaxis": false, "response_format": "timeseries", "queries": [ { "query": "avg:mysql.performance.com_delete{$scope}", "data_source": "metrics", - "name": "query1" + "name": "query1", + "semantic_mode": "combined" + } + ], + "formulas": [ + { + "formula": "query1" } ], "style": { @@ -546,8 +589,8 @@ "definition": { "title": "MySQL Resource Utilization", "title_align": "center", - "type": "group", "background_color": "vivid_green", + "type": "group", "layout_type": "ordered", "widgets": [ { @@ -570,11 +613,10 @@ { "formulas": [ { - "formula": "query1" + "formula": "equiv_otel(query1)" } ], "response_format": "timeseries", - "on_right_yaxis": false, "queries": [ { "query": "avg:mysql.performance.threads_running{$scope}", @@ -626,11 +668,10 @@ { "formulas": [ { - "formula": "query1" + "formula": "equiv_otel(query1)" } ], "response_format": "timeseries", - "on_right_yaxis": false, "queries": [ { "query": "avg:mysql.performance.threads_connected{$scope}", @@ -703,12 +744,11 @@ { "formulas": [ { - "formula": "query1", - "alias": "Cache Utilization" + "alias": "Cache Utilization", + "formula": "equiv_otel(query1)" } ], "response_format": "timeseries", - "on_right_yaxis": false, "queries": [ { "query": "avg:mysql.performance.key_cache_utilization{$scope} by {service}", @@ -760,16 +800,15 @@ { "formulas": [ { - "formula": "query1", - "alias": "Data Reads" + "alias": "Data Reads", + "formula": "equiv_otel(query1)" }, { - "formula": "query2", - "alias": "Data Writes" + "alias": "Data Writes", + "formula": "equiv_otel(query2)" } ], "response_format": "timeseries", - "on_right_yaxis": false, "queries": [ { "query": "avg:mysql.innodb.data_reads{$scope}", @@ -826,20 +865,19 @@ { "formulas": [ { - "formula": "query1", - "alias": "Available Buffer Pool" + "alias": "Available Buffer Pool", + "formula": "equiv_otel(query1)" }, { - "formula": "query2", - "alias": "Used Buffer Pool" + "alias": "Used Buffer Pool", + "formula": "equiv_otel(query2)" }, { - "formula": "query3", - "alias": "Total Buffer Pool" + "alias": "Total Buffer Pool", + "formula": "equiv_otel(query3)" } ], "response_format": "timeseries", - "on_right_yaxis": false, "queries": [ { "query": "avg:mysql.innodb.buffer_pool_free{$scope}", @@ -901,20 +939,19 @@ { "formulas": [ { - "formula": "query1", - "alias": "Total Pages" + "alias": "Total Pages", + "formula": "equiv_otel(query1)" }, { - "formula": "query2", - "alias": "Free Pages" + "alias": "Free Pages", + "formula": "equiv_otel(query2)" }, { - "formula": "query3", - "alias": "Pages Data" + "alias": "Pages Data", + "formula": "equiv_otel(query3)" } ], "response_format": "timeseries", - "on_right_yaxis": false, "queries": [ { "query": "avg:mysql.innodb.buffer_pool_pages_total{$scope}", @@ -992,8 +1029,8 @@ "definition": { "title": "System Resource Utilization", "title_align": "center", - "type": "group", "background_color": "vivid_orange", + "type": "group", "layout_type": "ordered", "widgets": [ { @@ -1358,6 +1395,12 @@ } } ] + }, + "layout": { + "x": 0, + "y": 20, + "width": 12, + "height": 6 } }, { @@ -1365,8 +1408,8 @@ "definition": { "title": "Logs", "title_align": "center", - "type": "group", "background_color": "white", + "type": "group", "layout_type": "ordered", "widgets": [ { @@ -1375,20 +1418,44 @@ "title": "Error Logs", "title_size": "16", "title_align": "left", - "type": "log_stream", - "indexes": [], - "query": "source:mysql $scope status:error", - "sort": { - "column": "time", - "order": "desc" - }, - "columns": [ - "core_host", - "core_service" + "requests": [ + { + "response_format": "event_list", + "query": { + "data_source": "logs_stream", + "query_string": "source:mysql $scope status:error", + "indexes": [], + "storage": "hot", + "sort": { + "order": "desc", + "column": "timestamp" + } + }, + "columns": [ + { + "field": "status_line", + "width": "auto" + }, + { + "field": "timestamp", + "width": "auto" + }, + { + "field": "host", + "width": "auto" + }, + { + "field": "service", + "width": "auto" + }, + { + "field": "content", + "width": "compact" + } + ] + } ], - "show_date_column": true, - "show_message_column": true, - "message_display": "expanded-md" + "type": "list_stream" }, "layout": { "x": 0, @@ -1403,20 +1470,44 @@ "title": "All Logs", "title_size": "16", "title_align": "left", - "type": "log_stream", - "indexes": [], - "query": "source:mysql $scope", - "sort": { - "column": "time", - "order": "desc" - }, - "columns": [ - "core_host", - "core_service" + "requests": [ + { + "response_format": "event_list", + "query": { + "data_source": "logs_stream", + "query_string": "source:mysql $scope", + "indexes": [], + "storage": "hot", + "sort": { + "order": "desc", + "column": "timestamp" + } + }, + "columns": [ + { + "field": "status_line", + "width": "auto" + }, + { + "field": "timestamp", + "width": "auto" + }, + { + "field": "host", + "width": "auto" + }, + { + "field": "service", + "width": "auto" + }, + { + "field": "content", + "width": "compact" + } + ] + } ], - "show_date_column": true, - "show_message_column": true, - "message_display": "expanded-md" + "type": "list_stream" }, "layout": { "x": 6, @@ -1426,17 +1517,23 @@ } } ] + }, + "layout": { + "x": 0, + "y": 26, + "width": 12, + "height": 5 } } ], "template_variables": [ { "name": "scope", + "available_values": [], "default": "*" } ], "layout_type": "ordered", - "is_read_only": false, "notify_list": [], "reflow_type": "fixed" -} +} \ No newline at end of file diff --git a/mysql/assets/dashboards/overview.json b/mysql/assets/dashboards/overview.json index 319650997b831..f22d7798595cd 100644 --- a/mysql/assets/dashboards/overview.json +++ b/mysql/assets/dashboards/overview.json @@ -1,150 +1,593 @@ { "title": "MySQL - Overview", - "description": "This dashboard brings together key metrics from your MySQL servers so you can spot excessive numbers of [slow queries](https://www.datadoghq.com/blog/monitoring-mysql-performance-metrics/#query-performance) and quickly identify any resource constraints that may be impacting performance. Further reading on MySQL monitoring:\n\n- [Datadog's guide to key metrics for MySQL](https://www.datadoghq.com/blog/monitoring-mysql-performance-metrics/)\n\n- [How to collect MySQL metrics using built-in tools](https://www.datadoghq.com/blog/collecting-mysql-statistics-and-metrics/)\n\n- [How to monitor MySQL using Datadog](https://www.datadoghq.com/blog/mysql-monitoring-with-datadog/)\n\n- [Datadog's MySQL integration docs](https://docs.datadoghq.com/integrations/mysql/)\n\nClone this template dashboard to make changes and add your own graph widgets.", - "layout_type": "ordered", - "template_variables": [ - { - "default": "*", - "prefix": null, - "name": "scope" - } - ], + "description": "This dashboard brings together key metrics from your MySQL servers so you can spot excessive numbers of [slow queries](https://www.datadoghq.com/blog/monitoring-mysql-performance-metrics/#query-performance) and quickly identify any resource constraints that may be impacting performance. Further reading on MySQL monitoring:\n\n- [Datadog's guide to key metrics for MySQL](https://www.datadoghq.com/blog/monitoring-mysql-performance-metrics/)\n\n- [How to collect MySQL metrics using built-in tools](https://www.datadoghq.com/blog/collecting-mysql-statistics-and-metrics/)\n\n- [How to monitor MySQL using Datadog](https://www.datadoghq.com/blog/mysql-monitoring-with-datadog/)\n\n- [Datadog's MySQL integration docs](https://docs.datadoghq.com/integrations/mysql/)\n\nClone this template dashboard to make changes and add your own graph widgets. (cloned)", "widgets": [ - { - "definition": { - "requests": [ - { - "q": "sum:mysql.net.connections{$scope}" - }, - { - "q": "sum:mysql.net.max_connections{$scope}" - } - ], - "type": "timeseries", - "title": "MySQL connections" + { + "id": 6275378000844597, + "definition": { + "title": "MySQL connections", + "show_legend": true, + "legend_layout": "auto", + "legend_columns": [ + "avg", + "min", + "max", + "value", + "sum" + ], + "type": "timeseries", + "requests": [ + { + "response_format": "timeseries", + "queries": [ + { + "data_source": "metrics", + "name": "query1", + "query": "sum:mysql.net.connections{$scope}", + "semantic_mode": "combined" + } + ], + "formulas": [ + { + "formula": "equiv_otel(query1)" + } + ], + "style": { + "palette": "dog_classic", + "line_type": "solid", + "line_width": "normal" + } + }, + { + "response_format": "timeseries", + "queries": [ + { + "data_source": "metrics", + "name": "query1", + "query": "sum:mysql.net.max_connections{$scope}" + } + ] } - }, - { - "definition": { - "requests": [ - { - "q": "sum:mysql.innodb.data_reads{$scope}" - }, - { - "q": "sum:mysql.innodb.data_writes{$scope}" - } - ], - "type": "timeseries", - "title": "MySQL reads and writes (per sec)" + ] + } + }, + { + "id": 7019698073009104, + "definition": { + "title": "MySQL reads and writes (per sec)", + "show_legend": true, + "legend_layout": "auto", + "legend_columns": [ + "avg", + "min", + "max", + "value", + "sum" + ], + "type": "timeseries", + "requests": [ + { + "response_format": "timeseries", + "queries": [ + { + "data_source": "metrics", + "name": "query1", + "query": "sum:mysql.innodb.data_reads{$scope}", + "semantic_mode": "combined" + } + ], + "formulas": [ + { + "formula": "query1" + } + ], + "style": { + "palette": "dog_classic", + "line_type": "solid", + "line_width": "normal" + } + }, + { + "response_format": "timeseries", + "queries": [ + { + "data_source": "metrics", + "name": "query1", + "query": "avg:mysql.innodb.data_writes{$scope}", + "semantic_mode": "combined" + } + ], + "formulas": [ + { + "formula": "query1" + } + ], + "style": { + "palette": "dog_classic", + "line_type": "solid", + "line_width": "normal" + } } - }, - { - "definition": { - "requests": [ - { - "q": "sum:mysql.innodb.os_log_fsyncs{$scope}" - } - ], - "type": "timeseries", - "title": "MySQL fsync op count (per sec)" + ] + } + }, + { + "id": 5054243947202682, + "definition": { + "title": "MySQL fsync op count (per sec)", + "show_legend": true, + "legend_layout": "auto", + "legend_columns": [ + "avg", + "min", + "max", + "value", + "sum" + ], + "type": "timeseries", + "requests": [ + { + "response_format": "timeseries", + "queries": [ + { + "data_source": "metrics", + "name": "query1", + "query": "sum:mysql.innodb.os_log_fsyncs{$scope}", + "semantic_mode": "combined" + } + ], + "formulas": [ + { + "formula": "query1" + } + ], + "style": { + "palette": "dog_classic", + "line_type": "solid", + "line_width": "normal" + } } - }, - { - "definition": { - "requests": [ - { - "q": "sum:mysql.performance.slow_queries{$scope}" - } - ], - "type": "timeseries", - "title": "MySQL slow queries" + ] + } + }, + { + "id": 8679042482146834, + "definition": { + "title": "MySQL slow queries", + "show_legend": true, + "legend_layout": "auto", + "legend_columns": [ + "avg", + "min", + "max", + "value", + "sum" + ], + "type": "timeseries", + "requests": [ + { + "response_format": "timeseries", + "queries": [ + { + "data_source": "metrics", + "name": "query1", + "query": "sum:mysql.performance.slow_queries{$scope}", + "semantic_mode": "combined" + } + ], + "formulas": [ + { + "formula": "query1" + } + ], + "style": { + "palette": "dog_classic", + "line_type": "solid", + "line_width": "normal" + } } - }, - { - "definition": { - "requests": [ - { - "q": "rate(sum:mysql.performance.table_locks_waited{$scope})" - } - ], - "type": "timeseries", - "title": "MySQL locking rate (per sec)" + ] + } + }, + { + "id": 8940192157313818, + "definition": { + "title": "MySQL locking rate (per sec)", + "show_legend": true, + "legend_layout": "auto", + "legend_columns": [ + "avg", + "min", + "max", + "value", + "sum" + ], + "type": "timeseries", + "requests": [ + { + "response_format": "timeseries", + "queries": [ + { + "data_source": "metrics", + "name": "query1", + "query": "sum:mysql.performance.table_locks_waited{$scope}", + "semantic_mode": "combined" + } + ], + "formulas": [ + { + "formula": "rate(query1)" + } + ], + "style": { + "palette": "dog_classic", + "line_type": "solid", + "line_width": "normal" + } } - }, - { - "definition": { - "requests": [ - { - "q": "mysql.performance.user_time{$scope}" - } - ], - "type": "timeseries", - "title": "MySQL CPU time (per sec)" + ] + } + }, + { + "id": 7211572018463595, + "definition": { + "title": "MySQL CPU time (per sec)", + "show_legend": true, + "legend_layout": "auto", + "legend_columns": [ + "avg", + "min", + "max", + "value", + "sum" + ], + "type": "timeseries", + "requests": [ + { + "response_format": "timeseries", + "queries": [ + { + "data_source": "metrics", + "name": "query1", + "query": "mysql.performance.user_time{$scope}", + "semantic_mode": "native" + } + ], + "formulas": [ + { + "formula": "query1" + } + ], + "style": { + "palette": "dog_classic", + "line_type": "solid", + "line_width": "normal" + } } - }, - { - "definition": { - "requests": [ - { - "q": "system.load.1{$scope}" - }, - { - "q": "system.load.5{$scope}" - }, - { - "q": "system.load.15{$scope}" - } - ], - "type": "timeseries", - "title": "System load" + ] + } + }, + { + "id": 3387110261451077, + "definition": { + "title": "System load", + "show_legend": true, + "legend_layout": "auto", + "legend_columns": [ + "avg", + "min", + "max", + "value", + "sum" + ], + "type": "timeseries", + "requests": [ + { + "response_format": "timeseries", + "queries": [ + { + "data_source": "metrics", + "name": "query1", + "query": "system.load.1{$scope}", + "semantic_mode": "combined" + } + ], + "formulas": [ + { + "formula": "query1" + } + ], + "style": { + "palette": "dog_classic", + "line_type": "solid", + "line_width": "normal" + } + }, + { + "response_format": "timeseries", + "queries": [ + { + "data_source": "metrics", + "name": "query1", + "query": "system.load.5{$scope}", + "semantic_mode": "combined" + } + ], + "formulas": [ + { + "formula": "query1" + } + ], + "style": { + "palette": "dog_classic", + "line_type": "solid", + "line_width": "normal" + } + }, + { + "response_format": "timeseries", + "queries": [ + { + "data_source": "metrics", + "name": "query1", + "query": "system.load.15{$scope}", + "semantic_mode": "combined" + } + ], + "formulas": [ + { + "formula": "query1" + } + ], + "style": { + "palette": "dog_classic", + "line_type": "solid", + "line_width": "normal" + } } - }, - { - "definition": { - "requests": [ - { - "q": "system.cpu.idle{$scope}, system.cpu.system{$scope}, system.cpu.iowait{$scope}, system.cpu.user{$scope}, system.cpu.stolen{$scope}, system.cpu.guest{$scope}" - } - ], - "type": "timeseries", - "title": "CPU usage (%)" + ] + } + }, + { + "id": 5930995066864482, + "definition": { + "title": "CPU usage (%)", + "show_legend": true, + "legend_layout": "auto", + "legend_columns": [ + "avg", + "min", + "max", + "value", + "sum" + ], + "type": "timeseries", + "requests": [ + { + "response_format": "timeseries", + "queries": [ + { + "data_source": "metrics", + "name": "query1", + "query": "system.cpu.idle{$scope}", + "semantic_mode": "combined" + }, + { + "data_source": "metrics", + "name": "query2", + "query": "system.cpu.system{$scope}", + "semantic_mode": "combined" + }, + { + "data_source": "metrics", + "name": "query3", + "query": "system.cpu.iowait{$scope}", + "semantic_mode": "combined" + }, + { + "data_source": "metrics", + "name": "query4", + "query": "system.cpu.user{$scope}", + "semantic_mode": "combined" + }, + { + "data_source": "metrics", + "name": "query5", + "query": "system.cpu.stolen{$scope}", + "semantic_mode": "combined" + }, + { + "data_source": "metrics", + "name": "query6", + "query": "system.cpu.guest{$scope}", + "semantic_mode": "combined" + } + ], + "formulas": [ + { + "formula": "query1" + }, + { + "formula": "query2" + }, + { + "formula": "query3" + }, + { + "formula": "query4" + }, + { + "formula": "query5" + }, + { + "formula": "query6" + } + ], + "style": { + "palette": "dog_classic", + "line_type": "solid", + "line_width": "normal" + } } - }, - { - "definition": { - "requests": [ - { - "q": "max:system.cpu.iowait{$scope}" - } - ], - "type": "timeseries", - "title": "I/O wait (%)" + ] + } + }, + { + "id": 354700245646769, + "definition": { + "title": "I/O wait (%)", + "show_legend": true, + "legend_layout": "auto", + "legend_columns": [ + "avg", + "min", + "max", + "value", + "sum" + ], + "type": "timeseries", + "requests": [ + { + "response_format": "timeseries", + "queries": [ + { + "data_source": "metrics", + "name": "query1", + "query": "max:system.cpu.iowait{$scope}", + "semantic_mode": "combined" + } + ], + "formulas": [ + { + "formula": "query1" + } + ], + "style": { + "palette": "dog_classic", + "line_type": "solid", + "line_width": "normal" + } } - }, - { - "definition": { - "requests": [ - { - "q": "sum:system.mem.usable{$scope},sum:system.mem.total{$scope}-sum:system.mem.usable{$scope}" - } - ], - "type": "timeseries", - "title": "System memory" + ] + } + }, + { + "id": 1786796664554390, + "definition": { + "title": "System memory", + "show_legend": true, + "legend_layout": "auto", + "legend_columns": [ + "avg", + "min", + "max", + "value", + "sum" + ], + "type": "timeseries", + "requests": [ + { + "response_format": "timeseries", + "queries": [ + { + "data_source": "metrics", + "name": "query1", + "query": "sum:system.mem.usable{$scope}", + "semantic_mode": "combined" + }, + { + "data_source": "metrics", + "name": "query2", + "query": "sum:system.mem.total{$scope}", + "semantic_mode": "combined" + } + ], + "formulas": [ + { + "formula": "query1" + }, + { + "formula": "query2 - query1" + } + ], + "style": { + "palette": "dog_classic", + "line_type": "solid", + "line_width": "normal" + } } - }, - { - "definition": { - "requests": [ - { - "q": "sum:system.net.bytes_rcvd{$scope}" - }, - { - "q": "sum:system.net.bytes_sent{$scope}" - } - ], - "type": "timeseries", - "title": "Network traffic (per sec)" + ] + } + }, + { + "id": 6896116482972023, + "definition": { + "title": "Network traffic (per sec)", + "show_legend": true, + "legend_layout": "auto", + "legend_columns": [ + "avg", + "min", + "max", + "value", + "sum" + ], + "type": "timeseries", + "requests": [ + { + "response_format": "timeseries", + "queries": [ + { + "data_source": "metrics", + "name": "query1", + "query": "sum:system.net.bytes_rcvd{$scope}", + "semantic_mode": "combined" + } + ], + "formulas": [ + { + "formula": "query1" + } + ], + "style": { + "palette": "dog_classic", + "line_type": "solid", + "line_width": "normal" + } + }, + { + "response_format": "timeseries", + "queries": [ + { + "data_source": "metrics", + "name": "query1", + "query": "sum:system.net.bytes_sent{$scope}", + "semantic_mode": "combined" + } + ], + "formulas": [ + { + "formula": "query1" + } + ], + "style": { + "palette": "dog_classic", + "line_type": "solid", + "line_width": "normal" + } } + ] } - ] -} \ No newline at end of file + } + ], + "template_variables": [ + { + "name": "scope", + "available_values": [], + "default": "*" + } + ], + "layout_type": "ordered", + "notify_list": [], + "reflow_type": "auto" + } \ No newline at end of file From 1b591d195dcfc50b61e66507d1c3a786d4218c15 Mon Sep 17 00:00:00 2001 From: Nenad Noveljic <18366081+nenadnoveljic@users.noreply.github.com> Date: Fri, 6 Jun 2025 13:18:05 +0200 Subject: [PATCH 2/5] remove cloned --- mysql/assets/dashboards/overview-screenboard.json | 2 +- mysql/assets/dashboards/overview.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mysql/assets/dashboards/overview-screenboard.json b/mysql/assets/dashboards/overview-screenboard.json index b2ea7df058a3b..94224c0e144e3 100644 --- a/mysql/assets/dashboards/overview-screenboard.json +++ b/mysql/assets/dashboards/overview-screenboard.json @@ -1,6 +1,6 @@ { "title": "MySQL", - "description": "Using this dashboard, you can get a high-level view of your MySQL metrics related to throughput, performance, and resource utilization.\n\nTo learn more about our MySQL integration, see:\n\n- [Our official integration documentation](https://docs.datadoghq.com/integrations/mysql/?tab=host).\n\n- [Monitoring MySQL Performance Metrics](https://www.datadoghq.com/blog/monitoring-mysql-performance-metrics/).\n\n- [Collecting MySQL statistics and metrics](https://www.datadoghq.com/blog/collecting-mysql-statistics-and-metrics/).\n\n- [Our blog post on MySQL monitoring](https://www.datadoghq.com/blog/mysql-monitoring-with-datadog/).\n\n\nYou can clone this dashboard, copy and paste widgets from other out-of-the-box dashboards, and create your own visualizations for your custom applications. (cloned)", + "description": "Using this dashboard, you can get a high-level view of your MySQL metrics related to throughput, performance, and resource utilization.\n\nTo learn more about our MySQL integration, see:\n\n- [Our official integration documentation](https://docs.datadoghq.com/integrations/mysql/?tab=host).\n\n- [Monitoring MySQL Performance Metrics](https://www.datadoghq.com/blog/monitoring-mysql-performance-metrics/).\n\n- [Collecting MySQL statistics and metrics](https://www.datadoghq.com/blog/collecting-mysql-statistics-and-metrics/).\n\n- [Our blog post on MySQL monitoring](https://www.datadoghq.com/blog/mysql-monitoring-with-datadog/).\n\n\nYou can clone this dashboard, copy and paste widgets from other out-of-the-box dashboards, and create your own visualizations for your custom applications.", "widgets": [ { "id": 2101495049883950, diff --git a/mysql/assets/dashboards/overview.json b/mysql/assets/dashboards/overview.json index f22d7798595cd..e7b05ed3d7b3a 100644 --- a/mysql/assets/dashboards/overview.json +++ b/mysql/assets/dashboards/overview.json @@ -1,6 +1,6 @@ { "title": "MySQL - Overview", - "description": "This dashboard brings together key metrics from your MySQL servers so you can spot excessive numbers of [slow queries](https://www.datadoghq.com/blog/monitoring-mysql-performance-metrics/#query-performance) and quickly identify any resource constraints that may be impacting performance. Further reading on MySQL monitoring:\n\n- [Datadog's guide to key metrics for MySQL](https://www.datadoghq.com/blog/monitoring-mysql-performance-metrics/)\n\n- [How to collect MySQL metrics using built-in tools](https://www.datadoghq.com/blog/collecting-mysql-statistics-and-metrics/)\n\n- [How to monitor MySQL using Datadog](https://www.datadoghq.com/blog/mysql-monitoring-with-datadog/)\n\n- [Datadog's MySQL integration docs](https://docs.datadoghq.com/integrations/mysql/)\n\nClone this template dashboard to make changes and add your own graph widgets. (cloned)", + "description": "This dashboard brings together key metrics from your MySQL servers so you can spot excessive numbers of [slow queries](https://www.datadoghq.com/blog/monitoring-mysql-performance-metrics/#query-performance) and quickly identify any resource constraints that may be impacting performance. Further reading on MySQL monitoring:\n\n- [Datadog's guide to key metrics for MySQL](https://www.datadoghq.com/blog/monitoring-mysql-performance-metrics/)\n\n- [How to collect MySQL metrics using built-in tools](https://www.datadoghq.com/blog/collecting-mysql-statistics-and-metrics/)\n\n- [How to monitor MySQL using Datadog](https://www.datadoghq.com/blog/mysql-monitoring-with-datadog/)\n\n- [Datadog's MySQL integration docs](https://docs.datadoghq.com/integrations/mysql/)\n\nClone this template dashboard to make changes and add your own graph widgets.", "widgets": [ { "id": 6275378000844597, From 6305d3f466796bf0f3ff8e8d24e1495a96ba4b74 Mon Sep 17 00:00:00 2001 From: Nenad Noveljic <18366081+nenadnoveljic@users.noreply.github.com> Date: Thu, 17 Jul 2025 15:12:25 +0200 Subject: [PATCH 3/5] Remove combined semantic mode for scalar queries --- .../assets/dashboards/overview-screenboard.json | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/mysql/assets/dashboards/overview-screenboard.json b/mysql/assets/dashboards/overview-screenboard.json index 94224c0e144e3..df14dcdd1cbbd 100644 --- a/mysql/assets/dashboards/overview-screenboard.json +++ b/mysql/assets/dashboards/overview-screenboard.json @@ -98,13 +98,7 @@ { "data_source": "metrics", "name": "query1", - "query": "avg:mysql.net.aborted_connects{$scope}", - "semantic_mode": "combined" - } - ], - "formulas": [ - { - "formula": "reduce(equiv_otel(query1), 'avg')" + "query": "avg:mysql.net.aborted_connects{$scope}" } ] } @@ -134,11 +128,6 @@ "name": "query1", "query": "avg:mysql.net.connections{$scope}" } - ], - "formulas": [ - { - "formula": "reduce(equiv_otel(query1), 'avg')" - } ] } ], @@ -166,7 +155,8 @@ "data_source": "metrics", "name": "query1", "query": "avg:mysql.net.max_connections{$scope}", - "aggregator": "avg" + "aggregator": "avg", + "semantic_mode": "combined" } ] } From 577d82141e22bad0587f66b0ea879466189342c8 Mon Sep 17 00:00:00 2001 From: Nenad Noveljic <18366081+nenadnoveljic@users.noreply.github.com> Date: Thu, 17 Jul 2025 18:19:00 +0200 Subject: [PATCH 4/5] Reintroduce combined semantic mode for scalar queries & remove equiv function --- .../dashboards/overview-screenboard.json | 99 ++++++------------- mysql/assets/dashboards/overview.json | 5 - 2 files changed, 30 insertions(+), 74 deletions(-) diff --git a/mysql/assets/dashboards/overview-screenboard.json b/mysql/assets/dashboards/overview-screenboard.json index df14dcdd1cbbd..871054841ff88 100644 --- a/mysql/assets/dashboards/overview-screenboard.json +++ b/mysql/assets/dashboards/overview-screenboard.json @@ -98,7 +98,8 @@ { "data_source": "metrics", "name": "query1", - "query": "avg:mysql.net.aborted_connects{$scope}" + "query": "avg:mysql.net.aborted_connects{$scope}", + "semantic_mode": "combined" } ] } @@ -126,7 +127,8 @@ { "data_source": "metrics", "name": "query1", - "query": "avg:mysql.net.connections{$scope}" + "query": "avg:mysql.net.connections{$scope}", + "semantic_mode": "combined" } ] } @@ -601,17 +603,13 @@ "type": "timeseries", "requests": [ { - "formulas": [ - { - "formula": "equiv_otel(query1)" - } - ], "response_format": "timeseries", "queries": [ { "query": "avg:mysql.performance.threads_running{$scope}", "data_source": "metrics", - "name": "query1" + "name": "query1", + "semantic_mode": "combined" } ], "style": { @@ -656,17 +654,13 @@ "type": "timeseries", "requests": [ { - "formulas": [ - { - "formula": "equiv_otel(query1)" - } - ], "response_format": "timeseries", "queries": [ { "query": "avg:mysql.performance.threads_connected{$scope}", "data_source": "metrics", - "name": "query1" + "name": "query1", + "semantic_mode": "combined" } ], "style": { @@ -732,18 +726,13 @@ "type": "timeseries", "requests": [ { - "formulas": [ - { - "alias": "Cache Utilization", - "formula": "equiv_otel(query1)" - } - ], "response_format": "timeseries", "queries": [ { "query": "avg:mysql.performance.key_cache_utilization{$scope} by {service}", "data_source": "metrics", - "name": "query1" + "name": "query1", + "semantic_mode": "combined" } ], "style": { @@ -788,27 +777,19 @@ "type": "timeseries", "requests": [ { - "formulas": [ - { - "alias": "Data Reads", - "formula": "equiv_otel(query1)" - }, - { - "alias": "Data Writes", - "formula": "equiv_otel(query2)" - } - ], "response_format": "timeseries", "queries": [ { "query": "avg:mysql.innodb.data_reads{$scope}", "data_source": "metrics", - "name": "query1" + "name": "query1", + "semantic_mode": "combined" }, { "query": "avg:mysql.innodb.data_writes{$scope}", "data_source": "metrics", - "name": "query2" + "name": "query2", + "semantic_mode": "combined" } ], "style": { @@ -853,36 +834,25 @@ "type": "timeseries", "requests": [ { - "formulas": [ - { - "alias": "Available Buffer Pool", - "formula": "equiv_otel(query1)" - }, - { - "alias": "Used Buffer Pool", - "formula": "equiv_otel(query2)" - }, - { - "alias": "Total Buffer Pool", - "formula": "equiv_otel(query3)" - } - ], "response_format": "timeseries", "queries": [ { "query": "avg:mysql.innodb.buffer_pool_free{$scope}", "data_source": "metrics", - "name": "query1" + "name": "query1", + "semantic_mode": "combined" }, { "query": "avg:mysql.innodb.buffer_pool_used{$scope}", "data_source": "metrics", - "name": "query2" + "name": "query2", + "semantic_mode": "combined" }, { "query": "avg:mysql.innodb.buffer_pool_total{$scope}", "data_source": "metrics", - "name": "query3" + "name": "query3", + "semantic_mode": "combined" } ], "style": { @@ -927,31 +897,19 @@ "type": "timeseries", "requests": [ { - "formulas": [ - { - "alias": "Total Pages", - "formula": "equiv_otel(query1)" - }, - { - "alias": "Free Pages", - "formula": "equiv_otel(query2)" - }, - { - "alias": "Pages Data", - "formula": "equiv_otel(query3)" - } - ], "response_format": "timeseries", "queries": [ { "query": "avg:mysql.innodb.buffer_pool_pages_total{$scope}", "data_source": "metrics", - "name": "query1" + "name": "query1", + "semantic_mode": "combined" }, { "query": "avg:mysql.innodb.buffer_pool_pages_free{$scope}", "data_source": "metrics", - "name": "query2" + "name": "query2", + "semantic_mode": "combined" }, { "query": "avg:mysql.innodb.buffer_pool_pages_data{$scope}", @@ -1082,7 +1040,8 @@ { "query": "avg:system.cpu.iowait{$scope}", "data_source": "metrics", - "name": "query3" + "name": "query3", + "semantic_mode": "combined" }, { "query": "avg:system.cpu.user{$scope}", @@ -1161,7 +1120,8 @@ { "query": "avg:system.load.1{$scope}", "data_source": "metrics", - "name": "query1" + "name": "query1", + "semantic_mode": "combined" }, { "query": "avg:system.load.5{$scope}", @@ -1236,7 +1196,8 @@ { "query": "sum:system.mem.total{$scope}", "data_source": "metrics", - "name": "query2" + "name": "query2", + "semantic_mode": "combined" } ], "style": { diff --git a/mysql/assets/dashboards/overview.json b/mysql/assets/dashboards/overview.json index e7b05ed3d7b3a..d71414981d3d9 100644 --- a/mysql/assets/dashboards/overview.json +++ b/mysql/assets/dashboards/overview.json @@ -27,11 +27,6 @@ "semantic_mode": "combined" } ], - "formulas": [ - { - "formula": "equiv_otel(query1)" - } - ], "style": { "palette": "dog_classic", "line_type": "solid", From bc9679b4bb1e73ff26afcc1ea4664998133cfb09 Mon Sep 17 00:00:00 2001 From: Nenad Noveljic <18366081+nenadnoveljic@users.noreply.github.com> Date: Fri, 18 Jul 2025 11:21:48 +0200 Subject: [PATCH 5/5] Add combined semantic mode to two more metrics --- mysql/assets/dashboards/overview-screenboard.json | 3 ++- mysql/assets/dashboards/overview.json | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/mysql/assets/dashboards/overview-screenboard.json b/mysql/assets/dashboards/overview-screenboard.json index 871054841ff88..cc3698fc2c91f 100644 --- a/mysql/assets/dashboards/overview-screenboard.json +++ b/mysql/assets/dashboards/overview-screenboard.json @@ -914,7 +914,8 @@ { "query": "avg:mysql.innodb.buffer_pool_pages_data{$scope}", "data_source": "metrics", - "name": "query3" + "name": "query3", + "semantic_mode": "combined" } ], "style": { diff --git a/mysql/assets/dashboards/overview.json b/mysql/assets/dashboards/overview.json index d71414981d3d9..9c3c1be2707c3 100644 --- a/mysql/assets/dashboards/overview.json +++ b/mysql/assets/dashboards/overview.json @@ -39,7 +39,8 @@ { "data_source": "metrics", "name": "query1", - "query": "sum:mysql.net.max_connections{$scope}" + "query": "sum:mysql.net.max_connections{$scope}", + "semantic_mode": "combined" } ] }