在Nginx中搭建Nagios监控平台
本文只做Nginx下Nagiox安装的说明,其它关于Nagios监控的详细配置请参考我的另一篇文章[Ubuntu 10.04下构建Nagios监控平台]
Nagios依赖PHP环境和perl环境。由于Nginx不支持Perl的CGI,这里就需要先来搭建Perl环境。
一、给Nginx加上对Perl的CGI支持
让Nginx支持Perl的CGI方法有好几种,基本原理都是通过Perl的FCGI模块实现。具体哪一个更好,目前没时间验证。下面的方法就是其中一种:
1、安装FCGI模块
| 1 2 3 4 5 6 7 | tar xvzf FCGI-0.73.tar.gz cd FCGI-0.73 perl Makefile.PL make make install cd .. | 
2、安装FCGI-ProcManager模块
| 1 2 3 4 5 6 7 | tar xvzf FCGI-ProcManager-0.19.tar.gz cd FCGI-ProcManager-0.19 perl Makefile.PL make make install cd .. | 
3、安装IO和IO::ALL模块
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | tar zxvf IO-1.25.tar.gz cd IO-1.25 perl Makefile.PL make make install cd .. tar zxvf IO-All-0.41.tar.gz cd IO-All-0.41 perl Makefile.PL make make install cd .. | 
4、下载Perl脚本
这个脚本的目的就是产生一个PERL的FastCGI接口,让Nginx可以以CGI方式处理Perl。
| 1 2 3 | unzip perl-fcgi.zip cp perl-fcgi.pl /usr/local/webserver/nginx/ | 
注:建议把这个脚本放在Nginx安装目录。
修改脚本权限
| 1 | chmod 755 /usr/local/webserver/nginx/perl-fcgi.pl | 
5、建立一个CGI启动/停止脚本
这个SHELL脚本只是为了方便管理上面的Perl脚本。脚本中的www为nginx的运行用户,请据自己的实际情况调整。
注意事项:不能用root用户执行(会提示). 要用与Nginx相同身份的用户执行。否则可能会在Nginx Log中提示 Permision Denied。
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | vi /usr/local/webserver/nginx/start_perl_cgi.sh #!/bin/bash #set -x dir=/usr/local/webserver/nginx/ stop () { #pkill  -f  $dir/perl-fcgi.pl kill $(cat $dir/logs/perl-fcgi.pid) rm $dir/logs/perl-fcgi.pid 2>/dev/null rm $dir/logs/perl-fcgi.sock 2>/dev/null echo "stop perl-fcgi done" } start () { rm $dir/now_start_perl_fcgi.sh 2>/dev/null chown www-data.www-data $dir/logs echo "$dir/perl-fcgi.pl -l $dir/logs/perl-fcgi.log -pid $dir/logs/perl-fcgi.pid -S  $dir/logs/perl-fcgi.sock" >>$dir/now_start_perl_fcgi.sh chown www.www $dir/now_start_perl_fcgi.sh chmod u+x $dir/now_start_perl_fcgi.sh sudo -u www $dir/now_start_perl_fcgi.sh echo "start perl-fcgi done" } case $1 in stop) stop ;; start) start ;; restart) stop start ;; esac | 
修改SHELL脚本权限
| 1 | chmod 755 /usr/local/webserver/nginx/start_perl_cgi.sh | 
启动脚本
| 1 | /usr/local/webserver/nginx/start_perl_cgi.sh start | 
正常情况下在/usr/local/webserver/nginx/logs下生成perl-fcgi.sock这个文件,如果没有生成,请检查下上面的步聚。
必须保证perl-fcgi.pl存在,执行start_perl_cgi.sh 才能执行成功  最好用sudo执行
保证能正常使用 在rc.local中 加入 启动 php功能模块组件 还有 启动peri_cgi支持模块
启动 php 功能模块
 sudo /usr/local/php/sbin/php-fpm
启动peri_cgi支持模块 
 sudo /etc/nginx/start_perl_cgi.sh start
