- 필수 기능
- 시작하기
- Glossary
- 표준 속성
- Guides
- Agent
- 통합
- 개방형텔레메트리
- 개발자
- API
- Datadog Mobile App
- CoScreen
- Cloudcraft
- 앱 내
- 서비스 관리
- 인프라스트럭처
- 애플리케이션 성능
- APM
- Continuous Profiler
- 스팬 시각화
- 데이터 스트림 모니터링
- 데이터 작업 모니터링
- 디지털 경험
- 소프트웨어 제공
- 보안
- AI Observability
- 로그 관리
- 관리
The Datadog MySQL integration can collect metrics from custom queries.
Follow the configuration details in the MySQL conf.yaml file. Additional items of consideration are below.
When adding a custom query to the MySQL conf.yaml, each table referenced must have the database qualified. This is done by prepending the table with its database name in the following format:
SELECT * FROM database_name.table_name WHERE...
If you omit the database name, the Agent fails to run the query with the error: No database selected
.
The names applied to your query metrics are taken as provided (there are no prepends). For example, your metric name could be: myapp.custom_query.test
.
By default your metrics are collected by the MySQL check every 15-20 seconds. To query these metrics at a different frequency, reduce the frequency of the entire MySQL check (this affects the frequency of your general mysql.*
metrics), or run a custom scheduled CRON script to submit metrics with the API or DogStatsD.
Running a large number of custom queries from the MySQL check can delay other Agent checks. If you need to collect metrics from a large number of custom MySQL queries, run a custom scheduled CRON script to submit metrics with the API or DogStatsD.
You have a database named tester
with the table test_table
that contains the following data:
col_1 | col_2 | col_3
---------------------
1 | a | a
2 | b | b
3 | c | c
Adding the following custom query to your MySQL conf.yaml
collects the metric myapp.custom_query.test.b
with a value of 2
.
custom_queries:
- query: SELECT col_1 FROM tester.test_table WHERE col_2 = 'b'
columns:
- name: myapp.custom_query.test.b
type: gauge
tags:
- tester:mysql
추가 유용한 문서, 링크 및 기사: