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

MySQL Slow Query Log Decoder issue #1993

Open
ytc301 opened this issue Jan 25, 2018 · 1 comment
Open

MySQL Slow Query Log Decoder issue #1993

ytc301 opened this issue Jan 25, 2018 · 1 comment

Comments

@ytc301
Copy link

ytc301 commented Jan 25, 2018

[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

@robison
Copy link

robison commented Jan 25, 2018

Please read the LogstreamerInput docs - parser_type is not a valid config setting for LogstreamerInput.

Additionally, this project has been deprecated for 18 months.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants