Skip to content

Commit 2e9d05a

Browse files
Add MariaDB setup docs for Database Monitoring
Adds dedicated Database Monitoring setup documentation for MariaDB (self-hosted and RDS), advanced configuration, and troubleshooting pages, plus the corresponding navigation menu entries and setup partial. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
1 parent 5ce9307 commit 2e9d05a

7 files changed

Lines changed: 1151 additions & 16 deletions

File tree

config/_default/menus/main.en.yaml

Lines changed: 41 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4837,11 +4837,36 @@ menu:
48374837
parent: dbm_setup_mysql
48384838
identifier: dbm_troubleshooting_mysql
48394839
weight: 407
4840+
- name: Setting Up MariaDB
4841+
url: database_monitoring/setup_mariadb/
4842+
parent: dbm
4843+
identifier: dbm_setup_mariadb
4844+
weight: 6
4845+
- name: Self-hosted
4846+
url: database_monitoring/setup_mariadb/selfhosted
4847+
parent: dbm_setup_mariadb
4848+
identifier: dbm_setup_mariadb_selfhosted
4849+
weight: 451
4850+
- name: RDS
4851+
url: database_monitoring/setup_mariadb/rds
4852+
parent: dbm_setup_mariadb
4853+
identifier: dbm_setup_mariadb_rds
4854+
weight: 452
4855+
- name: Advanced Configuration
4856+
url: database_monitoring/setup_mariadb/advanced_configuration
4857+
parent: dbm_setup_mariadb
4858+
identifier: dbm_mariadb_advanced_configuration
4859+
weight: 453
4860+
- name: Troubleshooting
4861+
url: database_monitoring/setup_mariadb/troubleshooting/
4862+
parent: dbm_setup_mariadb
4863+
identifier: dbm_troubleshooting_mariadb
4864+
weight: 454
48404865
- name: Setting Up SQL Server
48414866
url: database_monitoring/setup_sql_server/
48424867
parent: dbm
48434868
identifier: dbm_setup_sql_server
4844-
weight: 6
4869+
weight: 7
48454870
- name: Self-hosted
48464871
url: database_monitoring/setup_sql_server/selfhosted/
48474872
parent: dbm_setup_sql_server
@@ -4871,7 +4896,7 @@ menu:
48714896
url: database_monitoring/setup_oracle/
48724897
parent: dbm
48734898
identifier: dbm_setup_oracle
4874-
weight: 7
4899+
weight: 8
48754900
- name: Self-hosted
48764901
url: database_monitoring/setup_oracle/selfhosted/
48774902
parent: dbm_setup_oracle
@@ -4906,7 +4931,7 @@ menu:
49064931
url: database_monitoring/setup_mongodb/
49074932
parent: dbm
49084933
identifier: dbm_setup_mongodb
4909-
weight: 8
4934+
weight: 9
49104935
- name: Self-hosted
49114936
url: database_monitoring/setup_mongodb/selfhosted
49124937
parent: dbm_setup_mongodb
@@ -4926,7 +4951,7 @@ menu:
49264951
url: database_monitoring/setup_clickhouse/
49274952
parent: dbm
49284953
identifier: dbm_setup_clickhouse
4929-
weight: 9
4954+
weight: 10
49304955
- name: Self-hosted
49314956
url: database_monitoring/setup_clickhouse/selfhosted
49324957
parent: dbm_setup_clickhouse
@@ -4941,7 +4966,7 @@ menu:
49414966
url: database_monitoring/setup_documentdb/
49424967
parent: dbm
49434968
identifier: dbm_setup_documentdb
4944-
weight: 8
4969+
weight: 11
49454970
- name: Amazon DocumentDB
49464971
url: database_monitoring/setup_documentdb/amazon_documentdb
49474972
parent: dbm_setup_documentdb
@@ -4956,17 +4981,17 @@ menu:
49564981
url: database_monitoring/connect_dbm_and_apm/
49574982
parent: dbm
49584983
identifier: dbm_connect_dbm_and_apm
4959-
weight: 10
4984+
weight: 12
49604985
- name: Data Collected
49614986
url: database_monitoring/data_collected
49624987
parent: dbm
49634988
identifier: dbm_data_collected
4964-
weight: 10
4989+
weight: 13
49654990
- name: Collecting Custom Metrics
49664991
url: database_monitoring/custom_metrics/
49674992
parent: dbm
49684993
identifier: dbm_custom_metrics
4969-
weight: 11
4994+
weight: 14
49704995
- name: Exploring Custom Metrics
49714996
url: database_monitoring/custom_metrics/exploring_custom_metrics
49724997
parent: dbm_custom_metrics
@@ -4976,42 +5001,42 @@ menu:
49765001
url: database_monitoring/database_hosts/
49775002
parent: dbm
49785003
identifier: dbm_database_hosts
4979-
weight: 12
5004+
weight: 15
49805005
- name: Exploring Query Metrics
49815006
url: database_monitoring/query_metrics/
49825007
parent: dbm
49835008
identifier: dbm_query_metrics
4984-
weight: 13
5009+
weight: 16
49855010
- name: Exploring Query Samples
49865011
url: database_monitoring/query_samples/
49875012
parent: dbm
49885013
identifier: dbm_query_samples
4989-
weight: 14
5014+
weight: 17
49905015
- name: Exploring Database Schemas
49915016
url: database_monitoring/schema_explorer
49925017
parent: dbm
49935018
identifier: dbm_schema_explorer
4994-
weight: 15
5019+
weight: 18
49955020
- name: Exploring Recommendations
49965021
url: database_monitoring/recommendations/
49975022
parent: dbm
49985023
identifier: dbm_recommendations
4999-
weight: 16
5024+
weight: 19
50005025
- name: Database Investigator
50015026
url: database_monitoring/database_investigator/
50025027
parent: dbm
50035028
identifier: dbm_database_investigator
5004-
weight: 17
5029+
weight: 20
50055030
- name: Troubleshooting
50065031
url: database_monitoring/troubleshooting/
50075032
parent: dbm
50085033
identifier: dbm_troubleshooting
5009-
weight: 18
5034+
weight: 21
50105035
- name: Guides
50115036
url: database_monitoring/guide/
50125037
parent: dbm
50135038
identifier: dbm_guides
5014-
weight: 19
5039+
weight: 22
50155040
- name: Data Streams Monitoring
50165041
url: data_streams/
50175042
pre: datastreams-monitoring
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
title: Setting up MariaDB
3+
description: Setting up Database Monitoring on a MariaDB database
4+
disable_sidebar: true
5+
---
6+
7+
### MariaDB versions supported
8+
9+
| | Self-hosted | Amazon RDS |
10+
|--|------------|---------|
11+
| MariaDB 10.5 | {{< X >}} | {{< X >}} |
12+
| MariaDB 10.6 | {{< X >}} | {{< X >}} |
13+
| MariaDB 10.11 | {{< X >}} | {{< X >}} |
14+
| MariaDB 11.4 | {{< X >}} | |
15+
16+
For setup instructions, select your hosting type:
17+
18+
{{< partial name="dbm/dbm-setup-mariadb" >}}
19+
20+
<br>
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
---
2+
title: Advanced Configuration for MariaDB Database Monitoring
3+
description: Advanced Configuration for MariaDB Database Monitoring
4+
5+
---
6+
7+
## Truncating `events_statements_summary_by_digest`
8+
9+
Certain workloads require some maintenance on tables in `performance_schema`. Query statistics are aggregated in the `performance_schema.events_statements_summary_by_digest` table, which has a limit on the number of rows. This limit is specified by the [`performance_schema_digests_size` system variable][1]. If the table is full, new query digests are tracked in a catch-all row with null schema and null query digest, preventing the Agent from distinguishing between queries that make up that row.
10+
11+
To prevent this loss of accurate per-query metrics, periodically truncate this table as a maintenance step so that all new queries can be collected:
12+
13+
```sql
14+
TRUNCATE performance_schema.events_statements_summary_by_digest;
15+
```
16+
17+
To determine the frequency of truncation, run the query below to determine the number of statements sent to this catch-all row per second. A value greater than zero means the table is full and should be truncated.
18+
19+
```sql
20+
SHOW STATUS LIKE 'Performance_schema_digest_lost';
21+
```
22+
23+
## Handling many identical tables
24+
25+
Partitioning your database across tables, such that table definitions are identical except for the name, can result in a large number or normalized queries:
26+
27+
```sql
28+
SELECT * FROM daily_aggregates_001
29+
SELECT * FROM daily_aggregates_002
30+
SELECT * FROM daily_aggregates_003
31+
```
32+
33+
In these cases, track these queries as a single normalized query using the `replace_digits` option, so all metrics for those queries are rolled up into a single query:
34+
35+
```sql
36+
SELECT * FROM daily_aggregates_?
37+
```
38+
39+
Add the `replace_digits` option to your database instance configuration in the Datadog Agent:
40+
41+
```yaml
42+
init_config:
43+
44+
instances:
45+
- dbm: true
46+
...
47+
replace_digits: true
48+
```
49+
50+
## Raising the sampling rate
51+
52+
If you have queries that are relatively infrequent or execute fast, raise the sampling rate by lowering the `collection_interval` value to collect samples more frequently.
53+
54+
Set the `collection_interval` in your database instance configuration of the Datadog Agent. The default value is 1. Lower the value to a smaller interval:
55+
56+
```yaml
57+
instances:
58+
- dbm: true
59+
...
60+
query_samples:
61+
collection_interval: 0.1
62+
```
63+
64+
[1]: https://mariadb.com/kb/en/performance-schema-performance_schema_digests_size/

0 commit comments

Comments
 (0)