From 587f63729655a464582f2bbb5d63d657a0dc3e3b Mon Sep 17 00:00:00 2001 From: Philipp Dallig Date: Thu, 29 Jun 2017 15:17:12 +0200 Subject: [PATCH] Add first logstash informations for mysql --- classes/infra::profile::logstash::mysql.yaml | 31 ++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 classes/infra::profile::logstash::mysql.yaml diff --git a/classes/infra::profile::logstash::mysql.yaml b/classes/infra::profile::logstash::mysql.yaml new file mode 100644 index 00000000..93176676 --- /dev/null +++ b/classes/infra::profile::logstash::mysql.yaml @@ -0,0 +1,31 @@ +--- +infra::profile::logstash::mysql::resources: + mysql_error: + resource: file + order: 10 # Input + parameters: + path: + - '/var/log/mariadb/mariadb.log' + - '/var/log/mariadb/mysql.log' + - '/var/log/mariadb/error.log' + - '/var/log/mysql/mysql.log' + - '/var/log/mysql/mariadb.log' + - '/var/log/mysql/error.log' + - '/var/log/mysqld.log' + type: mysql-error + tags: + - "%{customer}" + - "%{tier}" + codec: + type: multiline + what: previous + negate: true + pattern: '%%{ich-trickse}{TIMESTAMP_ISO8601:time} *%%{ich-trickse}{INT:threadid}? *\[%%{ich-trickse}{WORD:loglevel}\] *%%{ich-trickse}{GREEDYDATA:restmessage}' + mysql_filter: + condition: 'if [type] == "mysql-error"' + resource: grok + order: 40 # Filter + parameters: + match: + - message + - '%%{ich-trickse}{TIMESTAMP_ISO8601:time} *%%{ich-trickse}{INT:threadid}? *\[%%{ich-trickse}{WORD:loglevel}\] *%%{ich-trickse}{GREEDYDATA:restmessage}' \ No newline at end of file -- 2.39.5