nagios
作者:tseng 日期:2009-05-01
Apache套件 yum install httpd
Gcc編譯器 yum install gcc
Glibc函式庫 yum install glibc glibc-common
GD函式庫 yum install gd gd-devel
yum install nagios nagios-plugins-all nrpe
下載Nagios及其Plugins,目前最新穩定版本分別為3.0.6與1.4.13
為了讓Nagios伺服器可以監看遠端Linux主機,需要額外安裝NRPE套件
測試設定檔無誤
nagios -v /etc/nagios/nagios.cfg
啟動 nagios
service nagios start
查看狀態
nagiostats
Web 界面
vi /etc/httpd/conf.d/nagios.conf
ScriptAlias /nagios/cgi-bin "/usr/lib/nagios/cgi"
<Directory "/usr/lib/nagios/cgi">
# SSLRequireSSL
Options ExecCGI
AllowOverride None
order allow,deny
Allow from all
# order deny,allow
# Deny from all
Allow from 127.0.0.1 192.168.1.0/24
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /etc/nagios/htpasswd
Require valid-user
</Directory>
Alias /nagios "/usr/share/nagios"
<Directory "/usr/share/nagios">
# SSLRequireSSL
Options None
AllowOverride None
order allow,deny
Allow from all
# order deny,allow
# Deny from all
Allow from 127.0.0.1 192.168.1.0/24
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /etc/nagios/htpasswd
Require valid-user
</Directory>
agios.conf
apachectl graceful
htpasswd -c /etc/nagios/htpasswd nagiosadmin
登入 http://ip/nagios
Gcc編譯器 yum install gcc
Glibc函式庫 yum install glibc glibc-common
GD函式庫 yum install gd gd-devel
yum install nagios nagios-plugins-all nrpe
下載Nagios及其Plugins,目前最新穩定版本分別為3.0.6與1.4.13
為了讓Nagios伺服器可以監看遠端Linux主機,需要額外安裝NRPE套件
測試設定檔無誤
nagios -v /etc/nagios/nagios.cfg
啟動 nagios
service nagios start
查看狀態
nagiostats
Web 界面
vi /etc/httpd/conf.d/nagios.conf
ScriptAlias /nagios/cgi-bin "/usr/lib/nagios/cgi"
<Directory "/usr/lib/nagios/cgi">
# SSLRequireSSL
Options ExecCGI
AllowOverride None
order allow,deny
Allow from all
# order deny,allow
# Deny from all
Allow from 127.0.0.1 192.168.1.0/24
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /etc/nagios/htpasswd
Require valid-user
</Directory>
Alias /nagios "/usr/share/nagios"
<Directory "/usr/share/nagios">
# SSLRequireSSL
Options None
AllowOverride None
order allow,deny
Allow from all
# order deny,allow
# Deny from all
Allow from 127.0.0.1 192.168.1.0/24
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /etc/nagios/htpasswd
Require valid-user
</Directory>
agios.conf
apachectl graceful
htpasswd -c /etc/nagios/htpasswd nagiosadmin
登入 http://ip/nagios
评论: 0 | 引用: 0 | 查看次数: 27635
发表评论