Chinaunix首页 | 论坛 | 博客
  • 博客访问: 5272296
  • 博文数量: 1144
  • 博客积分: 11974
  • 博客等级: 上将
  • 技术积分: 12312
  • 用 户 组: 普通用户
  • 注册时间: 2005-04-13 20:06
文章存档

2017年(2)

2016年(14)

2015年(10)

2014年(28)

2013年(23)

2012年(29)

2011年(53)

2010年(86)

2009年(83)

2008年(43)

2007年(153)

2006年(575)

2005年(45)

分类: LINUX

2007-11-06 17:04:54

原本想简简单单用RPM包搞定Nagios的偷懒想法果然是行不通啊= =||,原来想编译安装多麻烦啊~用RPM包当然比较好,可是偏偏我RP装到了安装Nagios插件包的时候需要fping以及SNMP::NET-Perl两个功能包的缺失,在网上怎么找也找不到,尤其是fping,无论是RHEL和CentOS里都不集成。到人家官网上找RPM包,哦不,源码也好,结果人家Download里一部片空白(当时大脑里也是一片空白...囧),只好放弃。无奈选择了源码安装Nagios,本来不想多走的路结果一条都没少走。RPM包...我的RP阿...囧rz
 
系统环境:CentOS 5.0操作系统。Naigos版本为2.9稳定版。
 
一.安装Apache服务:
[root@KCentOS5C ~]# yum install httpd*
Dependencies Resolved
=============================================================================
 Package                 Arch       Version          Repository        Size
=============================================================================
Installing:
 httpd                   i386       2.2.3-6.el5.centos.1  base              1.1 M
 httpd-devel             i386       2.2.3-6.el5.centos.1  base              145 k
 httpd-manual            i386       2.2.3-6.el5.centos.1  base              830 k
Installing for dependencies:
 apr-devel               i386       1.2.7-11         base              237 k
 apr-util-devel          i386       1.2.7-6          base               54 k
Transaction Summary
=============================================================================
 
将Apache服务设定为系统启动服务
[root@KCentOS5C ~]# chkconfig httpd on

添加Nagios系统用户和同名组:
[root@KCentOS5C ~]# useradd nagios

准备好Nagios的源代码包:
[root@KCentOS5C ~]# ll
----------------------------------------------------
total 3712
-rw------- 1 root root     928 Oct  3 10:33 anaconda-ks.cfg
-rw-r--r-- 1 root root   22760 Oct  3 10:33 install.log
-rw-r--r-- 1 root root    2888 Oct  3 10:33 install.log.syslog
-rw-r--r-- 1 root root 1738698 Sep 30 22:42 nagios-2.9.tar.gz
这个就是Nagios主程序的源代码包

-rw-r--r-- 1 root root 1693979 Sep 30 22:51 nagios-plugins-1.4.10.tar.gz
这个是Nagios-plugin插件程序源代码包
 
-rw-r--r-- 1 root root  305019 Sep 30 22:58 nrpe-2.9.tar.gz
这个是Nagios远程本地监测附加功能源代码包
----------------------------------------------------
 
 
二.安装Nagios主程序:
1.解压缩Nagios主程序源代码包
[root@KCentOS5C ~]# tar -zxvf nagios-2.9.tar.gz
 
2.进入Nagios主程序包的解压目录
[root@KCentOS5C ~]# cd nagios-2.9
 
3.预配置Nagios主程序的环境以及指定安装路径
[root@KCentOS5C nagios-2.9]# ./configure --prefix=/usr/local/nagios
预配置成功后将返回配置环境信息
----------------------------------------------------
*** Configuration summary for nagios 2.9 04-10-2007 ***:
 General Options:
 -------------------------
        Nagios executable:  nagios
        Nagios user/group:  nagios,nagios
       Command user/group:  nagios,nagios
            Embedded Perl:  no
             Event Broker:  yes
        Install ${prefix}:  /usr/local/nagios
                Lock file:  ${prefix}/var/nagios.lock
           Init directory:  /etc/rc.d/init.d
                  Host OS:  linux-gnu
 Web Interface Options:
 ------------------------
                 HTML URL: 

                  CGI URL: 
 Traceroute (used by WAP):  /bin/traceroute

