菜单

nagios配置全攻略

2019年8月5日 - 4166m金沙

   #
yum install php
php-mysql php-gd php-pear

图片 1

[[email protected]
nagios-plugins-1.5]# make install

   安装 MySQL
 
   #
yum install mysql-server mysql-devel

操作系统Centos5.5,目前最新版本的nagios3.3.1,装上之后界面变化了太难看…

图片 2

      event_broker_options=-1

图片 3

设置管理员密码和邮箱,全部必填。

 db_user=ndouser

作者“成长全记录”

[[email protected]
ndoutils-1.5.2]# make install

      #
make

图片 4

[[email protected]
src]#

    NdoPID=`head $NdoRunFile`
}

根据提示进行安装 然后删除 INSTALL/ INSTALL.php UPDATE/
UPDATE.php重新刷新页面就可以使用了!
这里使用刚才建立的数据库

Centreon user and groupMonitoring engine user填写为nagiosBroker user ?
(optional)填写为nagios(就是NDOUtils:)注意修改默认日志路径Monitoring
engine log directory填写为/usr/local/nagios/varmonitoring plugins
(libexec)
directory填写为/usr/local/nagios/libexec填写nagios启动脚本全路径Monitoring
engine init.d script配置为/etc/init.d/nagiosMonitoring engine
binary配置为/usr/local/nagios/bin/nagiosMonitoring engine configuration
directory配置为/usr/local/nagios/etc

# cd centreon-2.0.1

#
# service performance data
#
service_perfdata_file=/usr/local/pnp4nagios/var/service-perfdata
service_perfdata_file_template=DATATYPE::SERVICEPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tSERVICEDESC::$SERVICEDESC$\tSERVICEPERFDATA::$SERVICEPERFDATA$\tSERVICECHECKCOMMAND::$SERVICECHECKCOMMAND$\tHOSTSTATE::$HOSTSTATE$\tHOSTSTATETYPE::$HOSTSTATETYPE$\tSERVICESTATE::$SERVICESTATE$\tSERVICESTATETYPE::$SERVICESTATETYPE$
service_perfdata_file_mode=a
service_perfdata_file_processing_interval=15
service_perfdata_file_processing_command=process-service-perfdata-file
 
#
# host performance data starting with Nagios 3.0
#
host_perfdata_file=/usr/local/pnp4nagios/var/host-perfdata
host_perfdata_file_template=DATATYPE::HOSTPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tHOSTPERFDATA::$HOSTPERFDATA$\tHOSTCHECKCOMMAND::$HOSTCHECKCOMMAND$\tHOSTSTATE::$HOSTSTATE$\tHOSTSTATETYPE::$HOSTSTATETYPE$
host_perfdata_file_mode=a
host_perfdata_file_processing_interval=15
host_perfdata_file_processing_command=process-host-perfdata-file
vi /usr/local/nagios/etc/objects/commands.cfg 修改最后两行为
define command{
       command_name    process-service-perfdata-file
       command_line   
/usr/local/pnp4nagios/libexec/process_perfdata.pl
–bulk=/usr/local/pnp4nagios/var/service-perfdata
}
define command{
       command_name    process-host-perfdata-file
       command_line   
/usr/local/pnp4nagios/libexec/process_perfdata.pl
–bulk=/usr/local/pnp4nagios/var/host-perfdata
}
cd /usr/local/pnp4nagios/share
mv install.php install.php.bak
访问测试
  让nagios显示小太阳图标
