はじめに
Arch Linux 上で fluentd を動かすときのメモです
最低限必要なもの
pacman -Sy base-devel ruby
fluentd のインストール
pacman に無いので gem で入れる
systemd で管理したい場合は必ず --no-user-install
をつける
gem install fluentd --no-ri --no-rdoc --no-user-install
fluentd のセットアップ
パスの確認
which fluentd # => /usr/bin/fluentd
セットアップ
fluentd --setup
fluentd plugin のインストール
fluentd に プラグインを入れる場合は fluent-gem
コマンドと --no-user-install
オプションを使用する
e.g.
fluent-gem install fluent-plugin-mongo --no-user-install
fluentd を systemd で管理
/etc/systemd/system/fluentd.service
[Unit]
Description=Fluentd daemon
[Service]
ExecStart=/usr/bin/fluentd
Restart=always
[Install]
WantedBy=multi-user.target