Review the options above for accuracy.  If they look okay,
type 'make all' to compile the main program and CGIs.
请注意看最后的提示,如果对以上反馈信息接受的话,则需要继续执行“make all”命令来编译主程序以及CGI。
-----------------------------------------------------

4.编译Nagios主程序
[root@KCentOS5C nagios-2.9]# make all
Nagios主程序编译成功后将返回信息
-----------------------------------------------------
*** Compile finished ***
If the main program and CGIs compiled without any errors, you
can continue with installing Nagios as follows (type 'make'
without any arguments for a list of all possible options):
如果在编译当中没有发生错误的话,那么可以照以下这些命令继续操作。
 
  make install
     - This installs the main program, CGIs, and HTML files
  执行“make install”命令来对主程序,CGI以及HTML网页进行安装。
 
  make install-init
     - This installs the init script in /etc/rc.d/init.d
  执行“install-init”命令来在/etc/rc.d/init.d/目录中安装启动脚本。
 
  make install-commandmode
     - This installs and configures permissions on the
       directory for holding the external command file
  执行“install-commandmode”命令来安装和配置外部命令对Nagios主路径操作的权限。(这里所谓的外部命令主要是指Apache服务通过CGI来对Nagios的进行的操作。用户将通过Web以执行CGI程序脚本的方式来对Nagios的检测结果进行读取和调用。)
 
  make install-config
     - This installs *SAMPLE* config files in /usr/local/nagios/etc
       You'll have to modify these sample files before you can
       use Nagios.  Read the HTML documentation for more info
       on doing this.  Pay particular attention to the docs on
       object configuration files, as they determine what/how
       things get monitored!
  执行“make install-config”命令将会在/usr/local/etc/这个Nagios编译安装的主配置路径下安装示例配置模板,这将对于之后的配置制定帮助很大。
*** Support Notes *******************************************
这些关于支持的信息就不再详细讲了
If you have questions about configuring or running Nagios,
please make sure that you:
     - Look at the sample config files
     - Read the HTML documentation
     - Read the FAQs online at
before you post a question to one of the mailing lists.
Also make sure to include pertinent information that could
help others help you.  This might include:
     - What version of Nagios you are using
     - What version of the plugins you are using
     - Relevant snippets from your config files
     - Relevant error messages from the Nagios log file
For more information on obtaining support for Nagios, visit:
      
*************************************************************
Enjoy.
-----------------------------------------------------

5.安装Nagios主程序、CGI以及网页
[root@KCentOS5C nagios-2.9]# make install
安装完Nagios主程序、CGI和网页的之后将提示安装成功信息以及剩余可操作的步骤
-----------------------------------------------------
*** Main program, CGIs and HTML files installed ***
You can continue with installing Nagios as follows (type 'make'
without any arguments for a list of all possible options):
  make install-init
     - This installs the init script in /etc/rc.d/init.d
  make install-commandmode
     - This installs and configures permissions on the
       directory for holding the external command file
  make install-config
     - This installs *SAMPLE* config files in /usr/local/nagios/etc
       You'll have to modify these sample files before you can
       use Nagios.  Read the HTML documentation for more info
       on doing this.  Pay particular attention to the docs on
       object configuration files, as they determine what/how
       things get monitored!
-----------------------------------------------------

6.安装Nagios的系统启动脚本
[root@KCentOS5C nagios-2.9]# make install-init
安装完Nagios的系统启动脚本之后将提示脚本安装成功信息以及剩余可操作的步骤
-----------------------------------------------------
*** Init script installed ***
You can continue with installing Nagios as follows (type 'make'
without any arguments for a list of all possible options):
  make install-commandmode
     - This installs and configures permissions on the
       directory for holding the external command file
  make install-config
     - This installs *SAMPLE* config files in /usr/local/nagios/etc
       You'll have to modify these sample files before you can
       use Nagios.  Read the HTML documentation for more info
       on doing this.  Pay particular attention to the docs on
       object configuration files, as they determine what/how
       things get monitored!
-----------------------------------------------------

7.将Nagios的启动脚本添加到系统服务当中去
[root@KCentOS5C ~]# chkconfig --add nagios
 
8.将Nagios服务加入到系统启动服务当中去
[root@KCentOS5C ~]# chkconfig nagios on
 
