Nagios通过check_http监控一台web应用服务器上多个tomcat服务

如何在nagios监控tomcat,是一个比较简单又复杂的事情,简单是因为如果只监控web应用服务器的一个tomcat服务是否正常运行,那么比较简单;如果要监控tomcat的其他比如连接数比如jvm内存使用率等就比较复杂,google没有适合的监控脚本;如果要监控web应用上面的多个tomcat服务器,而且很多tomcat服务都是跳转式的,那就需要多做很多事情。

一般通常都使用tcp tomcat端口的方式,不过这有一个bug就是tomcat假死的情况下,tcp 端口是OK的,但是tomcat里面部署的web应用其实已经不能正常访问,这个时候需要使用http方式来监控tomcat的状态。

所以本文就记录了如何采用http方式来监控一台web服务器上多个tomcat应用服务器。

1在tomcat web服务器上安装nrpe客户端:

Rpm包下载地址为:http://download.csdn.net/detail/mchdba/7493875

1.1,rpm方式安装nrpe客户端

[[email protected] nagios]# ll
总计 768
-rw-r--r-- 1 root root 713389 12-16 12:08 nagios-plugins-1.4.11-1.x86_64.rpm
-rw-r--r-- 1 root root  32706 12-16 12:09 nrpe-2.12-1.x86_64.rpm
-rw-r--r-- 1 root root  18997 12-16 12:08 nrpe-plugin-2.12-1.x86_64.rpm

[[email protected] nagios]# rpm -ivh *.rpm --nodeps  --force
Preparing...                ########################################### [100%]
   1:nagios-plugins         ########################################### [ 33%]
id: nagios:无此用户
   2:nrpe                   ########################################### [ 67%]
   3:nrpe-plugin            ########################################### [100%]
[[email protected] ~]#

1.2 在配置文件最末尾,添加配置信息以及监控主机服务器ip地址

[[email protected] localhost nagios]# vim /etc/nagios/nrpe.cfg
# add by tim on 2014-06-11
command[check_users]=/usr/local/nagios/libexec/check_users -w 8 -c 15
command[check_load]=/usr/local/nagios/libexec/check_load -w 15,10,5 -c 30,25,20
command[check_sda1]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/sda
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 50 -c 80
command[check_total_procs]=/usr/local/nagios/libexec/check_procs -w 750 -c 800
command[check-host-alive]=/usr/local/nagios/libexec/check_ping -H 10.xx.xx.10 -w 3000.0,80% -c 5000.0,100% -p 5
allowed_hosts = 127.0.0.1,10.xx.xxx.xx1

check下命令是否生效:

[[email protected] nrpe-2.15]# /usr/local/nagios/libexec/check_users -w 8 -c 15
USERS OK - 2 users currently logged in |users=2;8;15;0
[[email protected] nrpe-2.15]#

看到已经USERS OK -….命令已经生效。

1.3 启动nrpe报错如下:

[[email protected] ~]# service nrpe restart
Shutting down nrpe:                                        [失败]
Starting nrpe: /usr/sbin/nrpe: error while loading shared libraries: libssl.so.6: cannot open shared object file: No such file or directory
                                                           [失败]
[[email protected] ~]#
[[email protected] nagios_client]# service nrpe start
Starting nrpe: /usr/sbin/nrpe: error while loading shared libraries: libssl.so.6: cannot open shared object file: No such file or directory
                                                           [失败]
[[email protected] nagios_client]#

建立软连接

[[email protected] nagios_client]# ln -s /usr/lib64/libssl.so /usr/lib64/libssl.so.6

(如果没有libssl.so,就采用别的libssl.so.10来做软连接,ln -s /usr/lib64/libssl.so.10 /usr/lib64/libssl.so.6)

[[email protected] nagios_client]#

再重新启动如下:

[[email protected] nagios_client]# service nrpe start
Starting nrpe: /usr/sbin/nrpe: error while loading shared libraries: libcrypto.so.6: cannot open shared object file: No such file or directory
                                                           [失败]
