Skip to content
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

[O11y][MySQL] Update query for performance data stream #38363

Merged
merged 21 commits into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
444ea6c
mysql update query
harnish-elastic Mar 14, 2024
1aa4011
add changelog entry
harnish-elastic Mar 18, 2024
465e2c4
Merge branch 'main' of https://github.com/harnish-elastic/beats into …
harnish-elastic Mar 18, 2024
0e87886
mage check command
harnish-elastic Mar 18, 2024
78a997b
make update
harnish-elastic Mar 26, 2024
b0ab6ce
change in python version to fix CI issue
harnish-elastic Mar 27, 2024
40c85b4
update python version
harnish-elastic Apr 3, 2024
bf21a73
Merge branch 'main' of https://github.com/harnish-elastic/beats into …
harnish-elastic Apr 3, 2024
7167af7
Merge branch 'main' into mysql-update-query
shmsr Apr 3, 2024
92e8b82
revert changes of python file
harnish-elastic Apr 3, 2024
a86fb55
Merge branch 'mysql-update-query' of https://github.com/harnish-elast…
harnish-elastic Apr 3, 2024
99b6521
revert install-tools.bat file changes
harnish-elastic Apr 3, 2024
0e74215
Merge branch 'main' of https://github.com/harnish-elastic/beats into …
harnish-elastic May 9, 2024
0e7dd32
Merge branch 'main' of https://github.com/harnish-elastic/beats into …
harnish-elastic May 9, 2024
cd1389a
Merge branch 'main' into mysql-update-query
harnish-elastic May 15, 2024
93484cb
Merge branch 'main' of https://github.com/harnish-elastic/beats into …
harnish-elastic May 16, 2024
be607aa
Merge branch 'mysql-update-query' of https://github.com/harnish-elast…
harnish-elastic May 16, 2024
f7887f6
Merge branch 'main' of https://github.com/harnish-elastic/beats into …
harnish-elastic May 20, 2024
5a872a4
address review comments
harnish-elastic May 20, 2024
597b246
address review comments
harnish-elastic May 21, 2024
ee6582e
revert schema to schemaname to avoid error
harnish-elastic May 31, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@ https://github.com/elastic/beats/compare/v8.8.1\...main[Check the HEAD diff]
- Align on the algorithm used to transform Prometheus histograms into Elasticsearch histograms {pull}36647[36647]
- Add linux IO metrics to system/process {pull}37213[37213]
- Add new memory/cgroup metrics to Kibana module {pull}37232[37232]
- Support schema_name for MySQL performance metricset {pull}38363[38363]
- Add SSL support to mysql module {pull}37997[37997]
- Add SSL support for aerospike module {pull}38126[38126]
- Add last_terminated_timestamp metric in kubernetes module {pull}39200[39200] {issue}3802[3802]
Expand Down
9 changes: 9 additions & 0 deletions metricbeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -53661,6 +53661,15 @@ type: long

--

*`mysql.performance.events_statements.schemaname`*::
+
--
Schema name.

type: keyword

--

[float]
=== table_io_waits

Expand Down
2 changes: 1 addition & 1 deletion metricbeat/module/mysql/fields.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