9.安装和配置外部命令对Nagios主路径的操作权限
[root@KCentOS5C nagios-2.9]# make install-commandmode
安装配置外操作权限后将提示配置成功信息以及剩余可操作步骤
-----------------------------------------------------
*** External command directory configured ***
You can continue with installing Nagios as follows (type 'make'
without any arguments for a list of all possible options):
  make install-config
     - This installs *SAMPLE* config files in /usr/local/nagios/etc
       You'll have to modify these sample files before you can
       use Nagios.  Read the HTML documentation for more info
       on doing this.  Pay particular attention to the docs on
       object configuration files, as they determine what/how
       things get monitored!
-----------------------------------------------------

10.将Apache服务宿主用户加到nagios组里面
这样做是为了让Apache有适当的权限能够通过CGI脚本程序对Nagios进行调用,否则Apache将没有权限调用Nagios,用户通过Web将无法访问Nagios处理的所有信息。
[root@KCentOS5C nagios-2.9]# usermod -G nagios apache

11.安装Nagios的配置模板
[root@KCentOS5C nagios-2.9]# make install-config
安装完毕Nagios的配置模板后将反馈安装成功的提示信息。
-----------------------------------------------------
*** Sample config file installed ***
Remember, these are *SAMPLE* config files.  You'll need to read
the documentation for more information on how to actually define
services, hosts, etc. to fit your particular needs.
If you have questions about configuring Nagios properly, please:
       - Look at the sample config files
       - Read the HTML documentation
       - Read the FAQs online at

*BEFORE* you post a question to one of the mailing lists.
-----------------------------------------------------
 
 
三.安装Nagios-plugins插件程序:
1.解压缩Nagios-plugins插件源代码包
[root@KCentOS5C ~]# tar -zxvf nagios-plugins-1.4.10.tar.gz
 
2.进入Nagios-plugins插件包目录
[root@KCentOS5C ~]# cd nagios-plugins-1.4.10
 
3.预配置Nagios-plugin插件程序的环境以及指定安装路径
[root@KCentOS5C nagios-plugins-1.4.10]# ./configure --prefix=/usr/local/nagios/
预配置完成的话将会建立Makefile并反馈检测系统环境的结果。
-----------------------------------------------------
config.status: creating po/Makefile
            --with-apt-get-command:
              --with-ping6-command: /bin/ping6 -n -U -w %d -c %d %s
               --with-ping-command: /bin/ping -n -U -w %d -c %d %s
                       --with-ipv6: yes
                      --with-mysql: no
                    --with-openssl: yes
                     --with-gnutls: no
                       --with-perl: /usr/bin/perl
             --enable-perl-modules: no
                     --with-cgiurl: /nagios/cgi-bin
               --with-trusted-path: /bin:/sbin:/usr/bin:/usr/sbin
-----------------------------------------------------
 
4.编译Nagios-plugin插件程序
[root@KCentOS5C nagios-plugins-1.4.10]# make
 
5.安装Nagios-plugin插件程序 
[root@KCentOS5C nagios-plugins-1.4.10]# make install
 
6.查看安装情况
[root@KCentOS5C nagios-plugins-1.4.10]# ll /usr/local/nagios/
-----------------------------------------------------
total 28
drwxrwxr-x 2 nagios nagios 4096 Oct  5 13:25 bin
drwxrwxr-x 2 nagios nagios 4096 Oct  5 19:03 etc
drwxr-xr-x 2 root   root   4096 Oct  5 19:07 libexec

drwxrwxr-x 2 nagios nagios 4096 Oct  5 13:25 sbin
drwxrwxr-x 9 nagios nagios 4096 Oct  5 19:07 share
drwxrwxr-x 4 nagios nagios 4096 Oct  5 19:08 var
-----------------------------------------------------
只要Nagios主路径下出现libexec目录就说明安装成功了,这个目录里面存放着就是Nagios插件执行程序。但是有个问题,就是刚安装好会有一些目录和文件的属主是root。这里的libexec就有这个问题。
 
7.递归更改Nagios主路径的属主
[root@KCentOS5C nagios-plugins-1.4.10]# chown -R nagios.nagios /usr/local/nagios/

 
8.递归增加Nagios主路径同组用户读写属性
[root@KCentOS5C nagios-plugins-1.4.10]# chmod -R g+wr /usr/local/nagios/