[[email protected] ~]# ll /usr/lib64/libcrypto.so
lrwxrwxrwx. 1 root root 18 10月 13 2013 /usr/lib64/libcrypto.so -> libcrypto.so.1.0.0
[[email protected] nagios_client]#

再建软链接:

[[email protected] nagios_client]# ln -s /usr/lib64/libcrypto.so /usr/lib64/libcrypto.so.6
(或者如果没有libcrypto.so,就采用libcrypto.so.10做软连接, ln -s /usr/lib64/libcrypto.so.10 /usr/lib64/libcrypto.so.6)
[[email protected] nagios_client]# service nrpe start
Starting nrpe:                                             [确定]
[[email protected] nagios_client]#

1.4 检测下nrpe是否正常运行:

去nagios服务器端check下

[[email protected] ~]#  /usr/local/nagios/libexec/check_nrpe -H 10.xx.xx.10
NRPE v2.12
[[email protected] ~]#

看到返回NRPE v2.15表示已经连接成功。

1.5 在web应用下添加检测jsp文件

(1) 建立测试文件

vim ./webapps/nagios_test_0611/nagios_test_0611.jsp
<%@ page language="java" contentType="text/html; charset=gb2312"
pageEncoding="gb2312"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>nagios test here</title>
</head>
<body>
 <center>Now time is: <%=new java.util.Date()%></center>
</body>
</html>

(2) 去check下check_http命令

[[email protected]~]# /usr/local/nagios/libexec/check_http -I 10.xx.xx.10 -p 8300 -u /nagios_test_0611/nagios_test_0611.jsp -e 200
HTTP CRITICAL - Invalid HTTP response received from host on port 8300: HTTP/1.1 404 Not Found

需要重启一下tomcat,使新添加的jsp生效能打开,执行如下stop start命令:

/usr/local/app/apache-tomcat-6.0.37_8300/bin/shutdown.sh

/usr/local/app/apache-tomcat-6.0.37_8300/bin/startup.sh

再执行check_http命令

[[email protected]~]# /usr/local/nagios/libexec/check_http -I 10.xx.xx.10 -p 8300 -u /nagios_test_0611/nagios_test_0611.jsp -e 200
HTTP OK: Status line output matched "200" - 571 bytes in 0.882 second response time |time=0.882479s;;;0.000000 size=571B;;;0
[[email protected] webserver ~]#

1.6查看NRPE的监控命令

[[email protected] nrpe-2.15]#  cat /etc/nagios/nrpe.cfg |grep -v "^#"|grep -v "^$"
log_facility=daemon
pid_file=/var/run/nrpe.pid
server_port=5666
nrpe_user=nagios
nrpe_group=nagios

dont_blame_nrpe=0
debug=0
command_timeout=60
connection_timeout=300
command[check_users]=/usr/local/nagios/libexec/check_users -w 8 -c 15
command[check_load]=/usr/local/nagios/libexec/check_load -w 15,10,5 -c 30,25,20
command[check_sda1]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/sda
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 750 -c 800
command[check-host-alive]=/usr/local/nagios/libexec/check_ping -H 10.xx.xx.10 -w 3000.0,80% -c 5000.0,100% -p 5
allowed_hosts=127.0.0.1,10.xx.xxx.xx1
[[email protected] nrpe-2.15]#

2,去nagios服务器端添加host等监控信息。

2.1 在hosts.cfg里面添加主机信息

define host{
        use                     linux-server
        host_name               webserver
        alias                   webserver
        address                 10.xx.xx.10
        check_command           check-host-alive
        max_check_attempts              5
        check_period                    24x7
        contact_groups                  ops
        notification_interval           60
        notification_period             24x7
        notification_options            d,u,r
        }


2.2 在service.cfg里面添加web机器监控的命令信息

# No.007 webserver
#  service definition
define service{
        host_name               webserver
        service_description     check_load
        check_command           check_nrpe!check_load
        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          opsweb
        }

define service{
        host_name               webserver
        service_description     check-host-alive
        check_command           check-host-alive
        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          opsweb
        }

