-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Add MariaDB setup docs for Database Monitoring #39723
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
michaelperalta
wants to merge
1
commit into
master
Choose a base branch
from
mike.peralta/dbm-setup-mariadb
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
hugo/content/en/database_monitoring/setup_mariadb/_index.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| --- | ||
| title: Setting up MariaDB | ||
| description: Setting up Database Monitoring on a MariaDB database | ||
| disable_sidebar: true | ||
| --- | ||
|
|
||
| ### MariaDB versions supported | ||
|
|
||
| | | Self-hosted | Amazon RDS | | ||
| |--|------------|---------| | ||
| | MariaDB 10.5 | {{< X >}} | {{< X >}} | | ||
| | MariaDB 10.6 | {{< X >}} | {{< X >}} | | ||
| | MariaDB 10.11 | {{< X >}} | {{< X >}} | | ||
| | MariaDB 11.4 | {{< X >}} | | | ||
|
|
||
| For setup instructions, select your hosting type: | ||
|
|
||
| {{< partial name="dbm/dbm-setup-mariadb" >}} | ||
|
|
||
| <br> |
64 changes: 64 additions & 0 deletions
64
hugo/content/en/database_monitoring/setup_mariadb/advanced_configuration.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| --- | ||
| title: Advanced Configuration for MariaDB Database Monitoring | ||
| description: Advanced Configuration for MariaDB Database Monitoring | ||
|
|
||
| --- | ||
|
|
||
| ## Truncating `events_statements_summary_by_digest` | ||
|
|
||
| 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. | ||
|
|
||
| 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: | ||
|
|
||
| ```sql | ||
| TRUNCATE performance_schema.events_statements_summary_by_digest; | ||
| ``` | ||
|
|
||
| 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. | ||
|
|
||
| ```sql | ||
| SHOW STATUS LIKE 'Performance_schema_digest_lost'; | ||
| ``` | ||
|
|
||
| ## Handling many identical tables | ||
|
|
||
| Partitioning your database across tables, such that table definitions are identical except for the name, can result in a large number or normalized queries: | ||
|
|
||
| ```sql | ||
| SELECT * FROM daily_aggregates_001 | ||
| SELECT * FROM daily_aggregates_002 | ||
| SELECT * FROM daily_aggregates_003 | ||
| ``` | ||
|
|
||
| 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: | ||
|
|
||
| ```sql | ||
| SELECT * FROM daily_aggregates_? | ||
| ``` | ||
|
|
||
| Add the `replace_digits` option to your database instance configuration in the Datadog Agent: | ||
|
|
||
| ```yaml | ||
| init_config: | ||
|
|
||
| instances: | ||
| - dbm: true | ||
| ... | ||
| replace_digits: true | ||
| ``` | ||
|
|
||
| ## Raising the sampling rate | ||
|
|
||
| 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. | ||
|
|
||
| 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: | ||
|
|
||
| ```yaml | ||
| instances: | ||
| - dbm: true | ||
| ... | ||
| query_samples: | ||
| collection_interval: 0.1 | ||
| ``` | ||
|
|
||
| [1]: https://mariadb.com/kb/en/performance-schema-performance_schema_digests_size/ |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change moves an unrelated menu entry and changes the existing navigation order.
Assertion details
ClickHouse stays before Terraform, as it was before this change.ClickHouse and Terraform both have weight 10. Hugo sorts Terraform before ClickHouse when weights are equal.Was this helpful? React 👍 or 👎
🤖 Datadog Autotest · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest · Open Bits AI session