Strict Standards: Declaration of action_plugin_blog::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/dokuwiki/lib/plugins/blog/action.php on line 13

Strict Standards: Declaration of action_plugin_indexmenu::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/dokuwiki/lib/plugins/indexmenu/action.php on line 13

Strict Standards: Declaration of action_plugin_importoldchangelog::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/dokuwiki/lib/plugins/importoldchangelog/action.php on line 8

Strict Standards: Declaration of action_plugin_importoldindex::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/dokuwiki/lib/plugins/importoldindex/action.php on line 8

Strict Standards: Declaration of action_plugin_include::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/dokuwiki/lib/plugins/include/action.php on line 19

Deprecated: Assigning the return value of new by reference is deprecated in /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/dokuwiki/inc/parserutils.php on line 208

Deprecated: Assigning the return value of new by reference is deprecated in /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/dokuwiki/inc/parserutils.php on line 211

Deprecated: Assigning the return value of new by reference is deprecated in /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/dokuwiki/inc/parserutils.php on line 421

Deprecated: Assigning the return value of new by reference is deprecated in /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/dokuwiki/inc/parserutils.php on line 594

Strict Standards: Declaration of cache_instructions::retrieveCache() should be compatible with cache::retrieveCache($clean = true) in /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/dokuwiki/inc/cache.php on line 291

Deprecated: Function split() is deprecated in /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/dokuwiki/inc/auth.php on line 154

Strict Standards: Only variables should be passed by reference in /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/dokuwiki/doku.php on line 73
nagios設定 [開発チーム]

Deprecated: Function split() is deprecated in /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/dokuwiki/inc/parser/lexer.php on line 517

Deprecated: Function split() is deprecated in /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/dokuwiki/inc/parser/lexer.php on line 517

Deprecated: Function split() is deprecated in /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/dokuwiki/inc/parser/lexer.php on line 517

Deprecated: Function split() is deprecated in /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/dokuwiki/inc/parser/lexer.php on line 517

Deprecated: Function split() is deprecated in /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/dokuwiki/inc/parser/lexer.php on line 517

Deprecated: Function split() is deprecated in /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/dokuwiki/inc/parser/lexer.php on line 517

Deprecated: Function split() is deprecated in /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/dokuwiki/inc/parser/lexer.php on line 517

Deprecated: Function split() is deprecated in /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/dokuwiki/inc/parser/lexer.php on line 517

Deprecated: Function split() is deprecated in /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/dokuwiki/inc/parser/lexer.php on line 517

Deprecated: Function split() is deprecated in /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/dokuwiki/inc/parser/lexer.php on line 517

Deprecated: Function split() is deprecated in /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/dokuwiki/inc/parser/lexer.php on line 517

Deprecated: Function split() is deprecated in /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/dokuwiki/inc/parser/lexer.php on line 517

Deprecated: Function split() is deprecated in /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/dokuwiki/inc/parser/lexer.php on line 517

Deprecated: Function split() is deprecated in /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/dokuwiki/inc/parser/lexer.php on line 517

Deprecated: Function split() is deprecated in /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/dokuwiki/inc/parser/lexer.php on line 517

▼インストール・設定

サイトより、NagiosNagios Pluginをそれぞれダウンロードします
Nagios http://www.nagios.org/

Nagiosにアクセスするには、Apache2phpが必要です
※nagios ver3.0~

▼参考サイト

◆ユーザとグループの作成

#addgroup nagios
#useradd -d /usr/local/nagios -s /bin/false -g nagios nagios 

◆Nagois本体のインストール

# tar zxfv nagios-***.tar.gz 
# cd nagios-1.**
# ./configure
# make all
# make install install-init install-commandmode install-config

◆pluginのインストール

# tar zxfv nagios-plugins-1.4.tar.gz 
# cd nagios-plugins-1.4
# ./configure --prefix=/usr/local/nagios --with-cgiurl="/nagios/cgi-bin/"
# make all
# su 
# make install 

●ディレクトリ構造

/etc/init.d/nagios  起動スクリプト 
/usr/local/nagios/
 |-bin - 実行ファイル 
 |-etc - 設定ファイル 
 |-libexec - プラグイン 
 |-bin - cgiファイル 
 |-share - htmlファイル 
 |-var  - ログなど 

◆Apache2の設定

既存ファイルに追記します

# For nagios -----start----
ScriptAlias /nagios/cgi-bin/ /usr/local/nagios/sbin/
<Directory "/usr/local/nagios/sbin/">
        AllowOverride AuthConfig
        Options ExecCGI
        Order allow,deny
        Allow from all

        AuthName "Nagios Access"
        AuthType Basic
        AuthUserFile /usr/local/nagios/htpasswd.users
        require valid-user
