LoginSignup
1
1

More than 5 years have passed since last update.

nagiosの状態変更をIRCに通知(nagircbot)

Last updated at Posted at 2014-12-30
apt-get install -y inspircd weechat
  • znc 後で調べてみよう。

ircd

/etc/default/inspircd
- #INSPIRCD_ENABLED=0
+ INSPIRCD_ENABLED=1
/etc/inspircd/inspircd.conf
- <bind address="127.0.0.1" port="6667" type="clients">
+ <bind address="0.0.0.0" port="6667" type="clients">
/etc/init.d/inspircd restart
  • /var/log/inspircd.log

認証

/etc/inspircd/inspircd.conf
+<oper name="users"
+      password="Foal0tha"
+      host="*"
+      type="NetAdmin">
  • 任意のユーザ名 : Foal0tha で接続ができるようになる。

weechat

IRC - weechat のススメ(導入〜設定) - Qiitaを参考に以下実施

weechat-curses

  • buffer切り替え
    • Alt+up,down
/server add rpi localhost/6667
/connect rpi
/join #memo

/save

/close #memo
/disconnect rpi
/server del rpi

nagiosをIRCボットに参加させる

【CentOS】nagiosの通知をIRCに吐く - Studio3104::BLOG.new

apt-get install -y nagircbot
/etc/default/nagircbot
- ENABLE=no
+ ENABLE=yes

- SERVER=irc.example.com:6667
+ SERVER=localhost:6667

- CHANNEL='#mychannel'
+ CHANNEL='#nagios'

- OPTIONS=
+ OPTIONS="-S -C"

スクリーンショット 2014-12-30 14.54.38.png

-i check interval (in seconds - default 60)

60秒周期でbotがチェックしてくれます。

-S

これがないとCRITを通知しなかった。

-C

色付けしたメッセージをIRCに投稿してくれます。

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