LoginSignup
2
2

More than 5 years have passed since last update.

Fluentdでほんとにパースされてるのかを全力で確認したいんです。

Last updated at Posted at 2012-09-27
parser.rb
require 'fluent/log'
require 'fluent/config'
require 'fluent/parser'
require 'fluent/engine'

require 'time'

log = ''
format = //
time_format = ''

parser = Fluent::TextParser::RegexpParser.new(format, :time_format => time_format)

puts parser.call(log)

logにnginxやapacheのログを1行はる
formatにfluentdのconfファイルのformatをそのままはる
time_formatは良しなに。

テンションあがれば、もうちょっと詳しく書く。

2
2
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2