-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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 mariadb slowlog #9731
Support mariadb slowlog #9731
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there are 2 options moving forward. We get this PR in mostly as is and do ECS conversion afterwards or do it directly in the PR. Normally I would say all new modules should be ECS but this is a take over of code.
filebeat/module/mariadb/_meta/kibana/5/dashboard/Filebeat-MariaDB-Dashboard.json
Outdated
Show resolved
Hide resolved
@ruflin thanks for the review. There are still some things I want to test, specially related to the possible merge with the mysql module, and some cleanup is also pending. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good. See comments
update field name from mariadb.slowlog.query_time.sec to mariadb.slowlog.query_time.sec
21c7ad4
to
dca81c5
Compare
Code has changed a lot, comments were on discarded mariadb module.
Finally merged all grok expressions on the mysql module, so it supports both MySQL and MariaDB. This would be ready for review. |
4b62bd5
to
a703ae1
Compare
], | ||
"pattern_definitions" : { | ||
"GREEDYMULTILINE" : "(.|\n)*" | ||
"GREEDYMULTILINE": "(.|\n)*", | ||
"METRICSPACE": "([ #\n]*)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This pattern is introduced to separate metrics, this way it doesn't matter if they are separated only by spaces or in different lines. This will help to support new metrics when introduced, and to support different implementations. For example in percona Rows_affected
is in the same line after Rows_examined
, but in MariaDB it is in the next line.
It still requires that metrics appear in the same order, but I haven't seen differences in order between implementations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. But could you rebase on master so at least Travis goes green?
Rebased, added a more complete mariadb slowlog, and added a pattern to ignore by now the explain section that can be optionally added. |
Add support for MariaDB in the Filebeat module for MySQL. slowlog grok pattern is modified to support more versions of this log file and to make it easier to support more in the future. More example files are added to test this. (cherry picked from commit 4140305) Co-authored-by: Rodrigo Floriano de Souza <[email protected]>
Add support for MariaDB in the Filebeat module for MySQL. slowlog grok pattern is modified to support more versions of this log file and to make it easier to support more in the future. More example files are added to test this. (cherry picked from commit 4140305) Co-authored-by: Rodrigo Floriano de Souza <[email protected]>
@jsoriano thank you for adding mariadb/percona slowlog support. will it be released in the next 6.5.5 version? |
@idonda this will probably get released first on 6.7.0. |
Grok expression in mysql slowlog fileset is modified to support also mariadb.
Continuation of #7422