define service{
        host_name               webserver
        service_description     Check Disk sda1
        check_command           check_nrpe!check_sda1
        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          opsweb
        }

define service{
        host_name               webserver
        service_description     Total Processes
        check_command           check_nrpe!check_total_procs
        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          opsweb
        }

define service{
        host_name               webserver
        service_description     Current Users
        check_command           check_nrpe!check_users
        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          opsweb
        }

define service{
        host_name               webserver
        service_description     Check Zombie Procs
        check_command           check_nrpe!check_zombie_procs
        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          opsweb
        }

define service{
        host_name               webserver
        service_description     Check Tomcat 9300 Status
        check_command           check_nrpe!check_tomcat_9300_status
        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          opsweb
        }
 


2.3 在vim contacts.cfg添加新的opsweb邮件组信息

define contactgroup{
        contactgroup_name       opsweb
        alias                   pl ops team
        members                 tim,mch,nagiosadmin
        }

2.4 添加新的监控tomcat的命令,check_tomcat_9300_status

这里不采用check_tcp!8080端口的方式,是因为在实际中tomcat服务假死之后,jsp的网页都是打不开的,但是这个监控端口8080都是正常的,不会报警出来;所以采用check_http的方式,新建立一个通用的/nagios_test_0611/nagios_test_0611.jsp文件,来检测这个jsp的访问情况,如下所示:

vim commands.cfg
# add by tim on 20140611
define command{
        command_name    check_tomcat_9300_status
        command_line    $USER1$/check_http -I $HOSTADDRESS$ -p $PORT$ -u $URL$ -e $N200$ -w $Warning$ -c$Cri$
        }

Jsp文件内容如下:

[[email protected] webapps]# vim . /nagios_test_0611/nagios_test_0611.jsp
<%@ page language="java" contentType="text/html; charset=gb2312"
pageEncoding="gb2312"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>nagios test here</title>
</head>
<body>
 <center>Now time is: <%=new java.util.Date()%></center>
</body>
</html>

2.5 在被监控客户端的nrpe.cfg配置文件里面添加tomcat端口配置信息:

command[check_tomcat_9300_status]=/usr/local/nagios/libexec/check_http -I 10.xx.xx.10 -p 9444 -u /nagios_test_0611/nagios_test_0611.jsp -e 200 -w 5 -c 10
command[check_tomcat_8300_status]=/usr/local/nagios/libexec/check_http -I 10.xx.xx.10 -p 8300 -u /nagios_test_0611/nagios_test_0611.jsp -e 200 -w 5 -c 10

2.6 测试报错

[[email protected] objects]# /usr/local/nagios/libexec/check_nrpe -H 10.xx.xx.10  -c check_load
NRPE: Unable to read output
[[email protected] objects]#

已经添加了tomcat930端口,现在再添加一个tomcat8300端口

去服务器端shell命令行里面check下

/usr/local/nagios/libexec/check_nrpe -H 192.168.15.178 -c check_mysql_myisam_lock
[[email protected] etc]# /usr/local/nagios/libexec/check_nrpe -H 10.xx.xx.10  -c check_load
NRPE: Unable to read output
[[email protected] etc]#

同样报错,那么可能就是nagios被监控端的问题。

最终检查是nrpe.cfg里面路径有误,源码安装默认路径是:/usr/local/nagios/libexec/check_http,rpm安装默认路径是:/usr/lib/nagios/plugins/。这里是rpm安装,所以nrpe.cfg配置文件里面用后面rpm的路径/usr/lib/nagios/plugins/,替换下service nrpe restart之后,问题解决,如下图所示:

3 tomcat多端口监控报警

已经添加了tomcat930端口,现在再添加一个tomcat8300端口

3.1 客户端的nrpe.cfg里面添加配置

[[email protected] root]# vim /etc/nagios/nrpe.cfg
command[check_tomcat_8300_status]=/usr/lib/nagios/plugins/check_http -I 10.xx.xx.10 -p 8300 -u /xx_xx_xx/index.html -e 200 -w 5 -c 10

3.2 nagios服务器端
添加command命令

