Skip to content
This repository was archived by the owner on Apr 2, 2024. It is now read-only.
This repository was archived by the owner on Apr 2, 2024. It is now read-only.

MySQL Slow Query Log Decoder issue #1993

@ytc301

Description

@ytc301

[hekad]
maxprocs = 2
#base_dir = "./base_dir"
share_dir = "/usr/share/heka"
#log_info_filename = "logs/info.log"
#log_error_filename = "logs/error.log"
#log_file_max_size = 64
#log_file_max_backups = 7

[Sync-1_5-SlowQuery]
type = "LogstreamerInput"
log_directory = "/data/soft/"
file_match = 'mysqlslowq.log'
parser_type = "regexp"
delimiter = "\n(# User@Host:)"
delimiter_location = "start"
decoder = "MySqlSlowQueryDecoder"

[MySqlSlowQueryDecoder]
type = "SandboxDecoder"
filename = "lua_decoders/mysql_slow_query.lua"

[MySqlSlowQueryDecoder.config]
truncate_sql = 64

[ESJsonEncoder]
index = "%{Type}-%{%Y.%m.%d}"
es_index_from_timestamp = true
type_name = "%{Type}"
[ESJsonEncoder.field_mappings]
Timestamp = "@timestamp"
Severity = "level"

[output_file]
type = "FileOutput"
message_matcher = "TRUE"
path = "/data/mysql-output.log"
perm = "666"
flush_count = 100
flush_operator = "OR"
encoder = "ESJsonEncoder"

#######################################################################

[root@oskey heka]# hekad -config="mysql.toml"

2018/01/25 09:59:20 Pre-loading: [output_file]
2018/01/25 09:59:20 Pre-loading: [Sync-1_5-SlowQuery]
2018/01/25 09:59:20 Pre-loading: [MySqlSlowQueryDecoder]
2018/01/25 09:59:20 Pre-loading: [ESJsonEncoder]
2018/01/25 09:59:20 Pre-loading: [ProtobufDecoder]
2018/01/25 09:59:20 Loading: [ProtobufDecoder]
2018/01/25 09:59:20 Pre-loading: [ProtobufEncoder]
2018/01/25 09:59:20 Loading: [ProtobufEncoder]
2018/01/25 09:59:20 Pre-loading: [TokenSplitter]
2018/01/25 09:59:20 Loading: [TokenSplitter]
2018/01/25 09:59:20 Pre-loading: [HekaFramingSplitter]
2018/01/25 09:59:20 Loading: [HekaFramingSplitter]
2018/01/25 09:59:20 Pre-loading: [NullSplitter]
2018/01/25 09:59:20 Loading: [NullSplitter]
2018/01/25 09:59:20 Loading: [MySqlSlowQueryDecoder]
2018/01/25 09:59:20 Loading: [ESJsonEncoder]
2018/01/25 09:59:20 Loading: [Sync-1_5-SlowQuery]
2018/01/25 09:59:20 unknown config setting for 'Sync-1_5-SlowQuery': parser_type
2018/01/25 09:59:20 Loading: [output_file]
2018/01/25 09:59:20 Error reading config: 1 errors loading plugins

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions