fluentd-ui/app/models/fluentd/setting/in_tail.rb
Kenji Okimoto e8aa3ae60d
Remove unused grok support
Signed-off-by: Kenji Okimoto <okimoto@clear-code.com>
2018-08-17 14:16:06 +09:00

36 lines
681 B
Ruby

require "fluent/plugin/parser_multiline"
class Fluentd
module Setting
class InTail
include Fluentd::Setting::Plugin
register_plugin("input", "tail")
# TODO support formatN ???
MULTI_LINE_MAX_FORMAT_COUNT = ::Fluent::Plugin::MultilineParser::FORMAT_MAX_NUM
def guess_parse_type
case path
when /\.json$/
:json
when /\.csv$/
:csv
when /\.tsv$/
:tsv
when /\.ltsv$/
:ltsv
when /nginx/
:nginx
when /apache/
:apache2
when %r|/var/log|
:syslog
else
:regexp
end
end
end
end
end