2009-10-16 Fri

[別の年の同じ日: 2003 2004 2005 2006 2007 2008 2011

第23回 呑会 はてぶ

偶数月なので,呑やの呑会に参加してきました.

今回のテーマは『ひやおろし』.

ひやおろしとは,冬に醸造したあと秋まで貯蔵・熟成させた酒のことで,
出荷の際,火入れをしないで冷えたままで卸すことから,
ひやおろしと呼ばれるそうです.

今回のメニュー
- 東洋美人(山口県萩市)
  - 純米吟醸
- 陸奥男山(青森県八戸市)
  - 純米酒
- 佐久乃花(長野県佐久市)
  - 純米吟醸 無濾過原酒 瓶火入れ
- 青煌(山梨県北杜市)
  - 純米 瓶火入れ
- 白岳仙(福井県福井市)
  - 純米酒
- 鳳凰美田(栃木県小山市)
  - 純米吟醸

あとで書く.

- 酒食 呑や
  http://www.syushoku-nomiya.com/


- 第 20 回 呑会 [2009-02-20-1]
- 呑や 忘年会 [2008-12-19-1]
- 第 17 回呑会 @ 呑や [2008-06-20-1]

monit で MyDNS を監視 はてぶ

とりあえず,以下のような感じで監視は可能

/etc/monit.d/mydns.conf

check process mydns with pidfile /var/run/mydns.pid
    start program = "/etc/init.d/mydns start"
    stop program = "/etc/init.d/mydns stop"
    if failed port 53 type udp then restart
    if 5 restarts within 5 cycles then timeout


port を監視しているだけなので,port は開いているけど,
反応が返ってこないという場合が考えられるので,いまいち.

調べたら,monit は DNS のプロトコルを理解できるようなので,
以下のように,protocol を指定.

check process mydns with pidfile /var/run/mydns.pid
    start program = "/etc/init.d/mydns start"
    stop program = "/etc/init.d/mydns stop"
    if failed port 53 use type udp protocol dns then restart
    if 5 restarts within 5 cycles then timeout


これだと,

[JST Oct 16 16:54:35] error    : 'mydns' failed protocol test [DNS] at INET[localhost:53] via UDP


という風に,エラーが出る.

DNS protocol test は BIND 以外だめらしい.

- Monit
  http://mmonit.com/monit/
- monit を使ってみた [2009-10-16-1]

monit を使ってみた はてぶ

メモしていなかった…….
ちょっと試してみただけなので,たいした内容でもないけど.

monit は daemon の死活を監視して,死んでいた場合には再起動してくれる daemon です.

rpmforge に rpm があるので,それを利用してインストールします.

とりあえず,動かすには
/etc/monit.conf

set daemon 120                  # 監視間隔
set logfile /var/log/monit.log  # ログの出力先.syslog も可能.
set mailserver mx.ftnk.jp       # alert の通知に使うメールサーバ
include /etc/monit.d/*.conf


くらいを設定して,/etc/monit.d/ 以下に監視対象ごとの設定ファイルを置きます.

/etc/monit.d/httpd.conf(httpd の監視)

check process httpd with pidfile /var/run/httpd.pid
   start program = "/etc/init.d/httpd start" with timeout 60 seconds
   stop program  = "/etc/init.d/httpd stop"
   if failed host www.ftnk.jp port 80 protocol http and request "/" then restart


/etc/monit.d/postfix.conf(postfix の監視)

check process postfix with pidfile /var/spool/postfix/pid/master.pid
   start program = "/etc/init.d/postfix start"
   stop  program = "/etc/init.d/postfix stop"
   if failed port 25 protocol smtp then restart


monit が理解できる protocol は man に書かれている.

APACHE-STATUS
DNS
DWP
FTP
HTTP
IMAP
CLAMAV
LDAP2
LDAP3
LMTP
MYSQL
NNTP
NTP3
POP
POSTFIX-POLICY
RDATE
RSYNC
SIP
SMTP
SSH
TNS
PGSQL


ssl のサポートを付けてコンパイルすると,以下のプロトコルにも対応.

HTTPS
FTPS
POPS
IMAPS


- Monit
  http://mmonit.com/monit/

Referrer (Inside):
[2009-10-16-2] monit で MyDNS を監視