2006-09-02
監視ツール Nagios 2.5 インストール メモ
software |
監視ツール Nagios の私的なインストールメモです。
説明ならこっちが詳しいですよ。
- Nagios本体のダウンロード
$ wget http://jaist.dl.sourceforge.net/sourceforge/nagios/nagios-2.5.tar.gz $ tar xvzf nagios-2.5.tar.gz $ md5sum nagios-2.5.tar.gz 1a77528f6797bd3c0320da5e4fae2b1a nagios-2.5.tar.gz $ cd nagios-2.5
- Nagios用のアカウントを作成
$ sudo groupadd nagios $ sudo useradd -g nagios nagios $ sudo groupadd nagcmd $ sudo usermod -G nagcmd apache $ sudo usermod -G nagcmd nagios
- configure実行
$ ./configure --prefix=/usr/local/nagios \ --with-cgiurl=/nagios/cgi-bin \ --with-htmurl=/nagios \ --with-nagios-group=nagios \ --with-command-group=nagcmd
- configure実行結果
*** Configuration summary for nagios 2.5 07-13-2006 ***:
General Options:
-------------------------
Nagios executable: nagios
Nagios user/group: nagios,nagios
Command user/group: nagios,nagcmd
Embedded Perl: no
Event Broker: yes
Install ${prefix}: /usr/local/nagios
Lock file: ${prefix}/var/nagios.lock
Init directory: /etc/rc.d/init.d
Host OS: linux-gnu
Web Interface Options:
------------------------
HTML URL: http://localhost/nagios/
CGI URL: http://localhost/nagios/cgi-bin/
Traceroute (used by WAP): /usr/sbin/traceroute
※(追記)gdやlibjpeg辺りがないよ!と怒られてたら、先に入れておいた方がいいでしょう。なくてもNagios自体は動作しますが、Status Mapとかレポートとかいくつかの機能がインストールされません。
- makeとインストール
$ make all $ sudo make install $ sudo make istall-init $ sudo make install-commandmode $ sudo make install-config
- Nagiosプラグインのダウンロード
$ cd .. $ wget http://jaist.dl.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.3.tar.gz $ tar xvzf nagios-plugins-1.4.3.tar.gz $ cd nagios-plugins-1.4.3
- Nagiosプラグインのインストール
$ ./configure --prefix=/usr/local/nagios --with-cgiurl="/nagios/cgi-bin/" $ make all $ sudo make install
- 各種設定ファイルの作成
- nagios.cfg
- cgi.cfg
- resource.cfg
- オブジェクト定義ファイル
$cd /usr/local/nagios/etc/ $ sudo -u nagios cp nagios.cfg-sample nagios.cfg $ sudo -u nagios cp cgi.cfg-sample cgi.cfg $ sudo -u nagios cp resource.cfg-sample resource.cfg $ sudo -u nagios cp minimal.cfg-sample minimal.cfg $ sudo -u nagios cp checkcommands.cfg-sample checkcommands.cfg $ sudo -u nagios cp misccommands.cfg-sample misccommands.cfg
- cgi.cfgの編集
use_authentication=1 default_user_name=nagios authorized_for_system_information=nagios authorized_for_configuration_information=nagios authorized_for_system_commands=nagios authorized_for_all_services=nagios authorized_for_all_hosts=nagios authorized_for_all_service_commands=nagios authorized_for_all_host_commands=nagios
- 設定ファイルの文法チェック
文法チェックは下記のコマンドを実行する。
$ sudo -u nagios /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
以下の表示ならOKのはず。
Total Warnings: 0 Total Errors: 0
- httpd.confの編集
#
# Nagios
#
ScriptAlias /nagios/cgi-bin /usr/local/nagios/sbin
<Directory "/usr/local/nagios/sbin">
AllowOverride AuthConfig
Options ExecCGI
Order deny,allow
Deny from all
Allow from 192.168.1.4
</Directory>
Alias /nagios /usr/local/nagios/share
<Directory "/usr/local/nagios/share">
Options None
AllowOverride AuthConfig
Order deny,allow
Deny from all
Allow from 192.168.1.4
</Directory>
基本的に全拒否方針、Allow from 192.168.1.4 でアクセスを許可するIPアドレスを指定する。
- Nagiosのテスト起動
$ sudo /usr/local/nagios/bin/nagios /usr/local/nagios/etc/nagios.cfg
ブラウザでアクセスして動作を確認する。
- Nagiosの起動
$ sudo /sbin/service nagios start
- Nagiosの停止
$ sudo /sbin/service nagios stop
- Nagiosの自動起動(chkconfigに追加)
$ sudo chkconfig --add nagios $ sudo chkconfig --list ・・・ nagios 0:オフ 1:オフ 2:オフ 3:オン 4:オン 5:オン 6:オフ
- 「3-D Status Map」を見るために
クライアント側にこの辺をインストール
コメントを書く
sen-u
2006/09/04 18:56
Nagiosですけど、あとアイコンのインストールをした方がいいかもしれません。私は入れてませんけど、見た目がキレイになると思いますよ。
トラックバック - http://d.hatena.ne.jp/sen-u/20060902/p1
リンク元
- 350 http://egone.org/
- 234 http://www.st.ryukoku.ac.jp/~kjm/security/memo/
- 122 http://www.st.ryukoku.ac.jp/~kjm/security/antenna/
- 111 http://www.pluto.dti.ne.jp/~rinou/
- 107 http://pooh.gr.jp/link.html
- 17 http://www.st.ryukoku.ac.jp/~kjm/security/memo/2006/08.html
- 15 http://www.st.ryukoku.ac.jp/~kjm/security/memo/2006/09.html
- 9 http://antenna.larme.dnsalias.net/
- 5 http://d.hatena.ne.jp/
- 4 http://www.google.co.jp/search?sourceid=navclient&hl=ja&ie=UTF-8&rls=GGLG,GGLG:2006-05,GGLG:ja&q=ルレ・レーヴ
2003 | 08 | 09 | 10 | 11 | 12 |
2004 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 | 10 | 11 | 12 |
2005 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 | 10 | 11 | 12 |
2006 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 | 10 | 11 | 12 |
2007 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 | 10 | 11 | 12 |
2008 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 | 10 | 11 | 12 |
2009 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 | 10 | 11 | 12 |
2010 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 | 10 | 11 | 12 |
2011 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 | 10 | 11 | 12 |
2012 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 | 10 | 11 | 12 |
2013 | 02 | 03 |
2004 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 | 10 | 11 | 12 |
2005 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 | 10 | 11 | 12 |
2006 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 | 10 | 11 | 12 |
2007 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 | 10 | 11 | 12 |
2008 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 | 10 | 11 | 12 |
2009 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 | 10 | 11 | 12 |
2010 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 | 10 | 11 | 12 |
2011 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 | 10 | 11 | 12 |
2012 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 | 10 | 11 | 12 |
2013 | 02 | 03 |