[[email protected] etc]# vim ./objects/commands.cfg
define command{
        command_name    check_tomcat_8300_status
        command_line     $USER1$/check_http -I $HOSTADDRESS$ -p $PORT$ -u $URL$ -e $N200$ -w $Warning$ -c$Cri$
        }

添加service服务

define service{
        host_name               webserver
        service_description     Tomcat_8300_Status
        check_command           check_nrpe!check_tomcat_8300_status
        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          opsweb
        }

3.3 在nagios服务器上check下新添加的命令是否生效

[[email protected] etc]# /usr/local/nagios/libexec/check_nrpe -H 10.xx.xx.10  -c check_tomcat_8300_status
HTTP OK HTTP/1.1 200 OK - 611 bytes in 0.003 seconds |time=0.003152s;5.000000;10.000000;0.000000 size=611B;;;0
[[email protected] etc]#

看到命令已经生效。

3.4 重启nagios服务器,查看结果

[[email protected] etc]# service nagios reload
Running configuration check...
Reloading nagios configuration...
done
[[email protected] etc]#

重启后,过3分钟,新的tomcat8300已经监控起来了,如下图所示:

为了验证tomcat的监控效果,在web服务器客户端,停掉tomcat的9300端口,一会就会收到报警email,也会在nagios页面看到红色报警提示,如下所示:

这标示2个nagios选项监控的是2个端口,一个9300,一个8300;

4  添加新端口8200检测-e 200报错问题解决

[[email protected] OCC_MANAGER_Web]#  /usr/lib/nagios/plugins/check_http -I 10.xx.xx.10 -p 8200 -u /OCC_REPORT_Web/index.html -e 200 -w 5 -c 10
HTTP CRITICAL - Invalid HTTP response received from host on port 8200
[[email protected] OCC_MANAGER_Web]#


4.1 直接访问tomcat服务以及indexhtml

http://10.xx.xx.10:8200/OCC_REPORT_Web/index.html是可以访问的,但是会跳转到

http://www.xxxx.xx/OCC_SSO_Web/login.htm?redirect=http%3A%2F%2F10.xx.xx.10%3A8200%2FOCC_REPORT_Web%2Findex.html的页面,证明web应用都是正常的,只是已经被跳转到别的域名页面而已。

4.2 –v详细分析

这个时候tomcat服务器是正常running的,而且web应用也是正常返回的,只是运行 看到这里大概意思是从8200端口获取无效的HTTP响应,因为这条命令最重要的是监控/OCC_REPORT_Web/index.html获取http信息并通过-e 200来判断http正常响应的OK状态,所以去掉报警的-w 5 –c 10参数,去掉-e 200的字符比对信息,看下check的返回信息。

[[email protected] OCC_MANAGER_Web]# /usr/lib/nagios/plugins/check_http -I 10.xx.xx.10 -p 8200 -u /OCC_REPORT_Web/index.html
HTTP OK - HTTP/1.1 302 Found - 0.003 second response time |time=0.003367s;;;0.000000 size=317B;;;0

看到返回的是HTTP/1.1 302 Found 查看Tomcat错误代码知道是产生了新的URL信息

……

301  Moved Permanently  客户请求的文档在其他地方,新的URL在Location头中给出,浏览器应该自动地访问新的URL。
302  Found  类似于301,但新的URL应该被视为临时性的替代,而不是永久性的。注意,在HTTP1.0中对应的状态信息是“Moved Temporatily”。

……

最后加入-v参数调试看详细的获取信息:

[[email protected] OCC_MANAGER_Web]# /usr/lib/nagios/plugins/check_http -H www.xxxx.com -I 10.xx.xx.10 -p 8200 -u /OCC_REPORT_Web/index.html -v
GET /OCC_REPORT_Web/index.html HTTP/1.0
User-Agent: check_http/v1861 (nagios-plugins 1.4.11)
Connection: close
Host: www.xxxx.com