</Directory>

Alias /nagios/ /usr/local/nagios/share/
<Directory "/usr/local/nagios/share">
        AllowOverride AuthConfig
        Options None
        Order allow,deny
        Allow from all

        AuthName "Nagios Access"
        AuthType Basic
        AuthUserFile /usr/local/nagios/htpasswd.users
        require valid-user
</Directory>
# For nagios -----end----

◆htpasswd設定

アクセス制限をかけます

# htpasswd -c /usr/local/nagios/htpasswd.users nagiosadmin (新規作成)
# htpasswd /usr/local/nagios/htpasswd.users nagiosadmin(追加時)

▼StatusMap表示

このままだと、MAPが表示されてません
nagios3」が必須なのでインストールします

# apt-get install nagios3

「statusmap.cg」ファイルを検索し、設定ファイルのコピーを行います

# cp /usr/lib/cgi-bin/nagios3/statusmap.cgi /usr/local/nagios/sbin

▼nrpe関連

画像を表示するために必要なので、インストールします

# wget http://jaist.dl.sourceforge.net/sourceforge/nagios/nrpe-2.12.tar.gz
# tar zxvf nrpe-2.12.tar.gz
# cd nrpe-2.12
# ./configure && make check_nrpe && make install-plugi
# cd
# rm -Rf nrpe*

設定ファイルの最終行に追記します

# vi /usr/local/nagios/etc/objects/commands.cfg

# 'check_nrpe' command definition
define command{
        command_name    check_nrpe
        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$
        }

nagiosapache2の再起動

# /etc/init.d/nagios restart
# /etc/init.d/apache2 restart

▼設定ファイルのエラー確認

nagiosがなかったら、nagios3で試しましょう

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

▼日本語化

http://sourceforge.jp/から、nagiosのバージョンに合わせた修正パッチをDL

DLしたものを、nagiosのデータファイルのあるディレクトリへコピー

コピーしたファイルが「.patch.gz」形式なので、解凍しつつ、パッチを各ファイルへあてていく

# gzip -dc nagios-3.1.0-ja-utf8.patch.gz |patch -p0

処理が終わったら、元の修正ファイルは削除しておきます

# rm nagios-3.1.0-ja-utf8.patch.gz

あとはnagiosのインストールと同じように

# ./configure
# make install make install-init make install-config

あとは再起動するのみ

# /etc/init.d/nagios resatrt

▼リモートサーバー

◆監視サービス追加

●nagiosサーバー

設定ファイルを編集し、下記にディレクトリを作成して、ホスト別にファイルの作成

/usr/local/nagios/etc/servers/prende_pound.cfg
# ホストの定義
define host{
        use                  linux-server
        host_name            prende_pound
        alias                Prende Servers
        address              10.254.199.246
        }
# pingの監視
define service{
        use                  generic-service
        host_name            prende_pound
        service_description  PING
        check_command        check_ping!200.0,20%!600.0,60%
        }
# sshの監視
define service{
        use                  generic-service
        host_name            prende_pound
        service_description  Current Load
        check_command        check_nrpe!check_load
        }

●リモートサーバー

vi /etc/nagios/nrpe.cfg
command[check_users]=/usr/lib/nagios/plugins/check_users -w 5 -c 10
command[check_load]=/usr/lib/nagios/plugins/check_load -w 15,10,5 -c 30,25,20
command[check_hda1]=/usr/lib/nagios/plugins/check_disk -w 20% -c 10% -p /dev/hda1
command[check_zombie_procs]=/usr/lib/nagios/plugins/check_procs -w 5 -c 10 -s Z
command[check_total_procs]=/usr/lib/nagios/plugins/check_procs -w 150 -c 200



command[check_swap_pound]=/usr/lib/nagios/plugins/check_swap -w 80% -c 50%
command[check_ssh]=/usr/local/nagios/libexec/check_ssh -H 127.0.0.1
command[check_disk]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /

nagiosローカルテスト環境

http://192.168.0.180/nagios/
nagiosadmin
password

メール

ここに飛びます

k3jaro@gmail.com
DDjqcYcP
ペットの名前は?
トーマスクン
nagios設定.txt · 最終更新: 2010/07/27 15:47 (外部編集)
www.chimeric.de Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0

Strict Standards: Only variables should be passed by reference in /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/dokuwiki/doku.php on line 81