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

SQL module now supports key/value mode #15845

Merged
merged 25 commits into from
Jan 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
d68d069
New option: sql_response_format
rvillablanca Jan 25, 2020
cae3b0f
passing current x-pack/metricbeat/module/sql/query tests
rvillablanca Jan 25, 2020
63094f5
Testing with variable mode
rvillablanca Jan 25, 2020
4034721
docs and refactor
rvillablanca Jan 25, 2020
088f597
Only one event when mode is variable (key/value)
rvillablanca Jan 25, 2020
c81e31f
Some refactor names
rvillablanca Jan 25, 2020
19ccf0f
formatting and updating files
rvillablanca Jan 26, 2020
7196a64
Update x-pack/metricbeat/module/sql/query/query_integration_test.go
rvillablanca Jan 26, 2020
4e5d8b4
Merge branch 'ft/key-value-mode-sql-module' of github.com:rvillablanc…
rvillablanca Jan 26, 2020
5744c19
Data tests files after running tests
rvillablanca Jan 26, 2020
a7b5b4c
Making response_format optional
rvillablanca Jan 26, 2020
8666fc9
Update test data files
rvillablanca Jan 26, 2020
192bd7d
Update CHANGELOG
rvillablanca Jan 26, 2020
207c037
Generated docs
rvillablanca Jan 26, 2020
e4e35b9
Update CHANGELOG.next.asciidoc
rvillablanca Jan 26, 2020
d321817
Change response_format parameter name
rvillablanca Jan 26, 2020
349f554
Revert of unwanted changes
rvillablanca Jan 26, 2020
61b82ee
Merge branch 'ft/key-value-mode-sql-module' of github.com:rvillablanc…
rvillablanca Jan 26, 2020
bd04878
Finally succeed running mage fmt update :)
rvillablanca Jan 26, 2020
078fb01
Merge remote-tracking branch 'origin/master' into ft/key-value-mode-s…
rvillablanca Jan 27, 2020
1089bf0
Revert of changes in tests
rvillablanca Jan 27, 2020
d46cff6
Default response_format value
rvillablanca Jan 27, 2020
6dda975
Merge remote-tracking branch 'origin/master' into ft/key-value-mode-s…
rvillablanca Jan 27, 2020
a5ca134
New test data files
rvillablanca Jan 27, 2020
f61a41a
Merge branch 'master' into ft/key-value-mode-sql-module
jsoriano Jan 27, 2020
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 @@ -106,6 +106,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d
- Add mesh metricset for Istio Metricbeat module {pull}15535[15535]
- Add mixer metricset for Istio Metricbeat module {pull}15696[15696]
- Make the `system/cpu` metricset collect normalized CPU metrics by default. {issue}15618[15618] {pull}15729[15729]
- Add `key/value` mode for SQL module. {issue}15770[15770] {pull]15845[15845]
- Add STAN dashboard {pull}15654[15654]
- Add support for Unix socket in Memcached metricbeat module. {issue}13685[13685] {pull}15822[15822]

Expand Down
2 changes: 1 addition & 1 deletion metricbeat/docs/modules/sql.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ metricbeat.modules:

driver: "postgres"
sql_query: "select now()"

sql_response_format: table
----

[float]
Expand Down
2 changes: 1 addition & 1 deletion x-pack/metricbeat/metricbeat.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -988,7 +988,7 @@ metricbeat.modules:

driver: "postgres"
sql_query: "select now()"

sql_response_format: table

#--------------------------------- Stan Module ---------------------------------
- module: stan
Expand Down
2 changes: 1 addition & 1 deletion x-pack/metricbeat/module/sql/_meta/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@

driver: "postgres"
sql_query: "select now()"

sql_response_format: table
364 changes: 358 additions & 6 deletions x-pack/metricbeat/module/sql/query/_meta/data.json

Large diffs are not rendered by default.

30 changes: 30 additions & 0 deletions x-pack/metricbeat/module/sql/query/_meta/data_mysql_tables.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"@timestamp": "2017-10-12T08:05:34.853Z",
"event": {
"dataset": "sql.query",
"duration": 115000,
"module": "sql"
},
"metricset": {
"name": "query",
"period": 10000
},
"service": {
"address": "172.21.0.2:3306",
"type": "sql"
},
"sql": {
"driver": "mysql",
"metrics": {
"numeric": {
"table_rows": 1
},
"string": {
"engine": "MyISAM",
"table_name": "db",
"table_schema": "mysql"
}
},
"query": "select table_schema, table_name, engine, table_rows from information_schema.tables where table_rows \u003e 0;"
}
}
Loading