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

Add query count to metricbeat's mysql plugin output #3251

Merged
merged 5 commits into from
Jan 3, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ https://github.com/elastic/beats/compare/v5.0.2...v5.1.1[View commits]
- Add support for MongoDB 3.4 and WiredTiger metrics. {pull}2999[2999]
- Add experimental kafka module with partition metricset. {pull}2969[2969]
- Add raw config option for mysql/status metricset. {pull}3001[3001]
- Add command fileds for mysql/status metricset. {pull}3251[3251]

*Filebeat*

Expand Down
34 changes: 34 additions & 0 deletions metricbeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3463,6 +3463,40 @@ type: long



[float]
== command Fields




[float]
=== mysql.status.command.delete

type: long



[float]
=== mysql.status.command.insert

type: long



[float]
=== mysql.status.command.select

type: long



[float]
=== mysql.status.command.update

type: long



[[exported-fields-nginx]]
== Nginx Fields

Expand Down
16 changes: 16 additions & 0 deletions metricbeat/metricbeat.template-es2x.json
Original file line number Diff line number Diff line change
Expand Up @@ -1885,6 +1885,22 @@
}
}
},
"command": {
"properties": {
"delete": {
"type": "long"
},
"insert": {
"type": "long"
},
"select": {
"type": "long"
},
"update": {
"type": "long"
}
}
},
"connections": {
"type": "long"
},
Expand Down
16 changes: 16 additions & 0 deletions metricbeat/metricbeat.template.json
Original file line number Diff line number Diff line change
Expand Up @@ -1878,6 +1878,22 @@
}
}
},
"command": {
"properties": {
"delete": {
"type": "long"
},
"insert": {
"type": "long"
},
"select": {
"type": "long"
},
"update": {
"type": "long"
}
}
},
"connections": {
"type": "long"
},
Expand Down
6 changes: 6 additions & 0 deletions metricbeat/module/mysql/status/_meta/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@
"received": 992,
"sent": 40657
},
"command": {
"delete": 0,
"insert": 0,
"select": 9,
"update": 0
},
"connections": 11,
"created": {
"tmp": {
Expand Down
20 changes: 20 additions & 0 deletions metricbeat/module/mysql/status/_meta/fields.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,23 @@
- name: opened_tables
type: long
description: >

- name: command
type: group
description: >
fields:
- name: delete
type: long
description: >

- name: insert
type: long
description: >

- name: select
type: long
description: >

- name: update
type: long
description: >
6 changes: 6 additions & 0 deletions metricbeat/module/mysql/status/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ var (
"tables": c.Int("Open_tables"),
},
"opened_tables": c.Int("Opened_tables"),
"command": s.Object{
"delete": c.Int("Com_delete"),
"insert": c.Int("Com_insert"),
"select": c.Int("Com_select"),
"update": c.Int("Com_update"),
},
}
)

Expand Down