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

Support MySQL 8, Percona and MariaDB in metricbeat #10261

Merged
merged 11 commits into from
Jan 23, 2019
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d
- Release http.server metricset as GA. {pull}10240[10240]
- Release Nats module as GA. {pull}10281[10281]
- Release use of xpack.enabled: true flag in Elasticsearch and Kibana modules as GA. {pull}10222[10222]
- Add support for MySQL 8.0 and tests also for Percona and MariaDB. {pull}10261[10261]

*Packetbeat*

Expand Down
12 changes: 11 additions & 1 deletion NOTICE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -906,7 +906,8 @@ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR I

--------------------------------------------------------------------
Dependency: github.com/go-sql-driver/mysql
Revision: 9dee4ca50b83acdf57a35fb9e6fb4be640afa2f3
Version: v1.4.1
Revision: 72cd26f257d44c1114970e19afddcd812016007e
License type (autodetected): MPL-2.0
./metricbeat/module/mysql/vendor/github.com/go-sql-driver/mysql/LICENSE:
--------------------------------------------------------------------
Expand Down Expand Up @@ -3155,6 +3156,15 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

--------------------------------------------------------------------
Dependency: google.golang.org/appengine
Revision: e9657d882bb81064595ca3b56cbe2546bbabf7b1
License type (autodetected): Apache-2.0
./metricbeat/module/mysql/vendor/google.golang.org/appengine/LICENSE:
--------------------------------------------------------------------
Apache License 2.0


--------------------------------------------------------------------
Dependency: gopkg.in/inf.v0
Revision: 3887ee99ecf07df5b447e9b00d9c0b2adaa9f3e4
Expand Down
35 changes: 34 additions & 1 deletion metricbeat/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,40 @@ services:
build: ./module/munin/_meta

mysql:
build: ./module/mysql/_meta
build:
context: ./module/mysql/_meta
args:
MYSQL_IMAGE: mysql:5.7.24

mysql_8_0:
build:
context: ./module/mysql/_meta
args:
MYSQL_IMAGE: mysql:8.0.13

percona_5_7:
build:
context: ./module/mysql/_meta
args:
MYSQL_IMAGE: percona:5.7.24

percona_8_0:
build:
context: ./module/mysql/_meta
args:
MYSQL_IMAGE: percona:8.0.13-4

mariadb_10_2:
build:
context: ./module/mysql/_meta
args:
MYSQL_IMAGE: mariadb:10.2.17

mariadb_10_3:
build:
context: ./module/mysql/_meta
args:
MYSQL_IMAGE: mariadb:10.3.12

nats:
build: ./module/nats/_meta
Expand Down
5 changes: 3 additions & 2 deletions metricbeat/docs/modules/mysql.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ precedence over those specified in the `username` and `password` config options.
[float]
=== Compatibility

The mysql MetricSets were tested with mysql 5.7.12 and are expected to work with
all versions >= 5.7.0.
The mysql MetricSets were tested with MySQL and Percona 5.7 and 8.0 and are expected
to work with all versions >= 5.7.0.
It is also tested with MariaDB 10.2 and 10.3.

[float]
=== Dashboard
Expand Down
9 changes: 6 additions & 3 deletions metricbeat/module/mysql/_meta/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
FROM mysql:5.7.12
RUN apt-get update && apt-get install -y netcat
HEALTHCHECK --interval=1s --retries=90 CMD nc -z localhost 3306
ARG MYSQL_IMAGE=mysql:5.7.12
FROM $MYSQL_IMAGE

ENV MYSQL_ROOT_PASSWORD test

HEALTHCHECK --interval=1s --retries=90 CMD mysql -u root -p$MYSQL_ROOT_PASSWORD -P 3306 -e "SELECT 1"

COPY test.cnf /etc/mysql/conf.d/test.cnf
5 changes: 3 additions & 2 deletions metricbeat/module/mysql/_meta/docs.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ precedence over those specified in the `username` and `password` config options.
[float]
=== Compatibility

The mysql MetricSets were tested with mysql 5.7.12 and are expected to work with
all versions >= 5.7.0.
The mysql MetricSets were tested with MySQL and Percona 5.7 and 8.0 and are expected
to work with all versions >= 5.7.0.
It is also tested with MariaDB 10.2 and 10.3.

[float]
=== Dashboard
Expand Down
2 changes: 2 additions & 0 deletions metricbeat/module/mysql/_meta/test.cnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[mysqld]
bind-address = 0.0.0.0

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

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

Loading