Skip to content

Commit

Permalink
Add support for SQL responses in key/value format (elastic#15845)
Browse files Browse the repository at this point in the history
There are some queries like mysql `SHOW STATUS` that display the
results in a key/value format so they need to be scanned in a different
way, being the key the first column of the response and the value the
second one.

(cherry picked from commit d8517c6)
  • Loading branch information
rvillablanca authored and jsoriano committed Jan 27, 2020
1 parent b8667bd commit a41a4d6
Show file tree
Hide file tree
Showing 13 changed files with 1,481 additions and 47 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,9 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d
- Enable script processor. {pull}14711[14711]
- Add mixer metricset for Istio Metricbeat module {pull}15696[15696]
- Add mesh metricset for Istio Metricbeat module{pull}15535[15535]
- 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]

*Packetbeat*
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
Loading

0 comments on commit a41a4d6

Please sign in to comment.