80 changes: 50 additions & 30 deletions metricbeat/module/mysql/performance/_meta/data.json
Original file line number Diff line number Diff line change
@@ -1,62 +1,82 @@
{
"@timestamp": "2020-07-13T13:43:28.495Z",
"@timestamp": "2024-02-27T07:33:02.881Z",
"@metadata": {
"beat": "metricbeat",
"type": "_doc",
"version": "8.0.0"
},
"event": {
"duration": 1379935,
"dataset": "mysql.performance",
"module": "mysql"
},
"metricset": {
"name": "performance",
"period": 10000
},
"service": {
"address": "tcp(172.17.0.2:3306)/",
"type": "mysql"
"version": "8.14.0"
},
"mysql": {
"performance": {
"events_statements": {
"digest": {
"text": "SELECT @@SESSION . `auto_increment_increment` AS `auto_increment_increment` , @@`character_set_client` AS `character_set_client` , @@`character_set_connection` AS `character_set_connection` , @@`character_set_results` AS `character_set_results` , @@`character_set_server` AS `character_set_server` , @@`collation_server` AS `collation_server` , @@`collation_connection` AS `collation_connection` , @@`init_connect` AS `init_connect` , @@`interactive_timeout` AS `interactive_timeout` , @@`license` AS `license` , @@`lower_case_table_names` AS `lower_case_table_names` , @@`max_allowed_packet` AS `max_allowed_packet` , @@`net_write_timeout` AS `net_write_timeout` , @@`performance_schema` AS `performance_schema` , @@`sql_mode` AS `sql_mode` , @@`system_time_zone` AS `system_time_zone` , @@`time_zone` AS `time_zone` , @@`transaction_isolation` AS `transaction_isolation` , @@`wait_timeout` AS `wait_timeout`"
"text": "SHOW SCHEMAS"
},
"count": {
"star": 2
"star": 5
},
"avg": {
"timer": {
"wait": 1.78294e+08
"wait": 1.6439131e+10
}
},
"max": {
"timer": {
"wait": 1.89622e+08
"wait": 4.0834164e+10
}
},
"last": {
"seen": "2020-07-13 10:04:47.709230"
"seen": "2024-02-27 06:44:17.296246"
},
"quantile": {
"95": 1.90546071e+08
}
"95": 4.1686938347e+10
},
"schema": "performance_schema"
}
}
},
"ecs": {
"version": "1.5.0"
},
"host": {
"name": "mcastro"
"id": "41359f29035549cda159ae8d1a533d72",
"containerized": false,
"ip": [
"127.0.0.1"
],
"name": "localhost",
"mac": [
"86-32-76-45-EB-2B"
],
"hostname": "localhost",
"architecture": "x86_64",
"os": {
"name": "CentOS Linux",
"kernel": "3.10.0-1160.102.1.el7.x86_64",
"codename": "Core",
"type": "linux",
"platform": "centos",
"version": "7 (Core)",
"family": "redhat"
}
},
"agent": {
"id": "803dfdba-e638-4590-a2de-80cb1cebe78d",
"name": "mcastro",
"type": "metricbeat",
"version": "8.0.0",
"ephemeral_id": "f87e6edc-2f37-45f2-9644-b67b1834abfd"
"version": "8.14.0",
"ephemeral_id": "539a163b-91ab-433c-9893-31a48d09b5a7",
"id": "e5bcfbf0-4c74-44dd-b711-c5e90a69ab7a",
"name": "localhost"
},
"ecs": {
"version": "8.0.0"
},
"event": {
"dataset": "mysql.performance",
"module": "mysql",
"duration": 14244062
},
"metricset": {
"period": 10000,
"name": "performance"
},
"service": {
"address": "tcp(127.0.0.1:3306)/?readTimeout=10s&timeout=10s&writeTimeout=10s",
"type": "mysql"
}
}
3 changes: 3 additions & 0 deletions metricbeat/module/mysql/performance/_meta/fields.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
- name: 'avg.timer.wait'
type: long
description: Average wait time of the summarized events that are timed
- name: 'schema'
type: keyword
description: Schema name.
- name: table_io_waits
type: group
description: Records table I/O waits by index
Expand Down
2 changes: 1 addition & 1 deletion metricbeat/module/mysql/performance/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ input:
namespace: performance
queries:
- query: >
SELECT digest_text, count_star, avg_timer_wait, max_timer_wait, last_seen /*!80001 ,quantile_95 */
SELECT schema_name AS schema, digest_text, count_star, avg_timer_wait, max_timer_wait, last_seen /*!80001 ,quantile_95 */
FROM performance_schema.events_statements_summary_by_digest
ORDER BY avg_timer_wait DESC
LIMIT 10;
Expand Down
Loading