http://10.xx.xx.10:8200/OCC_REPORT_Web/index.html is 323 characters
STATUS: HTTP/1.1 302 Found
**** HEADER ****
Server: Apache-Coyote/1.1
Set-Cookie: ploccSessionId=45CD9C9921A5B89C59FCB2E34FE52734; Path=/
Location: http://www.xxx.com/OCC_SSO_Web/login.htm?redirect=http%3A%2F%2Fwww.xxx.com%2FOCC_REPORT_Web%2Findex.html
Content-Length: 0
Date: Thu, 12 Jun 2014 02:52:45 GMT
Connection: close
**** CONTENT ****
HTTP OK - HTTP/1.1 302 Found - 0.003 second response time |time=0.003268s;;;0.000000 size=323B;;;0

看到页面重定向到域名系统,tomcat服务器是正常运行的,所以302 Found也可以表示tomca服务器正常运转无误,因为架构是用的lvs负载均衡,所以如果动用跳转后的公用域名来判断的话,就不能确定是否是这个主机的tomcat,因为公用域名每次只对应其中一个tomcat服务,因为这里是监控具体的一台web服务器的tomcat,所以去监控302端口也是一个不错的办法,这里可以去修改客户端nrpe.cfg里面的8200端口的监控命令,改成监控tomcat的302状态值:

Vim /etc/nagios/nrpe.cfg
/usr/lib/nagios/plugins/check_http -I 10.xx.xx.10 -p 8200 -u /OCC_REPORT_Web/index.html  -e 302 -w 3 -c 10

报错记录(一): NRPE: Unable to read output

[1402557345] SERVICE ALERT: webserver;Tomcat_6100_OCC_SSO_Service_Status;UNKNOWN;SOFT;3;NRPE: Unable to read output

解决:一般是nrpe路径不对。

报错记录(二):CHECK_NRPE: Error - Could not complete SSL handshake.

[[email protected] etc]# /usr/local/nagios/libexec/check_http -I 10.xx.3.xx -p 8100 -u /tradeAdmin/index.html

HTTP OK: HTTP/1.1 302 Found - 319 bytes in 0.064 second response time |time=0.064033s;;;0.000000 size=319B;;;0

[[email protected] etc]#

[[email protected] etc]# /usr/local/nagios/libexec/check_nrpe -H 10.xx.3.xx -c check_load

CHECK_NRPE: Error - Could not complete SSL handshake.

[[email protected] etc]#

解决:/etc/nagios/nrpe.cfg里面没有添加nagios服务器主机ip地址

Vim /etc/nagios/nrpe.cfg

allowed_hosts=127.0.0.1,10.xx.xxx.xx1

之后重启nrpe,service nrpe restart;再去nagios服务器上验证OK:

[[email protected] etc]# /usr/local/nagios/libexec/check_nrpe -H 10.xxx.3.xx -c check_load
OK - load average: 0.43, 0.17, 0.06|load1=0.430;15.000;30.000;0; load5=0.170;10.000;25.000;0; load15=0.060;5.000;20.000;0;
[[email protected] etc]#

Nagios通过check_http监控一台web应用服务器上多个tomcat服务

时间: 2024-07-30 13:43:42

Nagios通过check_http监控一台web应用服务器上多个tomcat服务的相关文章

Cacti监控一台Web服务器上多个Tomcat端口的实现

因为一台web应用服务器上面安装了多台tomcat,有多个端口,比如默认的8080,还有后续追加的9100,9300,9500等等.一个cacti_host_template_tomcat_server.xml模板只能指定监控一个tomcat服务端口. 因此如果想要监控一台web服务器上的多个tomcat服务器,那么就必须另外想办法,按照一个host上面一个模板监控一个tomcat服务来说的话,要想在一个host上面监控多个tomcat服务就需要构建多个模板xml文件.目前想到2种方法: (1)

一台电脑同时启动多个tomcat服务

一台电脑同时启动多个tomcat服务 有时我们需要在一台电脑上同时启动多个tomcat服务,这个时候怎么配置呢? 一.要使用绿色版tomcat,不能使用安装版. 二.配置好第一个tomcat. 三.现在配置第二个tomcat. 1.在tomcat\config目录下找到service.xml文件.找到< Server port="8005" shutdown="SHUTDOWN">,修改port为没有使用的端口,例如8006. 2.继续找<<