在pnp4nagios的源码包下面执行
 cp contrib/ssi/* /usr/local/nagios/share/ssi/
 然后在服务或者主机定义里面添加action_url
 define service{
        use                             local-service         ; Name of
service template to use
        host_name                       localhost
        service_description             PING
        check_command                  
check_ping!100.0,20%!500.0,60%
        action_url                     
/pnp4nagios/index.php/graph?host=$HOSTNAME$&srv=$SERVICEDESC$’
class=’tips’
rel=’/pnp4nagios/index.php/popup?host=$HOSTNAME$&srv=$SERVICEDESC$
        }
 define host{
        use                     linux-server           
        host_name               localhost
        alias                   localhost
        address                 127.0.0.1
        action_url             
/pnp4nagios/index.php/graph?host=$HOSTNAME$&srv=_HOST_’ class=’tips’
rel=’/pnp4nagios/index.php/popup?host=$HOSTNAME$&srv=_HOST_
        }
效果如下:

图片 5

 #
vi /etc/nagios/ndo2db.cfg  (更改如下所示)

下面是安装完成后的界面

====================安装nagios=====================1.创建相关用户及用户组[[email protected]
src]# /usr/sbin/useradd -u 288
nagios[[email protected]
src]# /usr/sbin/groupadd -g 289
nagcmd[[email protected]
src]# /usr/sbin/usermod -G nagios,nagcmd
apache[[email protected]
src]# tar zxvf nagios-4.0.2.tar.gz

   # pear
channel-update pear.php.net

service nagios start
service httpd start
service mysqld start
使用
##########################################################################
pnp4nagios的安装和配置
接下来我们来配置pnp4nagios,能够把nagios捕获到的数据绘制成图片
rrdtool依赖众多,这里我选择下载rrdtool的rpm包 
rrdtool-perl-1.4.4-1.el5.wrl.i386.rpm
rrdtool-devel-1.4.4-1.el5.wrl.i386.rpm
rrdtool-1.4.4-1.el5.wrl.i386.rpm
rpm -ivh rrdtool-*
tar -xvf pnp4nagios-0.6.6.tar.gz
cd pnp4nagios-0.6.6
./configure –with-nagios-user=nagios –with-nagios-group=nagcmd
make all
make install
make install-webconf
make install-config
make isntall-init
make fullinstall
pnp4nagios官方提供了三种配置方法,我这里选取一种
vi /usr/local/nagios/etc/nagios.cfg
process_performance_data=1

现在你要做好安装前的准备。#yum update#yum upgrade

验证ndo2db
TCP端口是否打开:

###########################################################################
安装nconf实现nagios的图形化配置
tar -xvf nconf-1.2.6-0.tgz -C /var/www/html/
chown -R apache:apache /var/www/html/nconf
为nconf创建数据库
mysql -u root -p
create database nconf;
grant all privileges on 数据库名称.* to ‘用户名’@’localhost’ identified
by ‘密码’ with grant option;
然后通过浏览器访问:

[[email protected]
src]# cd
centreon-2.5.0[[email protected]
centreon-2.5.0]# sh install.sh -i

      # cp src/file2sock /usr/lib/nagios/bin/file2sock

图片 6

[[email protected]
etc]# cat /usr/local/nagios/var/nagios.log[1389775797] Nagios 4.0.2
starting… (PID=10532)[1389775797] Local time is Wed Jan 15 16:49:57
CST 2014[1389775797] LOG VERSION: 2.0[1389775797] qh: Socket
‘/usr/local/nagios/var/rw/nagios.qh’ successfully
initialized[1389775797] qh: core query handler
registered[1389775797] nerd: Channel hostchecks registered
successfully[1389775797] nerd: Channel servicechecks registered
successfully[1389775797] nerd: Channel opathchecks registered
successfully[1389775797] nerd: Fully initialized and ready to
rock![1389775797] wproc: Successfully registered manager as @wproc
with query handler[1389775797] wproc: Registry request: name=Core
Worker 10537;pid=10537[1389775797] wproc: Registry request: name=Core
Worker 10536;pid=10536[1389775797] wproc: Registry request: name=Core
Worker 10535;pid=10535[1389775797] wproc: Registry request: name=Core
Worker 10534;pid=10534[1389775800] Successfully launched command file
worker with pid 10538[1389775909] SERVICE ALERT:
localhost;HTTP;WARNING;SOFT;1;HTTP WARNING: HTTP/1.1 403 Forbidden –
5237 bytes in 0.001 second response time[1389775969] SERVICE ALERT:
localhost;HTTP;WARNING;SOFT;2;HTTP WARNING: HTTP/1.1 403 Forbidden –
5237 bytes in 0.000 second response time[1389776029] SERVICE ALERT:
localhost;HTTP;WARNING;SOFT;3;HTTP WARNING: HTTP/1.1 403 Forbidden –
5237 bytes in 0.000 second response time[1389776089] SERVICE ALERT:
localhost;HTTP;WARNING;HARD;4;HTTP WARNING: HTTP/1.1 403 Forbidden –
5237 bytes in 0.001 second response
time[[email protected]
etc]#

   安装 GD modules

##############################################################################
安装配置ndoutils把nagios的数据导入mysql数据库
mysql -u root -p
mysql>CREATE DATABASE nagios;
mysql>GRANT ALL ON nagios.* TO
[email protected]
IDENTIFIED BY ‘nagios’   授权nagios用户,密码为 Nagios
mysql>FLUSH PRIVILEGES;
wget

wget

tar -xvf ndoutils-1.4b9.tar.gz
cd ndoutils
patch -p1 -N < ../ndoutils1.4b9_light.patch
./configure –prefix=/usr/local/nagios/ –enable-mysql –disable-pgsql
\
   –with-ndo2db-user=nagios –with-ndo2db-group=nagios
make
cd db
./installdb ./installdb -u root -p 数据库密码 -d nagios
 
mysql -u root -p
mysql>USE nagios;
mysql>SHOW TABLES; 验证表已经生成
cd ndoutils-1.4b9
 cp ./src/ndomod-3x.o /usr/local/nagios/bin/ndomod.o
 cp ./src/ndo2db-3x /usr/local/nagios/bin/ndo2db
 cp ./config/ndo2db.cfg-sample /usr/local/nagios/etc/ndo2db.cfg
 cp ./config/ndomod.cfg-sample /usr/local/nagios/etc/ndomod.cfg
 chmod 774 /usr/local/nagios/bin/ndo*
 chown nagios:nagios /usr/local/nagios/bin/ndo*
 chown nagios:nagios /usr/local/nagios/etc/ndo*
vi ndo2db.cfg
db_name=nagios
db_user=nagios
db_pass=nagios
vi /usr/local/nagios/etc/nagios.cfg
添加以下两行
broker_module=/usr/local/nagios/bin/ndomod.o
config_file=/usr/local/nagios/etc/ndomod.cfg
修改
event_broker_options=-1  //我设置为1,测试也可以
 cp ./daemon-init /etc/init.d/ndo2db
 chmod +x /etc/init.d/ndo2db
 chkconfig –add ndo2db
 service nagios restart
 service ndo2db start
 tail -f /usr/log/nagios/var/nagios.log

[[email protected]
nrpe-2.15]# make install-plugin

   #
chkconfig –level 345 snmpd on

通过整合pnp4nagios,ndoutils,nconf提供了关于nagios的一套完整的配置方案
操作系统Centos5.5,目前最新版本的nagios3.3.1,装上之后界面变化了太难看,所以这里我还用3.2.3的版本来安装
首先把编译环境准备好,我们这里把开发库先都装上
yum groupinstall “Development Libraries” “Development Tools” “Legacy
Software Development” “X Software Development” -y
#########################################################################
naigos安装配置:
安装需要的软件包
yum install  mysql perl mysql-server perl-DBI perl-DBD-MySQL httpd gcc
glibc glibc-common gd gd-devel ruby ruby-devel2 ruby-devel mysql-devel
yum install php53-*          
yum默认安装的是5.1版本的php,但是pnp4nagios-0.6.6需要5.2以上版本的php,我们这里就装5.3的
wget

wget

useradd -m nagios
groupadd nagcmd
usermod -a -G nagcmd nagios
usermod -a -G apache nagios
tar zxf nagios-3.2.3.tar.gz
cd nagios-3.2.3
./configure  –with-command-group=nagcmd
make all
make install
make install-init
make install-commandmode
make install-config
make install-webconf
htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
输入密码并记住,因为这个同时也是网页访问nagios时要输入的密码。
chkconfig –add nagios
chkconfig nagios on
chkconfig httpd on
chkconfig mysqld on
tar 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

修改数据库文件[[email protected]
centreon-2.5.0]# vi
/etc/my.cnf添加一行配置innodb_file_per_table=1四.安装nrpe扩展组件[[email protected]
src]# cd
/usr/local/src/[[email protected]
src]# tar zxvf
nrpe-2.15.tar.gz[[email protected]
src]# cd
nrpe-2.15[[email protected]
nrpe-2.15]# ./configure

   # yum install nagios nagios-devel 

图片 7
这里使用默认配置就好了

安装依赖包和Apache服务器2.安装GD库相关#yum install gd fontconfig-devel
libjpeg-devel libpng-devel gd-devel perl-GD3.安装mysql库相关#yum -y
install openssl-devel perl-DBD-MySQL mysql-server
mysql-devel4.安装PHP及扩展#yum -y install php php-mysql php-gd php-ldap
php-xml php-mbstring5.安装PERL及扩展模块#yum -y install perl-DBI
perl-DBD-MySQL#yum -y install
perl-Config-IniFiles6.安装RRDTools相关#yum -y install rrdtool
perl-rrdtool7.安装SNMP相关#yum -y install perl-Crypt-DES
perl-Digest-SHA1 perl-Digest-HMAC net-snmp-utils#yum -y install
perl-Socket6 perl-IO-Socket-INET6 net-snmp net-snmp-libs php-snmp
dmidecode lm_sensors perl-Net-SNMP
net-snmp-perl8.安装其他相关依赖库#yum -y install fping cpp gcc gcc-c++
libstdc++ glib2-devel#yum -y install fping#yum -y install php-process
php-devel9.安装PEAR相关#yum -y install php-pear php-pear-DB#pear
channel-update
pear.php.net[[email protected]
src]# pear channel-update pear.php.netNo log handling enabled –
turning on stderr loggingCreated directory:
/var/lib/net-snmp/mib_indexesUpdating channel “pear.php.net”Update of
Channel “pear.php.net”
succeeded[[email protected]
src]##pear
upgrade-all[[email protected]
src]# pear upgrade-allWill upgrade channel://pear.php.net/xml_rpcWill
upgrade channel://pear.php.net/archive_tarWill upgrade
channel://pear.php.net/console_getoptWARNING: “pear/XML_RPC” is
deprecated in favor of “pear/XML_RPC2″WARNING: “pear/Console_Getopt”
is deprecated in favor of “pear/Console_GetoptPlus”downloading
XML_RPC-1.5.5.tgz …Starting to download XML_RPC-1.5.5.tgz (31,862
bytes)………done: 31,862 bytesdownloading Archive_Tar-1.3.11.tgz
…Starting to download Archive_Tar-1.3.11.tgz (18,537 bytes)…done:
18,537 bytesdownloading Console_Getopt-1.3.1.tgz …Starting to
download Console_Getopt-1.3.1.tgz (4,471 bytes)…done: 4,471
bytesupgrade-all ok: channel://pear.php.net/XML_RPC-1.5.5upgrade-all
ok: channel://pear.php.net/Archive_Tar-1.3.11upgrade-all ok:
channel://pear.php.net/Console_Getopt-1.3.1[[email protected]
src]#10.检查基础包是否全部安装成功[[email protected]
src]# rpm -q gd fontconfig-devel libjpeg-devel libpng-devel gd-devel
perl-GD |grep “not installed”package libjpeg-devel is not
installed[[email protected]
src]# rpm -q openssl-devel perl-DBD-MySQL mysql-server mysql-devel
|grep “not
installed”[[email protected]
src]# rpm -q php php-mysql php-gd php-ldap php-xml php-mbstring |grep
“not
installed”[[email protected]
src]# rpm -q perl-DBI perl-DBD-MySQL |grep “not
installed”[[email protected]
src]# rpm -q perl-Config-IniFiles |grep “not
installed”[[email protected]
src]# rpm -q rrdtool perl-rrdtool |grep “not installed”package
perl-rrdtool is not
installed===============rrdtool-perl-1.3.8-6.el6.x86_64 already
installed[[email protected]
src]# rpm -q perl-Crypt-DES perl-Digest-SHA1 perl-Digest-HMAC
net-snmp-utils |grep “not
installed”[[email protected]
src]# rpm -q perl-Socket6 perl-IO-Socket-INET6 net-snmp net-snmp-libs
php-snmp dmidecode lm_sensors #perl-Net-SNMP net-snmp-perl | grep “not
installed”perl-Socket6-0.23-4.el6.x86_64perl-IO-Socket-INET6-2.56-4.el6.noarchnet-snmp-5.5-49.el6.x86_64net-snmp-libs-5.5-49.el6.x86_64php-snmp-5.3.3-27.el6_5.x86_64dmidecode-2.11-2.el6.x86_64lm_sensors-3.1.1-17.el6.x86_64[[email protected]
src]# rpm -q fping cpp gcc gcc-c++ libstdc++ glib2-devel |grep “not
installed”[[email protected]
src]# rpm -q php-pear php-pear-DB |grep “not installed”package
php-pear-DB is not
installed–========,php-pear-db-1.7.13-2.el6.rf.noarch already
installed[[email protected]
src]#

  mysql> CREATE DATABASE `ndo` DEFAULT
CHARACTER SET utf8 COLLATE utf8_general_ci;

图片 8

   # yum install nagios-plugins

图片 9

   # yum install
fping perl-Config-IniFiles graphviz gcc-c++ glib2-devel**

图片 10

      #
tar -zxvf ndoutils-1.4b7.tar.gz
     
      # cd
ndoutils-1.4b7

Centos6.5 x64Nagios
4.0.2Centreon-2.5.0.tarnrpe-2.15ndoutils-1.5.2.tar.gz——————–2、下载软件包:…

      #
make clean

三.安装nagios-plugins插件[[email protected]
nagios-4.0.2]# cd
/usr/local/src/[[email protected]
src]# tar zxvf nagios-plugins-1.5.tar.gz

 #output=/usr/local/nagios/var/ndo.sock

[[email protected]
nagios-plugins-1.5]# make all

  mysql>exit;

图片 11

      #
./configure –prefix=/usr/lib/nagios –enable-mysql –disable-pgsql
–with-ndo2db-user=nagios–with-ndo2db-group=nagios

-=======================六.安装entreon=================

# service nagios start

1、系统环境:

      # cp src/ndo2db-3x /usr/lib/nagios/bin/ndo2db

[[email protected]
src]# cd
nagios-plugins-1.5[[email protected]
nagios-plugins-1.5]#[[email protected]
nagios-plugins-1.5]# ./configure –with-nagios-user=nagios
–with-nagios-group=nagios –with-openssl=/usr/bin/openssl
–enable-perl-modules

# touch /var/log/nagios/ndo2db-debug.log

[[email protected]
ndoutils-1.5.2]# cd
/usr/local/src/[[email protected]
src]# tar zxvf centreon-2.5.0.tar.gz

   Retrieving
channel.xml from remote server

#make all

C、设置NDO DB

登陆后正常应该先选择nagios生成配置文件,现在页面没有直接写明nagios配置项了。找到如下菜单Configuration–>Monitoring
Engines–>Generate选择Export导出默认配置,正常情况应该是OK。

      # cp src/ndomod-3x.o /usr/lib/nagios/bin/ndomod.o

图片 12

  mysql> GRANT SELECT , INSERT , UPDATE ,
DELETE ON `ndo` . * TO ‘ndouser’@’localhost’ IDENTIFIED BY
‘ndopassword’;

   当出现一下几行,即表示成功:

到处,Centos6.5下安装Nagios4.02+Centreon-2.5.0监控环境搭建完成。

# chmod 755 /etc/init.d/ndo2db

图片 13

# mysql -u root -p ndo <  /$centreon-2.0.1-path$/www/install/createNDODB.sql

图片 14

   四、安装nagios软件包

图片 15

# mv /etc/rc3.d/S99ndo2db /etc/rc3.d/S97ndo2db

#make install

   B、接着执行如下命令对系统进行更新:

图片 16

  
Nagios最初被设计为在Linux系统之上运行,然而它同样可以在类Unix的系统之上运行。

图片 17

   #
htpasswd -c /etc/nagios/htpasswd.users  nagiosadmin

设定web登陆密码[[email protected]
nagios-plugins-1.5]# htpasswd -c /usr/local/nagios/etc/htpasswd.users
nagiosadminNew password:Re-type new password:Adding password for user
nagiosadmin[[email protected]
nagios-plugins-1.5]# cat
/usr/local/nagios/etc/htpasswd.usersnagiosadmin:laowU8TvgioQA开机自动启动相关服务[[email protected]
nagios-plugins-1.5]# chkconfig –add
nagios[[email protected]
nagios-plugins-1.5]# chkconfig httpd
on[[email protected]
nagios-plugins-1.5]# chkconfig mysqld
on启动mysql[[email protected]
nagios-plugins-1.5]# /etc/init.d/mysqld
restart设置mysql的密码[[email protected]
nagios-plugins-1.5]# /usr/bin/mysqladmin -u root password
‘liang123′[[email protected]
nagios-plugins-1.5]#

printstatus_ndo()
{
    if status_ndo $1 $2; then
        echo “ndo (pid $NdoPID) is running…”
    else
        echo “ndo is not running”
    fi
}

复制配置文件[[email protected]
ndoutils-1.5.2]# cat config/ndo2db.cfg-sample|grep
lock_filelock_file=/usr/local/nagios/var/ndo2db.lock[[email protected]
ndoutils-1.5.2]#[[email protected]
ndoutils-1.5.2]# cp ./config/ndo2db.cfg-sample
/usr/local/nagios/etc/ndo2db.cfg[[email protected]
ndoutils-1.5.2]# cp ./config/ndo2db.cfg-sample
/usr/local/nagios/etc/ndo2db.cfg[[email protected]
ndoutils-1.5.2]# cp ./config/ndomod.cfg-sample
/usr/local/nagios/etc/ndomod.cfg[[email protected]
ndoutils-1.5.2]# cp src/ndomod-3x.o
/usr/local/nagios/bin/[[email protected]
ndoutils-1.5.2]# cp src/ndo2db-3x
/usr/local/nagios/bin/[[email protected]
ndoutils-1.5.2]# chmod 774
/usr/local/nagios/bin/ndo*[[email protected]
ndoutils-1.5.2]# chown nagios:nagios
/usr/local/nagios/bin/ndo*[[email protected]
ndoutils-1.5.2]# chown nagios:nagios
/usr/local/nagios/etc/ndo*[[email protected]
ndoutils-1.5.2]# cp ./daemon-init
/etc/init.d/ndo2db[[email protected]
ndoutils-1.5.2]# chmod +x
/etc/init.d/ndo2db[[email protected]
ndoutils-1.5.2]#配置开机自动启动[[email protected]
ndoutils-1.5.2]# chkconfig –add
ndo2db[[email protected]
ndoutils-1.5.2]# chkconfig –level 345 ndo2db
on[[email protected]
ndoutils-1.5.2]# /etc/init.d/ndo2db startndo2db already
started…[[email protected]
ndoutils-1.5.2]#[[email protected]
ndoutils-1.5.2]# /etc/init.d/ndo2db statusndo2db (pid 19162) is
running…[[email protected]
ndoutils-1.5.2]#[[email protected]
ndoutils-1.5.2]# ps -ef | grep ndo2dbnagios 19162 1 0 19:49 ? 00:00:00
/usr/local/nagios/bin/ndo2db -c /usr/local/nagios/etc/ndo2db.cfgroot
19181 14645 0 19:49 pts/3 00:00:00 grep
ndo2db[[email protected]
ndoutils-1.5.2]#

 

图片 18

# vi
/etc/init.d/ndo2db

图片 19

# tar -zxvf
centreon-2.0.1.tar.gz

[[email protected]
ndoutils-1.5.2]# make

 Re-type new password:  nagiosadmin

图片 20

# chown nagios.nagios /var/log/nagios/ndo2db-debug.log

(3)
安装配置文件[[email protected]
nrpe-2.15]# make install-daemon-config

      B、安装Ndoutils

Centreon etc directory更改为/usr/local/centreon/etcCentreon variable
library更改为/usr/local/centreon/var/lib其他选择回车和y默认

   D、**设置Apache、MySQL和SNMP在系统启动时自启动

指定安装目录以及账号相关[[email protected]
src]# cd
nagios-4.0.2[[email protected]
nagios-4.0.2]# ./configure –prefix=/usr/local/nagios
–with-command-group=nagcmd –enable-nanosleep –enable-broker

        # now we have to wait for ndo to exit and remove its
        # own NdoRunFile, otherwise a following “start” could
        # happen, and then the exiting ndo will remove the
        # new NdoRunFile, allowing multiple ndo daemons
        # to (sooner or later) run
        #echo -n ‘Waiting for ndo to exit .’
        for i in 1 2 3 4 5 6 7 8 9 10 ; do
            if status_ndo > /dev/null; then
            echo -n ‘.’
            sleep 1
            else
            break
            fi
        done
        if status_ndo > /dev/null; then
            echo
            echo ‘Warning – ndo did not exit in a timely manner’
        else
            echo ‘done.’
         fi

图片 21

      # cp src/log2ndo /usr/lib/nagios/bin/log2ndo

GPL许可证读完后必须选择y确定安装centreon几部分模块,全部填写y

 

图片 22

   #
yum install perl-Digest-SHA1
perl-Digest-HMAC net-snmp-utils perl-Socket6 perl-IO-Socket-INET6
net-snmp-devel php-snmp dmidecode net-snmp-perl perl-Crypt-DES

查看nagios的etc目录是不是新增加了很多配置文件:#ls -al
/usr/local/nagios/etc/

   安装其他软件包

图片 23

相关文章

发表评论

电子邮件地址不会被公开。 必填项已用*标注

网站地图xml地图