还需要启动 nginx 和nagios 不过这两个默认是随系统一起启动的
二、安装Nagios
A、安装前准备
安装的机器上必须有一个WEB服务,本文是在Nginx环境上安装的。
下载nagios主程序和相关插件程序包
安装GD库(Nagios中的statusmap和trends模块必须)
| 1 | apt-get install libgd2-noxpm libgd2-noxpm-dev | 
B、Nagios监控端安装
1、创建Nagios用户及组
建立Nagios账号
| 1 | /usr/sbin/useradd -m -s /sbin/nologin nagios | 
2、创建一个名为nagcmd的用户组,用于从web接口执行外部命令。将Nagios用户和Nginx用户加入组中。
| 1 2 3 | groupadd nagcmd usermod -a -G nagcmd nagios usermod -a -G nagcmd www | 
注:上面的www是Nginx用户所属的组,如有不同请自行调整。
3、编译安装Nagios
| 1 2 3 4 5 6 7 8 9 10 11 12 | tar zxvf nagios-3.2.3.tar.gz cd nagios-3.2.3 ./configure --with-command-group=nagcmd make make all make install make install-init make install-config make install-commandmode #这里是在Nginx下运行Nagios,这一步就不用做了 make install-webconf cd .. | 
注:
make install 用于安装主要的程序、CGI及HTML文件
make install-init 用于生成init启动脚本
make install-config 用于安装示例配置文件
make install-commandmode 用于设置相应的目录权限
make install-webconf 用于安装Apache配置文件
4、验证程序是否被正确安装
切换目录到安装路径,这里是/usr/local/nagios,看是否存在etc、bin、 sbin、 share、 var这五个目录,如果存在则可以表明程序被正确的安装到系统了。
| 1 2 | ls  /usr/local/nagios/ bin/     etc/     sbin/    share/   var/ | 
注;bin–Nagios执行程序所在目录,其中的nagios文件即为主程序。
etc–Nagios配置文件位置
sbin–Nagios cgi文件所在目录,也就是执行外部命令所需文件所在的目录
Share–Nagios网页文件所在的目录
var–Nagios日志文件、spid 等文件所在的目录
var/archives–日志归档目录
var/rw–用来存放外部命令文件
5、配置NGINX
1)、配置Nagios Web界面登陆帐号及密码
| 1 | htpasswd -c /usr/local/nagios/etc/nagiospasswd mike | 
如果你没有htpasswd(这个工具由Apache安装包所提供),可在线生成需要加密数据。 
a)、访问http://www.4webhelp.net/us/password.php生成需要加密数据
b)、创建加密验证文件
| 1 2 3 4 | vi /usr/local/nagios/etc/nagiospasswd #加入生成的加密数据,冒号前是用户名,后面是加密后的密码 mike:25JB.R7mXY96o | 
修改Nagios配置文件,给新增的用户增加访问权限
| 1 2 3 4 5 6 7 8 9 10 | vi /usr/local/nagios/etc/cgi.cfg #以下几项中分别加入新增的用户,多用户用逗号分隔。 authorized_for_system_information=nagiosadmin,mike authorized_for_configuration_information=nagiosadmin,mike authorized_for_system_commands=nagiosadmin,mike authorized_for_all_services=nagiosadmin,mike authorized_for_all_hosts=nagiosadmin,mike authorized_for_all_service_commands=nagiosadmin,mike authorized_for_all_host_commands=nagiosadmin,mike | 
2)、修改NGINX配置,以支持WEB方式访问Nagios
正确:
server
{
listen 8008;
# server_name 192.168.1.108;
index index.html index.htm index.php;
root /usr/share/nginx/www;
# auth_basic "Nagios Access";
auth_basic_user_file /usr/local/nagios/etc/nagiospasswd;
location ~ .*\.(php|php5)?$ {
#root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ .*\.(cgi|pl)?$ {
auth_basic "Nagios Access";
auth_basic_user_file /usr/local/nagios/etc/nagiospasswd;
gzip off;
root /usr/local/nagios/sbin; #这个目录下必须有ndex.cgi
rewrite ^/nagios/cgi-bin/(.*)\.cgi /$1.cgi break;
fastcgi_pass unix:/etc/nginx/logs/perl-fcgi.sock; #注意这文件路径要对
fastcgi_param SCRIPT_FILENAME /usr/local/nagios/sbin$fastcgi_script_name;
fastcgi_index index.cgi,index.pl;
fastcgi_param REMOTE_USER $remote_user;
fastcgi_param HTTP_ACCEPT_LANGUAGE en_US;
include fastcgi_params;
fastcgi_read_timeout 60;
include /etc/nginx/fastcgi_params; #这个目录也要注意
}
# log_format www '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
#
# '"$http_user_agent" $http_x_forwarded_for';
# access_log /etc/nginx/logs/access_www.log wwwlogs;
}
方法二:以http://ip/nagios方式访问
在WEB主目录下创建一个软链
| 1 | ln -s  /usr/local/nagios/share/  /data0/htdocs/www/nagios | 
NGINX配置片断如下
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | server   {     listen       80;     server_name  192.168.1.108;     index index.html index.htm index.php;     root  /data0/htdocs/www;     auth_basic "Nagios Access";     auth_basic_user_file /usr/local/nagios/etc/nagiospasswd;     location ~ .*\.(php|php5)?$     {            #fastcgi_pass  unix:/tmp/php-cgi.sock;       fastcgi_pass  127.0.0.1:9000;       fastcgi_index index.php;       include fcgi.conf;     }     location ~ .*\.(cgi|pl)?$     {     gzip off;     root   /usr/local/nagios/sbin;     rewrite ^/nagios/cgi-bin/(.*)\.cgi /$1.cgi break;     fastcgi_pass  unix:/usr/local/webserver/nginx/logs/perl-fcgi.sock;     fastcgi_param SCRIPT_FILENAME /usr/local/nagios/sbin$fastcgi_script_name;     fastcgi_index index.cgi;     fastcgi_read_timeout   60;     fastcgi_param  REMOTE_USER        $remote_user;     include fcgi.conf;     auth_basic "Nagios Access";     auth_basic_user_file /usr/local/nagios/etc/nagiospasswd;     }     log_format  wwwlogs  '$remote_addr - $remote_user [$time_local] "$request" '                '$status $body_bytes_sent "$http_referer" '                '"$http_user_agent" $http_x_forwarded_for';     access_log  /data1/logs/access_www.log  wwwlogs;   } | 
注:如果你的fastcgi的配置文件中没有配置REMOTE_USER参数,一定要在nginx.conf中加上下面这个fastcgi的参数定义。
| 1 | fastcgi_param  REMOTE_USER        $remote_user; | 
如果没有这个fastcgi的参数定义,Nagios就不能正确验证你的登陆信息。网上大多数文章解决Nginx下Nagios登陆验证失败的方法都是在Nagios的cgi.cfg配置文件(nagios/etc/cgi.cfg)中关掉验证(use_authentication=0)或设置一个缺省的登陆用户(default_user_name=test),这两种方法都是不安全的。
6、编译并安装Nagios插件
由于Nagios主程序只是提供一个运行框架,其具体监控是靠运行在其下的插件完成的,所以Nagios插件是必须安装的。
| 1 2 3 4 5 | tar zxvf nagios-plugins-1.4.15.tar.gz cd nagios-plugins-1.4.15 ./configure --with-nagios-user=nagios --with-nagios-group=nagios make make install | 
验证Nagios插件是否正确安装
| 1 | ls /usr/local/nagios/libexec | 
显示安装的插件文件,即所有的插件都安装在libexec这个目录下。
7、启动服务
启动前先检查下配置文件是否正确
| 1 | /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg | 
如果没有报错,可以启动Nagios服务
| 1 | /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg | 
查看Nagios运行状态
| 1 | /usr/local/nagios/bin/nagiostats | 
8、安装NRPE
由于Nagios只能监测自己所在的主机的一些本地情况,例如,cpu负载、内存使用、硬盘使用等等。如果想要监测被监控的服务器上的这些本地情况,就要用到NRPE。NRPE(Nagios Remote Plugin Executor)是Nagios的一个扩展,它被用于被监控的服务器上,向Nagios监控平台提供该服务器的一些本地的情况。NRPE可以称为Nagios的Linux客户端。
由于NRPE是通过SSL方式在监控和被监控主机上进行数据传输的,所以必须先安装ssl相关的软件包。
| 1 | apt-get install libssl-dev libssl0.9.8 | 
编译安装NRPE
| 1 2 3 4 5 6 7 | tar zxvf nrpe-2.12.tar.gz cd nrpe-2.12 ./configure                             #checking for SSL libraries... configure: error: Cannot find ssl libraries . 解决:./configure --with-ssl-lib=/usr/lib/x86_64-linux-gnu ,原因是找不到 libssl.so文件 make all make install-plugin make install-daemon make install-daemon-config | 
注:监控主机上只需要make install-plugin这一步就可以了。监控机上只要有一个check_nrpe插件用于连接被监控端nrpe的daemon就行了。发现不执行make install-daemon 和make install-daemon-config /usr/local/nagios/etc/目录下不会产生nrpe.cfg,就没有办法启动nrpe
安装xinetd
xinetd默认是已经安装好的 如果没有需要 sudo apt-get install xinetd
 cd nrpe-2.12
 make install-xinetd 
可以看到创建了这个文件/etc/xinetd.d/nrpe
| # default: on # description: NRPE (Nagios Remote Plugin Executor) service nrpe {         flags           = REUSE         socket_type     = stream         port            = 5666         wait            = no         user            = nagios         group           = nagios         server          = /usr/local/nagios/bin/nrpe         server_args     = -c /usr/local/nagios/etc/nrpe.cfg --inetd         log_on_failure  += USERID         disable         = no         only_from       = 127.0.0.1在后面增加监控主机的地址0.111,以空格间隔 } | 
| # Local services nrpe            5666/tcp                        # nrpe | 
| Stopping xinetd: [  OK  ] Starting xinetd: [  OK  ] | 
| [root@dbpi nrpe-2.8.1]# /usr/local/nagios/libexec/check_nrpe -H localhost NRPE v2.8.1 | 
也就是在本地用check_nrpe连接nrpe daemon是正常的
| # The following examples use hardcoded command arguments... command[check_users]=/usr/local/nagios/libexec/check_users -w 5 -c 10 command[check_load]=/usr/local/nagios/libexec/check_load -w 15,10,5 -c 30,25,20 command[check_hda1]=/usr/local/nagios/libexec/check_disk -w 20 -c 10 -p /dev/hda1 command[check_zombie_procs]=/usr/local/nagios/libexec/check_procs -w 5 -c 10 -s Z command[check_total_procs]=/usr/local/nagios/libexec/check_procs -w 150 -c 200 | 
| /usr/local/nagios/libexec/check_nrpe -H localhost -c check_users | 
| /usr/local/nagios/libexec/check_nrpe -H localhost -c check_load | 
| /usr/local/nagios/libexec/check_nrpe -H localhost -c check_hda1 | 
| /usr/local/nagios/libexec/check_nrpe -H localhost -c check_zombie_procs | 
| /usr/local/nagios/libexec/check_nrpe -H localhost -c check_total_procs | 
启动NRPE
| 1 | /usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d | 
验证NRPE是否正确安装
| 1 | /usr/local/nagios/libexec/check_nrpe -H localhost | 
注:如果成功,会返回NRPE的版本号。
| ######################################################################## # # 2007.9.5 add by yahoon # NRPE COMMAND # ######################################################################## # 'check_nrpe ' command definition define command{         command_name check_nrpe         command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$         } | 
| command_name check_nrpe 定义命令名称为check_nrpe,在services.cfg中要使用这个名称. | 
| command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ 这是定义实际运行的插件程序.这个命令行的书写要完全按照check_nrpe这个命令的用法.不知道用法的就用check_nrpe –h查看 | 
| define service{         host_name               dbpi 被监控的主机名,这里注意必须是linux且运行着nrpe,而且必须是hosts.cfg中定义的         service_description     check-load         监控项目的名称         check_command           check_nrpe!check_load         监控命令是check_nrpe,是在commands.cfg中定义的,带的参数是check_load,是在nrpe.cfg中定义的         max_check_attempts      5         normal_check_interval   3         retry_check_interval    2         check_period            24x7         notification_interval   10         notification_period     24x7         notification_options    w,u,c,r         contact_groups          sagroup         } | 
| command[check_swap]=/usr/local/nagios/libexec/check_swap -w 20% -c 10% | 
| define service{         host_name               dbpi         service_description     check-swap         check_command           check_nrpe!check_swap         max_check_attempts      5         normal_check_interval   3         retry_check_interval    2         check_period            24x7         notification_interval   10         notification_period     24x7         notification_options    w,u,c,r         contact_groups          sagroup         } | 
| vi /etc/init.d/nagios 将prefix=/usr/local/nagiosaa改为安装的目录/etc/init.d/nagios | 
| # Local services #nrpe           5666/tcp                        # nrpe | 
| # NOTE: This option is ignored if NRPE is running under either inetd or xinetd allowed_hosts=127.0.0.1,192.168.0.111 注意两个地址以逗号隔开 | 
C、Nagios被控端安装配置
1、创建Nagios用户及组
建立Nagios账号
| 1 | /usr/sbin/useradd -m -s /sbin/nologin nagios | 
2、编译并安装Nagios插件
| 1 2 3 4 5 6 | tar zxvf nagios-plugins-1.4.15.tar.gz cd nagios-plugins-1.4.15 ./configure --with-nagios-user=nagios --with-nagios-group=nagios make make install cd ..            //如果安装出现错误可看日志中解决办法 | 
验证程序是否被正确安装:
| 1 | ls /usr/local/nagios/libexec | 
显示安装的插件文件,即所有的插件都安装在libexec这个目录下。
3、安装NRPE
| 1 2 3 4 5 6 7 8 | tar zxvf nrpe-2.12.tar.gz cd nrpe-2.12 ./configure make all make install-plugin make install-daemon make install-daemon-config cd ..       //如果安装出现错误可看日志中解决办法 | 
4、启动NRPE
| 1 | /usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d | 
验证NRPE是否正确安装
| 1 | /usr/local/nagios/libexec/check_nrpe -H localhost | 
注:如果成功,会返回NRPE的版本号。
5、修改NRPE配置文件,让监控主机可以访问被监控主机的NRPE。
缺省NRPE配置文件中只允许本机访问NRPE的Daemon
| 1 2 3 4 | vi /usr/local/nagios/etc/nrpe.cfg #缺省为127.0.0.1,只能本机访问 allowed_hosts=127.0.0.1,192.168.0.140监控端ip | 
6、重启nrpe的方法
| 1 2 | killall nrpe /usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d 添加一台监控机,监控主机上操作: 在监控机操作/usr/local/nagios/etc/objects/commands.cfg 添加nrpe的定义 # 'check_nrpe ' command definition define command{ command_name check_nrpe command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ } 监控主机上操作: 增加如下文件的目的为实时更新相关服务监控信息(数据显示的比较慢) 增加192.168.0.104.cfg 为要监控主机的主机信息和监控服务 192.168.0.104为被监控端ip 在/usr/local/nagios/etc/objects/ 目录下新建文件:192.168.0.104.cfg 把192.168.0.104.cfg添加到nagios主机: # echo "cfg_file=/usr/local/nagios/etc/objects/1192.168.0.104.cfg" >>  /usr/local/nagios/etc/nagios.cfg vi /usr/local/nagios/etc/nagios.cfg cfg_file=/usr/local/nagios/etc/objects/commands.cfg cfg_file=/usr/local/nagios/etc/objects/contacts.cfg cfg_file=/usr/local/nagios/etc/objects/timeperiods.cfg cfg_file=/usr/local/nagios/etc/objects/templates.cfg #cfg-file=/usr/local/nagios/etc/objects/hosts.cfg #cfg-file=/usr/local/nagios/etc/objects/services.cfg # Definitions for monitoring the local (Linux) host cfg_file=/usr/local/nagios/etc/objects/localhost.cfg cfg_file=/usr/local/nagios/etc/objects/192.168.0.104.cfg # Definitions for monitoring a Windows machine 如果要再添加新机器方法炮制就可以了 vi /usr/local/nagios/etc/object/192.168.0.104.cfg define host{         use linux-server         host_name 104         alias test         address 192.168.0.104 } define service{         use                             generic-service         ; Name of service template to use         host_name                       104         service_description             PING         check_command                   check_nrpe!check_ping         } define service{         use generic-service         host_name 104         service_description CPU Load         check_command check_nrpe!check_load } define service{         use generic-service         host_name 104         service_description Current Users          check_command    check_nrpe!check_users } define service{         use generic-service         host_name 104         service_description Disk Free Space /         check_command check_nrpe!check_disk_root } define service{         use generic-service         host_name 104         service_description Total Processes         check_command check_nrpe!check_total_procs } define service{         use generic-service         host_name 104         service_description Zombie Processes         check_command check_nrpe!check_zombie_procs } define service{         use generic-service         host_name 104         service_description Swap Usage         check_command      check_nrpe!check_swap  } define service{         use     generic-service         host_name       104         service_description     data1         check_command          check_nrpe!check_disk_data1         max_check_attempts 5         normal_check_interval 1 } 重启监控机nagios # /etc/init.d/nagios restart 检查服务端配置文件是否正确(包括你添加的192.168.0.104.cfg文件中的错误) /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg  在被监控主机上设置如下: vi /usr/local/nagios/etc/nrpe.cfg allowed_hosts=127.0.0.1,192.168.0.140 command[check_users]=/usr/local/nagios/libexec/check_users -w 1 -c 1 command[check_load]=/usr/local/nagios/libexec/check_load -w 15,10,5 -c 30,25,20 #command[check_hda1]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/hda1 command[check_zombie_procs]=/usr/local/nagios/libexec/check_procs -w 5 -c 10 -s Z command[check_total_procs]=/usr/local/nagios/libexec/check_procs -w 150 -c 200 command[check_swap]=/usr/local/nagios/libexec/check_swap -w 30 -c 20 command[check_disk_root]=/usr/local/nagios/libexec/check_disk -w 20 -c 10 / command[check_disk_data1]=/usr/local/nagios/libexec/check_disk -w 20 -c 10 /data1 command[check_ping]=/usr/local/nagios/libexec/check_ping -w 100.0,20%  -c 500.0,60% killall nrpe/usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d, 在监控主机上执行(执行此条目的为强制更新 相关服务数据) /usr/local/nagios/libexec/check_nrpe -H 被监控IP -c 执行的监控服务(被监控主机libexec下的,也就是被监控主机/usr/local/nagios/etc/nrpe.cfg中所定义的监控服务) 执行一条 nagios服务 就会显示一条 要监控几个服务 就执行几个服务 服务端: 监控端需要配置被监控端的配置文件,其中包括 host和services,如192.168.0.104.cfg commands.cfg中配置check_nrpe使用命令,这个命令用于连接被监控端的nrpe.cfg 被监控端: 首先 libexec下要有nrpe.cfg中定义服务执行的插件, 原理: 服务器端加载被监控端的配置文件,通过用check_nrpe去连接被监控端的nrpe.cfg,被监控端执行nrpe.cfg中服务命令执行格式, 例如: 服务端添加被监控端的配置文件 define host{         use linux-server         host_name 104         alias test         address 192.168.0.104 }  define service{         use generic-service         host_name 104         service_description Swap Usage         check_command      check_nrpe!check_swap } 被监控端: nrpe.cfg command[check_swap]=/usr/local/nagios/libexec/check_swap -w 30 -c 20    | 
三、参考文档
http://www.google.com
http://www.linuxidc.com/Linux/2011-05/36092.htm
http://bbs.linuxtone.org/forum.php?mod=viewthread&tid=7404&page=1
http://www.xtgly.com/2010/09/21/centos-5-5-nginx-nagios监控端和被控端安装配置指南.htm
http://www.xtgly.com/2010/09/20/nginx-fastcgi-perl-pl、cgi支持.htm
 
                    
                     
                    
                 
                    
                
 
                
            
         
         浙公网安备 33010602011771号
浙公网安备 33010602011771号