四.配置Apache服务:
1.备份Apache服务的主配置文件
[root@KCentOS5C ~]# cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.backup
 
2.配置Apache服务的主配置文件
[root@KCentOS5C ~]# vi /etc/httpd/conf/httpd.conf
这里主要改动以下这些参数:
-----------------------------------------------------
ServerName *:80
配置Apache的服务器名,如果有域名的话请填写正确的服务器名。
 
Include conf.d/*.conf
确认Apache扩展配置文件的存放路径。
-----------------------------------------------------

3.察看Nagios网页配置模板文件
[root@KCentOS5C ~]# less nagios-2.9/sample-config/httpd.conf
-----------------------------------------------------
# SAMPLE CONFIG SNIPPETS FOR APACHE WEB SERVER
# Last Modified: 11-26-2005
#
# This file contains examples of entries that need
# to be incorporated into your Apache web server
# configuration file.  Customize the paths, etc. as
# needed to fit your system.
 
ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin"
设定了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
   AuthName "Nagios Access"
   AuthType Basic
   AuthUserFile /usr/local/nagios/etc/htpasswd.users
这里指定了访问用户帐户库文件。
   Require valid-user
 
Alias /nagios "/usr/local/nagios/share"
设定了Nagios的网页URL对应的系统路径。

#  SSLRequireSSL
   Options None
   AllowOverride None
   Order allow,deny
   Allow from all
#  Order deny,allow
#  Deny from all
#  Allow from 127.0.0.1
   AuthName "Nagios Access"
   AuthType Basic
   AuthUserFile /usr/local/nagios/etc/htpasswd.users
这里指定了访问用户帐户库文件
   Require valid-user

-----------------------------------------------------
基本上这个文件可以直接使用。根据这个配置文件中指定的AuthUserFile项,它指定的是通过Apache访问Nagios的合法用户的帐户名单库文件,需要使用htpasswd命令对这个名单库进行用户的添加。而默认安装环境下在/usr/local/nagios/etc/目录下是没有htpasswd.user这个文件的,所以需要手动添加。请特别注意,用root身份建立的htpasswd.user文件的权限问题,应该在建立该文件完毕后立即更改为nagios用户nagios组的所有权,并且要增加Nagios同组用户读写权限。

4.整合Nagios网页配置文件到Apache中
将Nagios网页配置文件作为Apache的扩展配置文件复制改名到Apache的扩展配置文件目录/etc/httpd/conf.d/目录下
[root@KCentOS5C ~]# cp nagios-2.9/sample-config/httpd.conf /etc/httpd/conf.d/nagios-httpd.conf
 
5.建立Nagios的网页访问用户帐户文件(这里必须要与Nagios网页配置文件当中AuthUserFile指定的路径文件名一致)
[root@KCentOS5C ~]# touch /usr/local/nagios/etc/htpasswd.user
 
6.更改Nagios网页访问用户帐户文件的属主
[root@KCentOS5C ~]# chown nagios.nagios /usr/local/nagios/etc/htpasswd.users
 
7.对Nagios网页访问用户帐户文件增加同组成员读写权限(这主要是赋给apache这个系统用户)
[root@KCentOS5C ~]# chmod g+wr /usr/local/nagios/etc/htpasswd.users
 
8.察看Nagios网页访问用户帐户文件的属性信息
[root@KCentOS5C ~]# ll /usr/local/nagios/etc/htpasswd.users
-rw-rw-r-- 1 nagios nagios 0 Oct  5 14:05 /usr/local/nagios/etc/htpasswd.users
 
9.添加htpasswd.user用户
我添加了一个kanecruise用户,口令是123456。
[root@KCentOS5C ~]# htpasswd -m /usr/local/nagios/etc/htpasswd.user kanecruise
------------------------------------------------------------
New password: 123456
Re-type new password: 123456
Adding password for user kanecruise
------------------------------------------------------------

10.察看htpasswd的使用方法,这里我就解释一些比较重要和常用的。
[root@KCentOS5C ~]# htpasswd
-------------------------------------------------------------
Usage:
        htpasswd [-cmdpsD] passwordfile username
        htpasswd -b[cmdpsD] passwordfile username password
        htpasswd -n[mdps] username
        htpasswd -nb[mdps] username password
 
 -c  Create a new file.
     建立新的帐户库文件。
 
 -n  Don't update file; display results on stdout.
 
 -m  Force MD5 encryption of the password.
     添加一个MD5口令加密的新用户。
 
 -d  Force CRYPT encryption of the password (default).
 
 -p  Do not encrypt the password (plaintext).
     添加一个口令不加密的新用户。
 
 -s  Force SHA encryption of the password.
     添加一个SHA口令加密的新用户。
 
 -b  Use the password from the command line rather than prompting for it.
 
 -D  Delete the specified user.
     删除一个指定的用户
 
On Windows, NetWare and TPF systems the '-m' flag is used by default.
在Windows、NetWare以及TPF这些操作系统中“-m”参数(启用MD5对口令加密)是默认使用的
On all other systems, the '-p' flag will probably not work.
在其他的所有操作系统中“-p”(不对口令启用加密)参数将可能会引起失败。
-------------------------------------------------------------

11.检查htpasswd帐户文件
[root@KCentOS5C ~]# cat /usr/local/nagios/etc/htpasswd.users
-------------------------------------------------------------
kanecruise:$apr1$Qwk9h/..$HaRakpabADGZL10dwPcrx1
-------------------------------------------------------------
用户添加正确,并且口令都以MD5的方式加密了。
 
 
五.Nagios的配置文件:
默认下Nagios编译安装后都没有现成的配置文件,它们都以模板配置文件的方式在/usr/local/nagios/etc/这个主配置路径下,需要手动复制并配置成可用的配置文件。
1.处理Nagios的主配置文件
Nagios的主配置文件为nagios.cfg。
[root@KCentOS5C ~]# cp /usr/local/nagios/etc/nagios.cfg-sample /usr/local/nagios/etc/nagios.cfg
 
2.配置Nagios的主配置文件
[root@KCentOS5C ~]# vi /usr/local/nagios/etc/nagios.cfg
主要修改和确认以下几个较重要的配置项,其余的类似优化涉及到的配置调整这里暂不交待了。这次不像上回我用RPM包安装Nagios那次的配置方式,这次我打算将所有Nagios功能定义配置都集中在localhost.cfg这一个文件当中去,而命令定义文件commands.cfg独立保存一个文件,因此除了这两个文件不注释外,其他的Nagios功能定义文件都保持注释状态。
-------------------------------------------------------------
log_file=/usr/local/nagios/var/nagios.log
确认Nagios服务的日志记录文件,需要确认此项是解注状态的。默认编译安装后没有该文件,要手动添加并指定适当的读写权限。
 
cfg_file=/usr/local/nagios/etc/commands.cfg
在Nagios中将对应功能插件定义成命令的命令定义文件,需要确认此项是解注状态的。默认编译安装后也没有该文件,需要从模版复制。
 
cfg_file=/usr/local/nagios/etc/localhost.cfg
设定Naigos对象功能定义的配置文件,需要确认此项是解注状态的。默认编译安装后也没有该文件,需要从模版复制。
 
cfg_file=/usr/local/nagios/etc/resource.cfg
设定Nagios的资源文件,需要确认此项是解注状态的。默认编译安装后也没有该文件,需要从模版复制。
 
#cfg_file=/usr/local/nagios/etc/contactgroups.cfg
#cfg_file=/usr/local/nagios/etc/contacts.cfg
#cfg_file=/usr/local/nagios/etc/dependencies.cfg
#cfg_file=/usr/local/nagios/etc/escalations.cfg
#cfg_file=/usr/local/nagios/etc/hostgroups.cfg
#cfg_file=/usr/local/nagios/etc/hosts.cfg
#cfg_file=/usr/local/nagios/etc/services.cfg
#cfg_file=/usr/local/nagios/etc/timeperiods.cfg
#cfg_dir=/usr/local/nagios/etc/servers
#cfg_dir=/usr/local/nagios/etc/printers
#cfg_dir=/usr/local/nagios/etc/switches
#cfg_dir=/usr/local/nagios/etc/routers
以上这些分块功能的定义配置文件需要保持注释,因为这些文件的作用都已经集中到localhost.cfg这一个文件当中去了。
 
nagios_user=nagios
nagios_group=nagios
设定Nagios服务的宿主用户和组。
 
#check_external_commands=0
check_external_commands=1
设定Nagios外部检查命令功能开关,默认是值0。将原来的注释掉,更改为值1,必须要打开该功能,否则CGI将不能调用。
 
command_check_interval=15s
#command_check_interval=-1
设定命令检查的时间间隔,将原来值-1的项注释掉,启用原来备用值为15s(15秒)。这项的时间间隔值请按实际需求情况设定。
-------------------------------------------------------------
对Nagios的主日志文件的操作如下:
手动建立Nagios主日志文件
[root@KCentOS5C ~]# touch /usr/local/nagios/var/nagios.log

改变Nagios主日志文件的属主。
[root@KCentOS5C ~]# chown nagios.nagios /usr/local/nagios/var/nagios.log

添加同组成员的读写权限。
[root@KCentOS5C ~]# chmod g+rw /usr/local/nagios/var/nagios.log

查看日志文件的属性。
[root@KCentOS5C ~]# ll /usr/local/nagios/var/nagios.log
-rw-rw-r-- 1 nagios nagios 0 Oct  5 15:28 /usr/local/nagios/var/nagios.log

3.处理Nagios的CGI配置文件:
[root@KCentOS5C ~]# cp /usr/local/nagios/etc/cgi.cfg-sample /usr/local/nagios/etc/cgi.cfg
 
4.配置Nagios的CGI配置文件
[root@KCentOS5C ~]# vi /usr/local/nagios/etc/cgi.cfg
这里主要注意关于访问用户身份验证的配置项的设定。Nagios系统将各种操作行为的授权用户分的非常的仔细,所以在实际应用当中可以分的非常细,什么用户可以做哪些操作而哪些用户又没有权限做哪些操作。但是这里我只简单的授权给同一个用户。请特别注意,这里的授权用户的对象必须只能够是在htpasswd中添加注册过的用户。
-------------------------------------------------------------
use_authentication=1
设定启用身份验证。
 
authorized_for_system_information=kanecruise
设定系统信息的授权用户。
 
authorized_for_configuration_information=kanecruise
设定配置信息的授权用户。
 
authorized_for_system_commands=kanecruise
设定系统命令的授权用户。
 
authorized_for_all_services=kanecruise
设定全部监测服务的授权用户。
 
authorized_for_all_hosts=kanecruise
设定全部被监测主机的授权用户。
 
authorized_for_all_service_commands=kanecruise
设定全部监测服务命令的授权用户。
 
authorized_for_all_host_commands=kanecruise
设定全部主机命令的授权用户。
-------------------------------------------------------------
 
5.处理Nagios的命令定义文件
[root@KCentOS5C ~]# cp /usr/local/nagios/etc/commands.cfg-sample /usr/local/nagios/etc/commands.cfg
 
6.处理Nagios的资源文件
[root@KCentOS5C ~]# cp /usr/local/nagios/etc/resource.cfg-sample /usr/local/nagios/etc/resource.cfg

目前来说暂时不需要对Nagios命令定义文件做什么修改。但是如果要添加新的命令或者修改现有命令的定义的话,则需要修改该文件。
接下来要讲的是Nagios的功能定义配置文件。由于那东西本身讲起来也比较多。因此且恕放在下一话中交代了。
阅读(3622) | 评论(2) | 转发(0) |
给主人留下些什么吧!~~

alps_up2008-11-24 15:29:11

谢谢你的文章! 我遇到了问题请教: 1)在nagios.cfg中,注释行 #cfg_file=/usr/local/nagios/etc/objects/localhost.cfg之后,重起nagios显示配置出错.也就是说这一行不能注释掉....为什么?是不是什么地方还有定义? 2)同样在nagios.cfg,加上cfg_file=/usr/local/nagios/etc/objects/hosts.cfg后也显示配置出错,为什么?hosts.cfg文件已经创建在目录下. 不果加上别的是可以的,比如: cfg_file=/usr/local/nagios/etc/objects/yanwenjieLinux.cfg cfg_file=/usr/local/nagios/etc/objects/jftt61.cfg 3)localhost 与 hosts是什么关系?我可以监视到多台Windows 且正常,但是监视到的Linux(yanwenjieLinux,jftt61)结果都一样,好像都是本地的,同localhost.cfg一样...不懂??? 感激!!!!!