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 4 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
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]
== com Fields
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about "com". Perhaps we could name it "commands" or "queries"? @ruflin, what do you think?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like command, but would keep it singular.





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

type: long



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

type: long



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

type: long



[float]
=== mysql.status.com.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 @@
}
}
},
"com": {
"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 @@
}
}
},
"com": {
"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
},
"com": {
"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: com
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"),
"com": s.Object{
"delete": c.Int("Com_delete"),
"insert": c.Int("Com_insert"),
"select": c.Int("Com_select"),
"update": c.Int("Com_update"),
},
}
)

Expand Down