2
票
Ruby の Proc.new/lambda 内 で正規表現 $1 参照
次のように書くしかないと思われます。
@@patterns = [
[Regexp.compile("hoge", true), lambda{|x|x}],
[Regexp.compile("piyo", true), Proc.new{|x| x.downcase}],
[Regexp.compile("huga", true), lambda{|x|"#{...
1
票
Accepted
fluentd で改行やカンマをエスケープしてCSV出力する方法
ファイル名を /etc/fluentd/plugin/api_log.rb から /etc/fluentd/plugin/formatter_api_log.rb に変更してみてください。
1
票
Accepted
gem update 時に対話入力をスキップする方法
LinuxライクなOSであれば、yesコマンドを使う方法があります。
$ yes | fluent-gem update --no-ri --no-rdoc
yesコマンドは実行するとyと標準出力に表示し続けるので、パイプで任意のコマンドの入力として渡せばすべてにy(yes)と答えたことになります。
参考:
How to default the [Yn] responses for the ...
1
票
td-agentがamazon linux 2でapacheのログ収集ができない
/lib/systemd/system/td-agent.service
上記ファイルのUserとGroupをrootにしたら解決しました。
参考
https://qiita.com/comefigo/items/faf6983dbc405791c070
1
票
Accepted
fluentd v0.14でfluent-plugin-datacounterが動かない
コメントにあります通りアップデートしたら改善されました。
td-agent-gem update fluentd
Only top scored, non community-wiki answers of a minimum length are eligible
関連するタグ
fluentd × 15ruby × 4
正規表現 × 2
rubygems × 2
elasticsearch × 2
ruby-on-rails × 1
linux × 1
aws × 1
centos × 1
json × 1
apache × 1
amazon-linux × 1
grep × 1
systemd × 1