Nagiosインストール
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
[[CentOS7]]
*統合監視システム構築(Nagios) [#lc264125]
統合監視システム[[Nagios>http://www.nagios.org/]]([[日本...
※Webサーバー構築済であること
*Nagiosインストール [#f4f09d7e]
**Nagiosインストール [#l2b7f567]
|BGCOLOR(black):COLOR(white):|c
|[root@localhost ~]# yum -y install gd-devel &color(lime)...
|[root@localhost ~]# useradd -d /usr/local/nagios/ -M nag...
|[root@localhost ~]# wget https://downloads.sourceforge.n...
|&color(lightpink){※最新版の''URL''は[[ダウンロードページ...
|[root@localhost ~]# tar zxvf nagios-4.2.4.tar.gz &color(...
|[root@localhost ~]# cd nagios-4.2.4 &color(lime){← ''Na...
|[root@localhost nagios-4.2.4]# wget http://ftp.momo-i.or...
|&color(lightpink){※最新版の''URL''は[[ダウンロードページ...
|[root@localhost nagios-4.2.4]# gzip -dc nagios-jp-4.2.4....
|[root@localhost nagios-4.2.4]# ./configure && make all &...
|[root@localhost nagios-4.2.4]# cd &color(lime){← ''Nagi...
|[root@localhost ~]# rm -rf nagios-4.2.4 &color(lime){← ...
|[root@localhost ~]# rm -f nagios-4.2.4.tar.gz &color(lim...
**''Nagios''プラグインインストール [#ra8f7af0]
|BGCOLOR(black):COLOR(white):|c
|[root@localhost ~]# yum -y install mysql-devel &color(li...
|[root@localhost ~]# wget https://nagios-plugins.org/down...
|&color(lightpink){※最新版の''URL''は[[ダウンロードページ...
|[root@localhost ~]# tar zxvf nagios-plugins-2.1.4.tar.gz...
|[root@localhost ~]# cd nagios-plugins-2.1.4 &color(lime)...
|[root@localhost nagios-plugins-2.1.4]# ./configure && ma...
|[root@localhost nagios-plugins-2.1.4]# cd &color(lime){←...
|[root@localhost ~]# rm -rf nagios-plugins-2.1.4 &color(l...
|[root@localhost ~]# rm -f nagios-plugins-2.1.4.tar.gz &c...
*Nagios設定 [#x7a43ad5]
|BGCOLOR(black):COLOR(white):|c
|[root@localhost ~]# vi /usr/local/nagios/etc/nagios.cfg ...
|cfg_dir=/usr/local/nagios/etc/servers &color(lime){← 行...
|[root@localhost ~]# mkdir /usr/local/nagios/etc/servers ...
|[root@localhost ~]# vi /usr/local/nagios/etc/objects/con...
|define contact{ &br; contact_name ...
|[root@localhost ~]# vi /usr/local/nagios/etc/objects/loc...
|define service{ &br; use ...
|[root@localhost ~]# vi /usr/local/nagios/etc/objects/com...
|# 'notify-host-by-email' command definition &br; define ...
*Apache設定 [#u077e7b1]
|BGCOLOR(black):COLOR(white):|c
|[root@localhost ~]# usermod -G nagios apache &color(lime...
|[root@localhost ~]# vi /etc/httpd/conf.d/nagios.conf &co...
|<Directory "/usr/local/nagios/sbin"> &br; # SSLRequireS...
|[root@localhost ~]# systemctl reload httpd &color(lime){...
|[root@localhost ~]# htpasswd -c /usr/local/nagios/etc/ht...
|New password: &color(lime){← 任意のパスワード応答※表示...
|Re-type new password: &color(lime){← 任意のパスワード応...
|Adding password for user nagiosadmin|
*Nagios起動 [#md139441]
|BGCOLOR(black):COLOR(white):|c
|[root@localhost ~]# /etc/rc.d/init.d/nagios start &color...
|[root@localhost ~]# chkconfig nagios on &color(lime){← ...
*Nagios確認 [#tf485424]
http://サーバー名/nagios/へアクセスし、''Ngios''の''Web''...
デフォルトの監視項目は自ホストの「''CPU負荷''」、「''ログ...
*監視ホスト追加 [#f2512d37]
例としてホスト名''fedora''、IPアドレス192.168.1.20を監視...
|BGCOLOR(black):COLOR(white):|c
|[root@localhost ~]# vi /usr/local/nagios/etc/servers/fed...
|define host{ &br; use linux-...
|[root@localhost ~]# /etc/rc.d/init.d/nagios restart &col...
*監視ホスト追加確認 [#l8124efc]
http://サーバー名/nagios/へアクセスし、「ホスト」で追加し...
*監視サービス追加(自ホスト編) [#wffdefd8]
**メモリ使用状況 [#efb2ac42]
|BGCOLOR(black):COLOR(white):|c
|[root@localhost ~]# wget "https://exchange.nagios.org/co...
|[root@localhost ~]# /bin/mv check_mem /usr/local/nagios/...
|[root@localhost ~]# chmod +x /usr/local/nagios/libexec/c...
|[root@localhost ~]# vi /usr/local/nagios/etc/objects/com...
|&color(lime){以下を最終行へ追加}; &br; # 'check_mem' com...
|[root@localhost ~]# vi /usr/local/nagios/etc/objects/loc...
|以下を最終行へ追加 &br; define service{ &br; use...
|[root@localhost ~]# /etc/rc.d/init.d/nagios restart &col...
**ログインユーザー数 [#q0e42867]
|BGCOLOR(black):COLOR(white):|c
|[root@localhost ~]# vi /usr/local/nagios/etc/objects/loc...
|define service{ &br; use ...
|[root@localhost ~]# /etc/rc.d/init.d/nagios restart &col...
**NTP [#t055810e]
|BGCOLOR(black):COLOR(white):|c
|[root@localhost ~]# vi /usr/local/nagios/etc/objects/com...
|&color(lime){以下を最終行へ追加}; &br; # 'check_ntp' com...
|[root@localhost ~]# vi /usr/local/nagios/etc/objects/loc...
|&color(lime){以下を最終行へ追加}; &br; define service{ &...
|[root@localhost ~]# /etc/rc.d/init.d/nagios restart &col...
**clamd ※Clam AntiVirusまたはamavisd-new+Clam AntiVirus...
|BGCOLOR(black):COLOR(white):|c
|[root@localhost ~]# vi /usr/local/nagios/etc/objects/com...
|&color(lime){以下を最終行へ追加}; &br; # 'check_clamd' c...
|[root@localhost ~]# vi /usr/local/nagios/etc/objects/loc...
|&color(lime){以下を最終行へ追加}; &br; define service{ &...
|[root@localhost ~]# chmod u+s /usr/local/nagios/libexec/...
|[root@localhost ~]# /etc/rc.d/init.d/nagios restart &col...
**DNS ※BIND導入済の場合のみ [#y1c6b585]
|BGCOLOR(black):COLOR(white):|c
|[root@localhost ~]# vi /usr/local/nagios/etc/objects/com...
|&color(lime){以下を最終行へ追加}; &br; # 'check_dig' com...
|[root@localhost ~]# vi /usr/local/nagios/etc/objects/loc...
|&color(lime){以下を最終行へ追加}; &br; define service{ &...
|[root@localhost ~]# /etc/rc.d/init.d/nagios restart &col...
*SMTP ※メールサーバー導入済の場合のみ [#b74953a1]
|BGCOLOR(black):COLOR(white):|c
|[root@localhost ~]# vi /usr/local/nagios/etc/objects/loc...
|以下を最終行へ追加 &br; define service{ &br; use...
|[root@localhost ~]# /etc/rc.d/init.d/nagios restart &col...
*POP ※メールサーバー導入済の場合のみ [#z6911334]
|BGCOLOR(black):COLOR(white):|c
|[root@localhost ~]# vi /usr/local/nagios/etc/objects/com...
|# 'check_pop' command definition &br; define command{ &b...
|[root@localhost ~]# vi /usr/local/nagios/etc/objects/loc...
|&color(lime){以下を最終行へ追加}; &br; define service{ &...
|[root@localhost ~]# /etc/rc.d/init.d/nagios restart &col...
*IMAP ※メールサーバー導入済の場合のみ [#d720a284]
|BGCOLOR(black):COLOR(white):|c
|[root@localhost ~]# vi /usr/local/nagios/etc/objects/com...
|# 'check_imap' command definition &br; define command{ &...
|[root@localhost ~]# vi /usr/local/nagios/etc/objects/loc...
|&color(lime){以下を最終行へ追加}; &br; define service{ &...
|[root@localhost ~]# /etc/rc.d/init.d/nagios restart &col...
*milter-manager ※milter-manager(milter-greylist、clamav-m...
|BGCOLOR(black):COLOR(white):|c
|[root@localhost ~]# vi /usr/local/nagios/etc/objects/com...
|&color(lime){以下を最終行へ追加}; &br; # 'check_milter-m...
|[root@localhost ~]# vi /usr/local/nagios/etc/objects/loc...
|&color(lime){以下を最終行へ追加}; &br; define service{ &...
|[root@localhost ~]# /etc/rc.d/init.d/nagios restart &col...
*milter-greylist ※milter-greylist導入済の場合のみ [#bdbf2...
|BGCOLOR(black):COLOR(white):|c
|[root@localhost ~]# vi /usr/local/nagios/etc/objects/com...
|&color(lime){以下を最終行へ追加}; &br; # 'check_milter-g...
|[root@localhost ~]# vi /usr/local/nagios/etc/objects/loc...
|&color(lime){以下を最終行へ追加}; &br; define service{ &...
|[root@localhost ~]# /etc/rc.d/init.d/nagios restart &col...
*clamav-milter ※clamav-milter導入済の場合のみ [#n57affe6]
|BGCOLOR(black):COLOR(white):|c
|[root@localhost ~]# vi /usr/local/nagios/etc/objects/com...
|&color(lime){以下を最終行へ追加}; &br; # 'check_clamav-m...
|[root@localhost ~]# vi /usr/local/nagios/etc/objects/loc...
|&color(lime){以下を最終行へ追加}; &br; define service{ &...
|[root@localhost ~]# /etc/rc.d/init.d/nagios restart &col...
*spamass-milter ※spamass-milter導入済の場合のみ [#wfb26b51]
|BGCOLOR(black):COLOR(white):|c
|[root@localhost ~]# vi /usr/local/nagios/etc/objects/com...
|&color(lime){以下を最終行へ追加}; &br; # 'check_spamass-...
|[root@localhost ~]# vi /usr/local/nagios/etc/objects/loc...
|&color(lime){以下を最終行へ追加}; &br; define service{ &...
|[root@localhost ~]# /etc/rc.d/init.d/nagios restart &col...
*spamd ※SpamAssassin導入済の場合のみ [#k91a1b29]
|BGCOLOR(black):COLOR(white):|c
|[root@localhost ~]# vi /usr/local/nagios/etc/objects/com...
|&color(lime){以下を最終行へ追加}; &br; # 'check_spamd' c...
|[root@localhost ~]# vi /usr/local/nagios/etc/objects/loc...
|&color(lime){以下を最終行へ追加}; &br; define service{ &...
|[root@localhost ~]# /etc/rc.d/init.d/nagios restart &col...
*Samba ※Samba導入済の場合のみ [#x5882a2e]
|BGCOLOR(black):COLOR(white):|c
|[root@localhost ~]# yum -y install samba-client &color(l...
|[root@localhost ~]# vi /usr/local/nagios/libexec/check_d...
|my $smbclient= "/usr/bin/smbclient" ; &color(lime){← ''...
|[root@localhost ~]# echo &color(lime){''Samba''サーバーI...
|&color(lightpink){※SambaサーバーIPアドレスにループバック...
|[root@localhost ~]# vi /usr/local/nagios/etc/objects/com...
|&color(lime){以下を最終行へ追加}; &br; # 'check_disk_smb...
|[root@localhost ~]# vi /usr/local/nagios/etc/objects/loc...
|&color(lime){以下を最終行へ追加}; &br; define service{ &...
|[root@localhost ~]# /etc/rc.d/init.d/nagios restart &col...
*MySQL ※MariaDBまたはMySQL導入済の場合のみ [#m40fb310]
|BGCOLOR(black):COLOR(white):|c
|[root@localhost ~]# vi /usr/local/nagios/etc/objects/com...
|&color(lime){以下を最終行へ追加}; &br; # 'check_mysql' c...
|[root@localhost ~]# vi /usr/local/nagios/etc/objects/loc...
|&color(lime){以下を最終行へ追加}; &br; define service{ &...
|[root@localhost ~]# /etc/rc.d/init.d/nagios restart &col...
*ネットワーク使用状況 [#i82c6e86]
|BGCOLOR(black):COLOR(white):|c
|[root@localhost ~]# wget "https://exchange.nagios.org/co...
|[root@localhost ~]# mv check_traffic_pnp4naios.sh /usr/l...
|[root@localhost ~]# chmod +x /usr/local/nagios/libexec/c...
|[root@localhost ~]# vi /usr/local/nagios/libexec/check_t...
|&color(lime){#};DIR=/App/nagios/tmp &color(lime){← 行頭...
|[root@localhost ~]# vi /usr/local/nagios/etc/objects/com...
|&color(lime){以下を最終行へ追加}; &br; # 'check_traffic'...
|[root@localhost ~]# vi /usr/local/nagios/etc/objects/loc...
|&color(lime){以下を最終行へ追加}; &br; define service{ &...
|[root@localhost ~]# /etc/rc.d/init.d/nagios restart &col...
*監視サービス追加確認(自ホスト編) [#h5436f99]
http://サーバー名/nagios/へアクセスし、「サービス」で追加...
*Downtime Scheduling Utility導入 [#vbdbcb87]
日々のサーバー運用では、定時バックアップや定時ウィルスス...
''Downtime Scheduling Utility''ダウンロードページより''na...
|BGCOLOR(black):COLOR(white):|c
|[root@localhost ~]# tar zxvf nagios_down-0.2.tar.gz &col...
|[root@localhost ~]# cp nagios_down.php /usr/local/nagios...
|[root@localhost ~]# rm -f nagios_down.* &color(lime){← ...
|[root@localhost ~]# rm -f nagios_down-0.2.tar.gz &color(...
|[root@localhost ~]# vi /usr/local/nagios/bin/nagios_down...
|define(NAGIOSCMD, "/usr/local/groundwork/nagios/var/spoo...
|[root@localhost ~]# vi /etc/php.ini &color(lime){← ''ph...
|&color(lime){※''nagios_down''実行時下記エラーメッセージ...
|[root@localhost ~]# vi /usr/local/nagios/bin/nagios_down...
|&color(lime){※''nagios_down''実行時下記エラーメッセージ...
|[root@localhost ~]# vi /etc/cron.d/nagios &color(lime){←...
|01 00 * * * root /usr/bin/php /usr/local/nagios/bin/nagi...
終了行:
[[CentOS7]]
*統合監視システム構築(Nagios) [#lc264125]
統合監視システム[[Nagios>http://www.nagios.org/]]([[日本...
※Webサーバー構築済であること
*Nagiosインストール [#f4f09d7e]
**Nagiosインストール [#l2b7f567]
|BGCOLOR(black):COLOR(white):|c
|[root@localhost ~]# yum -y install gd-devel &color(lime)...
|[root@localhost ~]# useradd -d /usr/local/nagios/ -M nag...
|[root@localhost ~]# wget https://downloads.sourceforge.n...
|&color(lightpink){※最新版の''URL''は[[ダウンロードページ...
|[root@localhost ~]# tar zxvf nagios-4.2.4.tar.gz &color(...
|[root@localhost ~]# cd nagios-4.2.4 &color(lime){← ''Na...
|[root@localhost nagios-4.2.4]# wget http://ftp.momo-i.or...
|&color(lightpink){※最新版の''URL''は[[ダウンロードページ...
|[root@localhost nagios-4.2.4]# gzip -dc nagios-jp-4.2.4....
|[root@localhost nagios-4.2.4]# ./configure && make all &...
|[root@localhost nagios-4.2.4]# cd &color(lime){← ''Nagi...
|[root@localhost ~]# rm -rf nagios-4.2.4 &color(lime){← ...
|[root@localhost ~]# rm -f nagios-4.2.4.tar.gz &color(lim...
**''Nagios''プラグインインストール [#ra8f7af0]
|BGCOLOR(black):COLOR(white):|c
|[root@localhost ~]# yum -y install mysql-devel &color(li...
|[root@localhost ~]# wget https://nagios-plugins.org/down...
|&color(lightpink){※最新版の''URL''は[[ダウンロードページ...
|[root@localhost ~]# tar zxvf nagios-plugins-2.1.4.tar.gz...
|[root@localhost ~]# cd nagios-plugins-2.1.4 &color(lime)...
|[root@localhost nagios-plugins-2.1.4]# ./configure && ma...
|[root@localhost nagios-plugins-2.1.4]# cd &color(lime){←...
|[root@localhost ~]# rm -rf nagios-plugins-2.1.4 &color(l...
|[root@localhost ~]# rm -f nagios-plugins-2.1.4.tar.gz &c...
*Nagios設定 [#x7a43ad5]
|BGCOLOR(black):COLOR(white):|c
|[root@localhost ~]# vi /usr/local/nagios/etc/nagios.cfg ...
|cfg_dir=/usr/local/nagios/etc/servers &color(lime){← 行...
|[root@localhost ~]# mkdir /usr/local/nagios/etc/servers ...
|[root@localhost ~]# vi /usr/local/nagios/etc/objects/con...
|define contact{ &br; contact_name ...
|[root@localhost ~]# vi /usr/local/nagios/etc/objects/loc...
|define service{ &br; use ...
|[root@localhost ~]# vi /usr/local/nagios/etc/objects/com...
|# 'notify-host-by-email' command definition &br; define ...
*Apache設定 [#u077e7b1]
|BGCOLOR(black):COLOR(white):|c
|[root@localhost ~]# usermod -G nagios apache &color(lime...
|[root@localhost ~]# vi /etc/httpd/conf.d/nagios.conf &co...
|<Directory "/usr/local/nagios/sbin"> &br; # SSLRequireS...
|[root@localhost ~]# systemctl reload httpd &color(lime){...
|[root@localhost ~]# htpasswd -c /usr/local/nagios/etc/ht...
|New password: &color(lime){← 任意のパスワード応答※表示...
|Re-type new password: &color(lime){← 任意のパスワード応...
|Adding password for user nagiosadmin|
*Nagios起動 [#md139441]
|BGCOLOR(black):COLOR(white):|c
|[root@localhost ~]# /etc/rc.d/init.d/nagios start &color...
|[root@localhost ~]# chkconfig nagios on &color(lime){← ...
*Nagios確認 [#tf485424]
http://サーバー名/nagios/へアクセスし、''Ngios''の''Web''...
デフォルトの監視項目は自ホストの「''CPU負荷''」、「''ログ...
*監視ホスト追加 [#f2512d37]
例としてホスト名''fedora''、IPアドレス192.168.1.20を監視...
|BGCOLOR(black):COLOR(white):|c
|[root@localhost ~]# vi /usr/local/nagios/etc/servers/fed...
|define host{ &br; use linux-...
|[root@localhost ~]# /etc/rc.d/init.d/nagios restart &col...
*監視ホスト追加確認 [#l8124efc]
http://サーバー名/nagios/へアクセスし、「ホスト」で追加し...
*監視サービス追加(自ホスト編) [#wffdefd8]
**メモリ使用状況 [#efb2ac42]
|BGCOLOR(black):COLOR(white):|c
|[root@localhost ~]# wget "https://exchange.nagios.org/co...
|[root@localhost ~]# /bin/mv check_mem /usr/local/nagios/...
|[root@localhost ~]# chmod +x /usr/local/nagios/libexec/c...
|[root@localhost ~]# vi /usr/local/nagios/etc/objects/com...
|&color(lime){以下を最終行へ追加}; &br; # 'check_mem' com...
|[root@localhost ~]# vi /usr/local/nagios/etc/objects/loc...
|以下を最終行へ追加 &br; define service{ &br; use...
|[root@localhost ~]# /etc/rc.d/init.d/nagios restart &col...
**ログインユーザー数 [#q0e42867]
|BGCOLOR(black):COLOR(white):|c
|[root@localhost ~]# vi /usr/local/nagios/etc/objects/loc...
|define service{ &br; use ...
|[root@localhost ~]# /etc/rc.d/init.d/nagios restart &col...
**NTP [#t055810e]
|BGCOLOR(black):COLOR(white):|c
|[root@localhost ~]# vi /usr/local/nagios/etc/objects/com...
|&color(lime){以下を最終行へ追加}; &br; # 'check_ntp' com...
|[root@localhost ~]# vi /usr/local/nagios/etc/objects/loc...
|&color(lime){以下を最終行へ追加}; &br; define service{ &...
|[root@localhost ~]# /etc/rc.d/init.d/nagios restart &col...
**clamd ※Clam AntiVirusまたはamavisd-new+Clam AntiVirus...
|BGCOLOR(black):COLOR(white):|c
|[root@localhost ~]# vi /usr/local/nagios/etc/objects/com...
|&color(lime){以下を最終行へ追加}; &br; # 'check_clamd' c...
|[root@localhost ~]# vi /usr/local/nagios/etc/objects/loc...
|&color(lime){以下を最終行へ追加}; &br; define service{ &...
|[root@localhost ~]# chmod u+s /usr/local/nagios/libexec/...
|[root@localhost ~]# /etc/rc.d/init.d/nagios restart &col...
**DNS ※BIND導入済の場合のみ [#y1c6b585]
|BGCOLOR(black):COLOR(white):|c
|[root@localhost ~]# vi /usr/local/nagios/etc/objects/com...
|&color(lime){以下を最終行へ追加}; &br; # 'check_dig' com...
|[root@localhost ~]# vi /usr/local/nagios/etc/objects/loc...
|&color(lime){以下を最終行へ追加}; &br; define service{ &...
|[root@localhost ~]# /etc/rc.d/init.d/nagios restart &col...
*SMTP ※メールサーバー導入済の場合のみ [#b74953a1]
|BGCOLOR(black):COLOR(white):|c
|[root@localhost ~]# vi /usr/local/nagios/etc/objects/loc...
|以下を最終行へ追加 &br; define service{ &br; use...
|[root@localhost ~]# /etc/rc.d/init.d/nagios restart &col...
*POP ※メールサーバー導入済の場合のみ [#z6911334]
|BGCOLOR(black):COLOR(white):|c
|[root@localhost ~]# vi /usr/local/nagios/etc/objects/com...
|# 'check_pop' command definition &br; define command{ &b...
|[root@localhost ~]# vi /usr/local/nagios/etc/objects/loc...
|&color(lime){以下を最終行へ追加}; &br; define service{ &...
|[root@localhost ~]# /etc/rc.d/init.d/nagios restart &col...
*IMAP ※メールサーバー導入済の場合のみ [#d720a284]
|BGCOLOR(black):COLOR(white):|c
|[root@localhost ~]# vi /usr/local/nagios/etc/objects/com...
|# 'check_imap' command definition &br; define command{ &...
|[root@localhost ~]# vi /usr/local/nagios/etc/objects/loc...
|&color(lime){以下を最終行へ追加}; &br; define service{ &...
|[root@localhost ~]# /etc/rc.d/init.d/nagios restart &col...
*milter-manager ※milter-manager(milter-greylist、clamav-m...
|BGCOLOR(black):COLOR(white):|c
|[root@localhost ~]# vi /usr/local/nagios/etc/objects/com...
|&color(lime){以下を最終行へ追加}; &br; # 'check_milter-m...
|[root@localhost ~]# vi /usr/local/nagios/etc/objects/loc...
|&color(lime){以下を最終行へ追加}; &br; define service{ &...
|[root@localhost ~]# /etc/rc.d/init.d/nagios restart &col...
*milter-greylist ※milter-greylist導入済の場合のみ [#bdbf2...
|BGCOLOR(black):COLOR(white):|c
|[root@localhost ~]# vi /usr/local/nagios/etc/objects/com...
|&color(lime){以下を最終行へ追加}; &br; # 'check_milter-g...
|[root@localhost ~]# vi /usr/local/nagios/etc/objects/loc...
|&color(lime){以下を最終行へ追加}; &br; define service{ &...
|[root@localhost ~]# /etc/rc.d/init.d/nagios restart &col...
*clamav-milter ※clamav-milter導入済の場合のみ [#n57affe6]
|BGCOLOR(black):COLOR(white):|c
|[root@localhost ~]# vi /usr/local/nagios/etc/objects/com...
|&color(lime){以下を最終行へ追加}; &br; # 'check_clamav-m...
|[root@localhost ~]# vi /usr/local/nagios/etc/objects/loc...
|&color(lime){以下を最終行へ追加}; &br; define service{ &...
|[root@localhost ~]# /etc/rc.d/init.d/nagios restart &col...
*spamass-milter ※spamass-milter導入済の場合のみ [#wfb26b51]
|BGCOLOR(black):COLOR(white):|c
|[root@localhost ~]# vi /usr/local/nagios/etc/objects/com...
|&color(lime){以下を最終行へ追加}; &br; # 'check_spamass-...
|[root@localhost ~]# vi /usr/local/nagios/etc/objects/loc...
|&color(lime){以下を最終行へ追加}; &br; define service{ &...
|[root@localhost ~]# /etc/rc.d/init.d/nagios restart &col...
*spamd ※SpamAssassin導入済の場合のみ [#k91a1b29]
|BGCOLOR(black):COLOR(white):|c
|[root@localhost ~]# vi /usr/local/nagios/etc/objects/com...
|&color(lime){以下を最終行へ追加}; &br; # 'check_spamd' c...
|[root@localhost ~]# vi /usr/local/nagios/etc/objects/loc...
|&color(lime){以下を最終行へ追加}; &br; define service{ &...
|[root@localhost ~]# /etc/rc.d/init.d/nagios restart &col...
*Samba ※Samba導入済の場合のみ [#x5882a2e]
|BGCOLOR(black):COLOR(white):|c
|[root@localhost ~]# yum -y install samba-client &color(l...
|[root@localhost ~]# vi /usr/local/nagios/libexec/check_d...
|my $smbclient= "/usr/bin/smbclient" ; &color(lime){← ''...
|[root@localhost ~]# echo &color(lime){''Samba''サーバーI...
|&color(lightpink){※SambaサーバーIPアドレスにループバック...
|[root@localhost ~]# vi /usr/local/nagios/etc/objects/com...
|&color(lime){以下を最終行へ追加}; &br; # 'check_disk_smb...
|[root@localhost ~]# vi /usr/local/nagios/etc/objects/loc...
|&color(lime){以下を最終行へ追加}; &br; define service{ &...
|[root@localhost ~]# /etc/rc.d/init.d/nagios restart &col...
*MySQL ※MariaDBまたはMySQL導入済の場合のみ [#m40fb310]
|BGCOLOR(black):COLOR(white):|c
|[root@localhost ~]# vi /usr/local/nagios/etc/objects/com...
|&color(lime){以下を最終行へ追加}; &br; # 'check_mysql' c...
|[root@localhost ~]# vi /usr/local/nagios/etc/objects/loc...
|&color(lime){以下を最終行へ追加}; &br; define service{ &...
|[root@localhost ~]# /etc/rc.d/init.d/nagios restart &col...
*ネットワーク使用状況 [#i82c6e86]
|BGCOLOR(black):COLOR(white):|c
|[root@localhost ~]# wget "https://exchange.nagios.org/co...
|[root@localhost ~]# mv check_traffic_pnp4naios.sh /usr/l...
|[root@localhost ~]# chmod +x /usr/local/nagios/libexec/c...
|[root@localhost ~]# vi /usr/local/nagios/libexec/check_t...
|&color(lime){#};DIR=/App/nagios/tmp &color(lime){← 行頭...
|[root@localhost ~]# vi /usr/local/nagios/etc/objects/com...
|&color(lime){以下を最終行へ追加}; &br; # 'check_traffic'...
|[root@localhost ~]# vi /usr/local/nagios/etc/objects/loc...
|&color(lime){以下を最終行へ追加}; &br; define service{ &...
|[root@localhost ~]# /etc/rc.d/init.d/nagios restart &col...
*監視サービス追加確認(自ホスト編) [#h5436f99]
http://サーバー名/nagios/へアクセスし、「サービス」で追加...
*Downtime Scheduling Utility導入 [#vbdbcb87]
日々のサーバー運用では、定時バックアップや定時ウィルスス...
''Downtime Scheduling Utility''ダウンロードページより''na...
|BGCOLOR(black):COLOR(white):|c
|[root@localhost ~]# tar zxvf nagios_down-0.2.tar.gz &col...
|[root@localhost ~]# cp nagios_down.php /usr/local/nagios...
|[root@localhost ~]# rm -f nagios_down.* &color(lime){← ...
|[root@localhost ~]# rm -f nagios_down-0.2.tar.gz &color(...
|[root@localhost ~]# vi /usr/local/nagios/bin/nagios_down...
|define(NAGIOSCMD, "/usr/local/groundwork/nagios/var/spoo...
|[root@localhost ~]# vi /etc/php.ini &color(lime){← ''ph...
|&color(lime){※''nagios_down''実行時下記エラーメッセージ...
|[root@localhost ~]# vi /usr/local/nagios/bin/nagios_down...
|&color(lime){※''nagios_down''実行時下記エラーメッセージ...
|[root@localhost ~]# vi /etc/cron.d/nagios &color(lime){←...
|01 00 * * * root /usr/bin/php /usr/local/nagios/bin/nagi...
ページ名: