FreeBSD + Quagga 0.99.14の環境において,しばらく稼働しているとbgpdのvtyが応答しなくなる現象が確認されています.この現象は,quaggaを再起動すると回復します. Looking Glassを立ち上げている人は,watchquaggaまたはmonitなどの外部プログラムを利用して,vtyが無応答になったら再起動するように仕掛けを入れるとよいでしょう.本ページでは,monitを利用してQuaggaのbgpdを監視し,vtyが刺さったら自動的に再起動するための手順を紹介します. monitのインストール FreeBSDの場合,ports経由でインストールを行うことができます. % cd /usr/ports % sudo portinstall sysutils/monit /etc/rc.confにmonit_enable="YES"を追加しておきましょう. 設定ファイル /usr/local/etc/monitに,以下のように記述します. set daemon 60 with start delay 15 set logfile syslog facility log_daemon set idfile /var/monit/.monit.id set statefile /var/monit/.monit.state set mailserver localhost set alert root@example.com set httpd port 2812 and use address localhost # only accept connection from localhost allow localhost # allow localhost to connect to the server and check process bgpd with pidfile /var/run/quagga/bgpd.pid start program = "/usr/local/etc/rc.d/quagga start" stop program = "/usr/local/etc/rc.d/quagga stop" if failed host localhost port 2605 type tcp send "" expect ".*assword: " then restart if 3 restarts within 5 cycles then timeout group quagga また,/var/monitディレクトリを作成しておきましょう. % sudo mkdir /var/monit 起動 % sudo /usr/local/etc/rc.d/monit start |
IHANet Home > samples >