配置SNMP:
#vim /etc/snmp/snmpd.conf 将x.x.x.x换成运行nagios服务器的IP地址:
com2sec notConfigUser x.x.x.x public
access notConfigGroup”” any noauth exact all none none
view all included .1 80
#tar -zxf centreon-2.1.9.tar.gz
#cd centreon-2.1.9
#./install.sh -i
###############################################################################
# #
# Centreon (www.centreon.com) #
# Thanks for using Centreon #
# #
# v2.2 #
# #
# infos@centreon.com #
# #
# Make sure you have installed and configured #
# sudo - sed - php - apache - rrdtool - mysql #
# #
###############################################################################
------------------------------------------------------------------------
Checking all needed binaries
------------------------------------------------------------------------
rm OK
cp OK
mv OK
/bin/chmod OK
/bin/chown OK
echo OK
more OK
mkdir OK
find OK
/bin/grep OK
/bin/cat OK
/bin/sed OK
You will now read Centreon Licence.
Press enter to continue.
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
........................................................................................
Do you accept GPL license ?
[y/n], default to [n]:
> y
------------------------------------------------------------------------
Please choose what you want to install
------------------------------------------------------------------------
Do you want to install : Centreon Web Front
[y/n], default to [n]:
> y
Do you want to install : Centreon CentCore
[y/n], default to [n]:
> y
Do you want to install : Centreon Nagios Plugins
[y/n], default to [n]:
> y
Do you want to install : Centreon Snmp Traps process
[y/n], default to [n]:
> y
Where is your Centreon directory?
default to [/usr/local/centreon]
>
Do you want me to create this directory ? [/usr/local/centreon]
[y/n], default to [n]:
> y
Path /usr/local/centreon OK
Where is your Centreon log directory
default to [/usr/local/centreon/log]
>
Do you want me to create this directory ? [/usr/local/centreon/log]
[y/n], default to [n]:
> y
Path /usr/local/centreon/log OK
Where is your Centreon etc directory
default to [/etc/centreon]
>
Path /etc/centreon OK
Where is your Centreon generation_files directory?
default to [/usr/local/centreon]
>
Path /usr/local/centreon OK
Where is your Centreon variable library directory?
default to [/var/lib/centreon]
>
Path /var/lib/centreon OK
Where is your CentPlugins Traps binary
default to [/usr/local/centreon/bin]
>
Do you want me to create this directory ? [/usr/local/centreon/bin]
[y/n], default to [n]:
> y
Path /usr/local/centreon/bin OK
Where is the RRD perl module installed [RRDs.pm]
default to [/usr/lib/perl5/RRDs.pm]
> /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/RRDs.pm
Path /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-threadOKulti
/usr/bin/rrdtool OK
/bin/mail OK
Where is PEAR [PEAR.php]
default to [/usr/share/php/PEAR.php]
> /usr/share/pear/PEAR.php
Path /usr/share/pear OK
Where is installed Nagios ?
default to [/usr/local/nagios]
> /usr/lib64/nagios
Path /usr/lib64/nagios OK
Where is your nagios config directory
default to [/usr/local/nagios/etc]
> /etc/nagios
Path /etc/nagios OK
Where is your Nagios var directory ?
default to [/usr/local/nagios/var]
> /var/nagios
Path /var/nagios OK
Where is your Nagios plugins (libexec) directory ?
default to [/usr/local/nagios/libexec]
> /usr/lib64/nagios/plugins
Path /usr/lib64/nagios/plugins OK
/usr/bin/nagios OK
Where is your Nagios image directory ?
default to [/usr/local/nagios/share/images/logos]
> /usr/share/nagios/images/logos
Path /usr/share/nagios/images/logos OK
/usr/bin/nagiostats OK
p1_file : /usr/bin/p1.pl OK
/usr/bin/php OK
/usr/bin/perl OK
Finding Apache group : apache
Finding Apache user : apache
Finding Nagios user : nagios
Finding Nagios group : nagios
Where is your NDO ndomod binary ?
default to [/usr/sbin/ndomod.o]
> /usr/local/nagios/bin/ndomod.o
/usr/local/nagios/bin/ndomod.o OK
Where is sudo configuration file
default to [/etc/sudoers]
>
/etc/sudoers OK
Nagios init script OK
Your sudo has been configured previously
Do you want me to reconfigure your sudo ? (WARNING)
[y/n], default to [n]:
> y
Configuring Sudo OK
------------------------------------------------------------------------
Configure Apache server
------------------------------------------------------------------------
Finding Apache Centreon configuration file
'/etc/httpd/conf.d/centreon.conf' : OK
Do you want to update Centreon Apache sub configuration file ?
[y/n], default to [n]:
> y
Backup Centreon Apache configuration completed
Create '/etc/httpd/conf.d/centreon.conf' OK
Configuring Apache OK
Do you want to reload your Apache ?
[y/n], default to [n]:
> y
Reloading Apache service OK
Preparing Centreon temporary files
Change right on /usr/local/centreon/log OK
Change right on /etc/centreon OK
Change right on /usr/share/nagios/images/logos OK
Install nagios documentation OK
Change macros for insertBaseConf.sql OK
Change macros for php files OK
Change right on /etc/nagios OK
Copy CentWeb in system directory
Install CentWeb (web front of centreon) OK
Install libraries OK
Copying libinstall OK
Change macros for centreon.cron OK
Install Centreon cron.d file OK
Change macros for archiveDayLog OK
Change macros for centAcl.php OK
Install cron directory OK
------------------------------------------------------------------------
Pear Modules
------------------------------------------------------------------------
Check PEAR modules
PEAR 1.4.9 1.9.4 OK
DB 1.7.6 1.7.14 OK
DB_DataObject 1.8.4 1.9.6 OK
DB_DataObject_FormBuilder 1.0.0RC4 1.0.1 OK
MDB2 2.0.0 2.4.1 OK
Date 1.4.6 1.4.7 OK
HTML_Common 1.2.2 1.2.5 OK
HTML_QuickForm 3.2.5 3.2.13 OK
HTML_QuickForm_advmultiselect 1.1.0 1.5.1 OK
HTML_Table 1.6.1 1.8.3 OK
Archive_Tar 1.1 1.3.1 OK
Auth_SASL 1.0.1 1.0.6 OK
Console_Getopt 1.2 1.2 OK
Net_SMTP 1.2.8 1.6.1 OK
Net_Socket 1.0.1 1.0.10 OK
Net_Traceroute 0.21 0.21.3 OK
Net_Ping 2.4.1 2.4.5 OK
Validate 0.6.2 0.8.4 OK
XML_RPC 1.4.5 1.5.0 OK
SOAP 0.10.1 0.12.0 OK
Log 1.9.11 1.12.7 OK
All PEAR modules OK
------------------------------------------------------------------------
Centreon Post Install
------------------------------------------------------------------------
Create /usr/local/centreon/www/install/install.conf.php OK
Create /etc/centreon/instCentWeb.conf OK
Where is your Centreon Run Dir directory?
default to [/var/run/centreon]
>
Path /var/run/centreon OK
Where is your CentStorage binary directory
default to [/usr/local/centreon/bin]
>
Path /usr/local/centreon/bin OK
Where is your CentStorage RRD directory
default to [/var/lib/centreon]
>
Path /var/lib/centreon OK
Finding Nagios group : nagios
Finding Nagios user : nagios
Preparing Centreon temporary files
/tmp/centreon-setup exists, it will be moved...
install www/install/createTablesCentstorage.sql OK
CentStorage status Directory already exists PASSED
CentStorage metrics Directory already exists PASSED
Change macros for centstorage binary OK
Install CentStorage binary OK
Install library for centstorage OK
Change right : /var/run/centreon OK
Change macros for centstorage init script OK
Do you want me to install CentStorage init script ?
[y/n], default to [n]:
> y
CentStorage init script installed OK
Do you want me to install CentStorage run level ?
[y/n], default to [n]:
> y
Change macros for logAnalyser OK
Install logAnalyser OK
Change macros for nagiosPerfTrace OK
Install nagiosPerfTrace OK
Change macros for purgeLogs OK
Install purgeLogs OK
Change macros for purgeCentstorage OK
Install purgeCentstorage OK
Change macros for centreonPurge.sh OK
Install centreonPurge.sh OK
Change macros for centstorage.cron OK
Install CentStorage cron OK
Create /etc/centreon/instCentStorage.conf OK
Where is your CentCore binary directory
default to [/usr/local/centreon/bin]
>
Path /usr/local/centreon/bin OK
/usr/bin/ssh OK
/usr/bin/scp OK
Finding Nagios group : nagios
Finding Nagios user : nagios
Preparing Centreon temporary files
/tmp/centreon-setup exists, it will be moved...
Change CentCore Macro OK
Copy CentCore in binary directory OK
Change right : /var/run/centreon OK
Change right : /var/lib/centreon OK
Replace CentCore init script Macro OK
Do you want me to install CentCore init script ?
[y/n], default to [n]:
> y
CentCore init script installed OK
Do you want me to install CentCore run level ?
[y/n], default to [n]:
> y
Create /etc/centreon/instCentCore.conf OK
Where is your CentPlugins lib directory
default to [/var/lib/centreon/centplugins]
>
Path /var/lib/centreon/centplugins OK
Finding Nagios user : nagios
Finding Nagios group : nagios
Preparing Centreon temporary files
/tmp/centreon-setup exists, it will be moved...
Change macros for CentPlugins OK
Installing the plugins OK
Change right on centreon.conf OK
CentPlugins is installed
Where is your SNMP configuration directory
default to [/etc/snmp]
>
/etc/snmp OK
Where is your SNMPTT binaries directory
default to [/usr/local/centreon/bin/]
>
/usr/local/centreon/bin/ OK
Finding Nagios group : nagios
Finding Apache user : apache
Preparing Centreon temporary files
/tmp/centreon-setup exists, it will be moved...
Change macros for CentPluginsTraps OK
Installing the plugins Trap binaries OK
Change macros for snmptrapd.conf OK
Change macros for snmptt.ini OK
Install : snmptrapd.conf OK
Install : snmp.conf OK
Install : snmptt.ini OK
Install : snmptt OK
Install : snmpttconvertmib OK
Generate SNMPTT configuration FAIL
Create /etc/centreon/instCentPlugins.conf OK
###############################################################################
# #
# Go to the URL : http://localhost.localdomain/centreon/ #
# to finish the setup #
# #
# Report bugs at http://forge.centreon.com #
# #
# Thanks for using Centreon. #
# ----------------------- #
# Contact : infos@centreon.com #
# http://www.centreon.com #
# #
##############################################################################
Centreon安装完成后,你可以通过http://yourServerIPAddress/centreon来访问。
#安装后在网址中输入http://IP/centreon 进入Centreon web 配置界面
==========
Ubuntu 客户端安装 (remote server installation and setup)
#sudo apt-get install nagios-nrpe-server nagios-nrpe-plugin
#sudo vi /etc/nagios/nrpe.cfg (in the following)
Append the Nagios server ip in the following
allowed_hosts=127.0.0.1,your-nagios-server-ip
allowed_hosts=127.0.0.1,192.168.10.247,192.168.10.201
重启nrpe
#ps aux | grep nrpe
#kill “nrpe-process-id”
And start nrpe process as
/usr/sbin/nrpe -c /etc/nagios/nrpe.cfg -d
============
centos客户端:
rpm -ivh rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
rpm -ivh epel-release-5-4.noarch.rpm
rpm -ivh remi-release-5-8.el5.remi.noarch.rpm
yum install nagios-plugins nagios-plugins-nrpe nagios-nrpe –y
cd //usr/lib64/nagios/plugins/
vim /etc/nagios/nrpe.cfg
修改host_allow字段,添加监控机ip
/etc/init.d/nrpe restart