LoginSignup
3
3

More than 5 years have passed since last update.

fluentdのプロセス名を変更するプラグインを書いた

Last updated at Posted at 2014-12-26

fluentd(やtd-agent)を運用しているとプロセス名が長くてmultiprocessプラグインを利用している際にパッ見どのプロセスがどのconfを読んでるのかわかりづらい。

12236 td-agent  20   0  693m 374m 3200 S 78.4  1.2  92:29.95 /opt/td-agent/embedded/bin/ruby /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.10.57/l...
12223 td-agent  20   0  486m 263m 3064 S 64.5  0.8  34:25.63 /opt/td-agent/embedded/bin/ruby /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.10.57/l...

なので起動時にProcess.setproctitle呼ぶだけのプラグインを書いた。

設定はインプットプラグインとして記述する。

fluentd.conf
<source>
  type setproctitle
  proctitle cubicdaiya-fluentd
</source>

というわけでピクシブ在籍時はfluentd関連業務をほぼ@harukasanに丸投げしていた僕もとうとうFluentd plugin author(大げさ)になりました。最近の仕事はElasticsearch、Fluentd、Kibana、Norikra、BigQueryと格闘しながらnginx.confとPHPとRubyとGoを書くことです。

3
3
0

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
3
3