SUSE11+Nagios3+Centreon
# zypper install sudo mailx fping iputils dos2unix cron dejavu \
gcc gcc-c++ make automake \
apache2 php5 php5-mysql apache2-mod_php5 php5-pear php5-ldap php5-snmp php5-gd php5-soap php5-posix php5-gettext php5-mbstring \
mysql libmysqlclient-devel perl-DBD-mysql \
rrdtool perl-Config-IniFiles net-snmp perl-Net-SNMP perl-SNMP \
gd libjpeg-devel libpng-devel fontconfig-devel freetype2-devel \
fping \
openssl-devel \
openldap-devel \
postgresql-devel \
samba-client libsmbclient \
freeradius-client-devel \
# tar xvf nagios-3.2.3.tar.gz.gz
# cd nagios-3.2.3
# ./configure --prefix=/opt/nagios \
--sysconfdir=/etc/nagios \
--localstatedir=/var/nagios \
--libexecdir=/opt/nagios/plugins \
--with-command-group=nagcmd \
--enable-nanosleep \
--enable-event-broker
# make all
# make install
# make install-init
# make install-commandmode
# make install-config
# make install-webconf
# chkconfig --add nagios
insserv: warning: script 'nagios' missing LSB tags and overrides
insserv: Default-Start undefined, assuming default start runlevel(s) for script `nagios'
nagios 0:off 1:off 2:off 3:on 4:off 5:on 6:off
# vi /etc/init.d/nagios
add the following lines at the beginning
### BEGIN INIT INFO
# Provides: nagios
# Required-Start:
# Should-Start:
# Required-Stop:
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Short-Description: nagios
# Description: Start Nagios
### END INIT INFO
# chkconfig nagios on
# tar xzf nagios-plugins-1.4.15.tar.gz
# cd nagios-plugins-1.4.15
# ./configure --prefix=/opt/nagios \
--sysconfdir=/etc/nagios \
--localstatedir=/var/nagios \
--libexecdir=/opt/nagios/plugins \
--with-nagios-user=nagios \
--with-nagios-group=nagios \
--with-openssl=/usr/bin/openssl \
--enable-perl-modules
# tar xzf ndoutils-1.4b9.tar.gz
# cd ndoutils-1.4b9
# wget
# zypper install patch
# patch -p1 -N < ndoutils1.4b9_light.patch
# ./configure --prefix=/opt/nagios \
--sysconfdir=/etc/nagios \
--localstatedir=/var/nagios \
--libexecdir=/opt/nagios/plugins \
--with-ndo2db-user=nagios \
--with-ndo2db-group=nagios \
--enable-mysql \
--disable-pgsql
# cp ./src/ndomod-3x.o /opt/nagios/bin/ndomod.o
# cp ./src/ndo2db-3x /opt/nagios/bin/ndo2db
# cp ./config/ndo2db.cfg-sample /etc/nagios/ndo2db.cfg
# cp ./config/ndomod.cfg-sample /etc/nagios/ndomod.cfg
# chmod 774 /opt/nagios/bin/ndo*
# chown nagios:nagios /opt/nagios/bin/ndo*
# cp ./daemon-init /etc/init.d/ndo2db
# chmod +x /etc/init.d/ndo2db
# chkconfig --add ndo2db
# chkconfig ndo2db on
# export PATH="$PATH:/opt/nagios/bin/"
------------------------------------------------------------------------
Start CentWeb Installation
------------------------------------------------------------------------
Where is your Centreon directory?
default to [/usr/local/centreon]
> /opt/centreon
Do you want me to create this directory ? [/opt/centreon]
[y/n], default to [n]:
> y
Path /opt/centreon OK
Where is your Centreon log directory
default to [/usr/local/centreon/log]
> /var/log/centreon
Do you want me to create this directory ? [/var/log/centreon]
[y/n], default to [n]:
> y
Path /var/log/centreon OK
Where is your Centreon etc directory
default to [/etc/centreon]
>
Do you want me to create this directory ? [/etc/centreon]
[y/n], default to [n]:
> y
Path /etc/centreon OK
Where is your Centreon generation_files directory?
default to [/usr/local/centreon]
> /opt/centreon
Path /opt/centreon OK
Where is your Centreon variable library directory?
default to [/var/lib/centreon]
>
Do you want me to create this directory ? [/var/lib/centreon]
[y/n], default to [n]:
> y
Path /var/lib/centreon OK
Where is your CentPlugins Traps binary
default to [/usr/local/centreon/bin]
> /opt/centreon/bin
Do you want me to create this directory ? [/opt/centreon/bin]
[y/n], default to [n]:
> y
Path /opt/centreon/bin OK
Where is the RRD perl module installed [RRDs.pm]
default to [/usr/lib/perl5/RRDs.pm]
> /usr/lib/perl5/vendor_perl/5.10.0/i586-linux-thread-multi/RRDs.pm
Path /usr/lib/perl5/vendor_perl/5.10.0/i586-linux-thread-muOKi
/usr/bin/rrdtool OK
/usr/bin/mail OK
Where is PEAR [PEAR.php]
default to [/usr/share/php/PEAR.php]
> /usr/share/php5/PEAR/PEAR.php
Path /usr/share/php5/PEAR OK
Where is installed Nagios ?
default to [/usr/local/nagios]
> /opt/nagios
Path /opt/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]
> /opt/nagios/plugins
Path /opt/nagios/plugins OK
/opt/nagios/bin//nagios OK
Where is your Nagios image directory ?
default to [/usr/local/nagios/share/images/logos]
> /opt/nagios/share/images/logos
Path /opt/nagios/share/images/logos OK
/opt/nagios/bin//nagiostats OK
p1_file : /opt/nagios/bin/p1.pl OK
/usr/bin/php OK
/usr/bin/perl OK
Finding Apache group : www
Finding Apache user : wwwrun
Finding Nagios user : nagios
Finding Nagios group : nagios
/opt/nagios/bin//ndomod.o OK
------------------------------------------------------------------------
Configure Sudo
------------------------------------------------------------------------
Where is sudo configuration file
default to [/etc/sudoers]
>
/etc/sudoers OK
Nagios init script OK
Your sudo is not configured
Do you want me to configure your sudo ? (WARNING)
[y/n], default to [n]:
> y
Configuring Sudo OK
------------------------------------------------------------------------
Configure Apache server
------------------------------------------------------------------------
Do you want to add Centreon Apache sub configuration file ?
[y/n], default to [n]:
> y
Create '/etc/apache2/conf.d/centreon.conf' OK
Configuring Apache OK
Do you want to reload your Apache ?
[y/n], default to [n]:
> n
Preparing Centreon temporary files
Change right on /var/log/centreon OK
Change right on /etc/centreon OK
Change right on /opt/nagios/share/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.1 OK
DB 1.7.6 NOK
DB_DataObject 1.8.4 NOK
DB_DataObject_FormBuilder 1.0.0RC4 NOK
MDB2 2.0.0 NOK
Date 1.4.6 NOK
HTML_Common 1.2.2 NOK
HTML_QuickForm 3.2.5 NOK
HTML_QuickForm_advmultiselect 1.1.0 NOK
HTML_Table 1.6.1 NOK
Archive_Tar 1.1 1.3.7 OK
Auth_SASL 1.0.1 NOK
Console_Getopt 1.2 1.2.3 OK
Net_SMTP 1.2.8 NOK
Net_Socket 1.0.1 NOK
Net_Traceroute 0.21 NOK
Net_Ping 2.4.1 NOK
Validate 0.6.2 NOK
XML_RPC 1.4.5 NOK
SOAP 0.10.1 NOK
Log 1.9.11 NOK
Do you want me to install/upgrade your PEAR modules
[y/n], default to [y]:
> y
Upgrading PEAR modules
Installing PEAR modules
DB 1.7.6 1.7.13 OK
DB_DataObject 1.8.4 1.9.5 OK
DB_DataObject_FormBuilder 1.0.0RC4 1.0.1 OK
MDB2 2.0.0 2.4.1 OK
HTML_QuickForm_advmultiselect 1.1.0 1.5.1 OK
HTML_Table 1.6.1 1.8.3 OK
Auth_SASL 1.0.1 1.0.4 OK
Net_SMTP 1.2.8 1.5.2 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.4 OK
SOAP 0.10.1 0.12.0 OK
Log 1.9.11 1.12.5 OK
Check PEAR modules
PEAR 1.4.9 1.9.2 OK
DB 1.7.6 1.7.13 OK
DB_DataObject 1.8.4 1.9.5 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.12 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.7 OK
Auth_SASL 1.0.1 1.0.4 OK
Console_Getopt 1.2 1.2.3 OK
Net_SMTP 1.2.8 1.5.2 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.4 OK
SOAP 0.10.1 0.12.0 OK
Log 1.9.11 1.12.5 OK
All PEAR modules OK
------------------------------------------------------------------------
Centreon Post Install
------------------------------------------------------------------------
Create /opt/centreon/www/install/install.conf.php OK
Create /etc/centreon/instCentWeb.conf OK
------------------------------------------------------------------------
Start CentStorage Installation
------------------------------------------------------------------------
Where is your Centreon Run Dir directory?
default to [/var/run/centreon]
>
Do you want me to create this directory ? [/var/run/centreon]
[y/n], default to [n]:
> y
Path /var/run/centreon OK
Where is your CentStorage binary directory
default to [/opt/centreon/bin]
>
Path /opt/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
Creating Centreon Directory '/var/lib/centreon/status' OK
Creating Centreon Directory '/var/lib/centreon/metrics' OK
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
centstorage 0:off 1:off 2:off 3:on 4:off 5:on 6:off
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
------------------------------------------------------------------------
Start CentCore Installation
------------------------------------------------------------------------
Where is your CentCore binary directory
default to [/opt/centreon/bin]
>
Path /opt/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
centcore 0:off 1:off 2:off 3:on 4:off 5:on 6:off
Create /etc/centreon/instCentCore.conf OK
------------------------------------------------------------------------
Start CentPlugins Installation
------------------------------------------------------------------------
Where is your CentPlugins lib directory
default to [/var/lib/centreon/centplugins]
>
Do you want me to create this directory ? [/var/lib/centreon/centplugins]
[y/n], default to [n]:
> y
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
------------------------------------------------------------------------
Start CentPlugins Traps Installation
------------------------------------------------------------------------
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/]
> /opt/centreon/bin/
/opt/centreon/bin/ OK
Finding Nagios group : nagios
Finding Apache user : wwwrun
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
Create /etc/centreon/instCentPlugins.conf OK
###############################################################################
# #
# Go to the URL : #
# to finish the setup #
# #
# Report bugs at #
# #
# Thanks for using Centreon. #
# ----------------------- #
# Contact : #
# #
# #
###############################################################################
# /etc/init.d/apache2 reload
# /etc/init.d/snmpd start
# /etc/init.d/centcore start
# /etc/init.d/centstorage start
host, hostgroup主要是为了整合物理机器
在host/hostgroup基础上设置service/service group
refrence: