今回はホストの冗長化するのに使う keepalived のログを rsyslog と logrotate を使ってローテーションさせる方法について書く。 検証環境には CentOS7 を使った。 $ cat /etc/redhat-release CentOS Linux release 7.1.1503 (Core) $ uname -r 3.10.0-229.11.1.el7.x86_64 デフォルトの状態で keepalived を動かす まずは keepalived と rsyslog をインストールしておく。 $ sudo yum -y install keepalived rsyslog 今回は keepalived を動かすこと自体が目的ではないので設定は最低限に留める。 以下の設定で enp0s8 インターフェースに仮想 IP アドレス (VIP) を付けることができる。