nagios通过check_http监控tomcat

1.[[email protected] ~]# vi /usr/local/nagios/etc/objects/commands.cfg 添加新内容: define command{         command_name check_tomcat_8080         command_line $USER1$/check_http -I $HOSTADDRESS$ -p $PORT$ -u $URL$ -e $N200$ -w $Warning$ -c $Cri$         }

解决一台机器同时运行多个Tomcat服务

http://www.cnblogs.com/itolssy/archive/2008/09/09/1278041.html 如果不加任何修改,在一台服务器上同时运行两个Tomcat服务显然会发生端口冲突.假设现在已经按照正常的方式安装配置好了第一个Tomcat,第二个如何设置呢?以下是使用Tomcat6.0.16解压版本所做的实验. 解决办法: 1.解压Tomcat到一个新的目录,比如d:\TomcatServer2; 2.新建一个环境变量CATALINA_HOME2,路径为d:\Tomcat

一台WEB服务器上同时运行多个网站的三种方法

实验环境: 在做实验之前我们首先准备一下实验环境,首先在虚拟机上准备一台原始的干净的Windows Server 2008 R2的操作系统作为WEB服务器,ip地址设为192.168.100.10然后安装web服务器的步骤:1.首先在服务器管理器中添加角色,在服务器角色中选择Web服务器(IIS)角色,如图所示:2.IIS7.5被分割了40多个不同功能的模块,管理员可以根据需要定制安装相应的功能模块,这样可以使Web网站的受***面减少,安全性和性能大幅度提高.所以在"选择角色服务的步骤中采用默

nagios部署监控多台client

添加client节点 ####添加一台client:新加入的是一台开启了防火墙的阿里云服务器 首先搭建client环境 #监控Linux.Unix主机,安装客户端 添加nagios用户 useradd -m nagios -s /sbin/nologin #安装插件nagios-plugins cd /home/huang/tools/ wget http://www.nagios-plugins.org/download/nagios-plugins-2.1.1.tar.gz tar xfz

监控利器Nagios之一:监控本地NFS和外部HTTP、MySQL服务

监控利器Nagios之一:监控本地NFS和外部HTTP.MySQL服务 Nagios是一款开源的免费网络监视工具,能有效监控Windows.Linux和Unix的主机状态,交换机路由器等网络设置,打印机等.在系统或服务状态异常时发出邮件或短信报警第一时间通知网站运维人员,在状态恢复后发出正常的邮件或短信通知. Nagios的特点: 1.监控服务http.MySQL.nfs.tcp.ping等 2.监控主机资源cpu.负载.I/O.虚拟及内存磁盘利用率等 3.支持邮件微信等报警通信. 4.可选we

Nagios利用NRPE监控Linux主机(3)

一.利用NRPE监控远程Linux的"本地信息" 上面已经对远程Linux 主机是否存活做了监控,而判断远程机器是否存活,我们可以使用ping 工具对其监测.还有一些远程主机服务,例如ftp.ssh.http,都是对外开放的服务,即使不用Nagios,我们也可以试的出来,随便找一台机器看能不能访问这些服务就行了.但是对于像磁盘容量,cpu负载这样的"本地信息",Nagios只能监测自己所在的主机,而对其他的机器则显得有点无能为力.毕竟没得到被控主机的适当权限是不可能

nagios+ganglia分布式监控

nagios+ganglia监控批量主机 之前我们学习用nagios+cacti实现网络监控报警,如果是传统的运维工作,有这个工具就足够强大了.但是对于分布式系统的开发+运维人员(DevOps?),更关心的是掌握分布式系统的性能和可用性,根据数据做出性能调整.升级.扩容等的决策,从而保证基础设施服务能够满足不断增长的业务需求.与Cacti.Nagios.Zabbix等工具相比,Ganglia更关注整个集群的性能和可用性.可以用于集群的性能监控.分析和优化. Ganglia就是这样一种工具.Gan