Nagios 2.x and Centreon 1.4.1
Environment
Introduction
Integrate Nagios and Centreon for network management
Install Nagios2
Create an administrator user for nagios
Install MySQL5.0
Install PHP5
Install RRDTool
Install SNMP
Upgrade PEAR and Install Needed Components
Install Centreon
Setup Centreon
Start a firefox to navigate to http://localhost/oreon/install/setup.php
Parameters List
Reload Nagios Configuration
Once setup is compeleted. Nagios configuration can be loaded to Centreon
First prepare a tar file of check command since Centreon supports upload a tar/zip file for loading configuration
Navigate to "Configuration" > "Nagios" > "Load"
After loading the configuration, enable all are loaded
Edit Centreon Configuration
For Centreon can restart Nagios, there are some values that are needed to change
Navigate to "Options" > "General Options" > "Nagios"
Parameters List
Centreon Graphics
Edit /usr/lib/nagios/plugins/process-service-perfdata to change "PERFFILE" to be
Navigate to "Options" > "Centreon" > "General Options" > "CentreonDataStorage"
Useful Sites
- Host: Vista Business
- Guest: Ubuntu 7.10
- VirtualBox 1.5.2
- Nagios 2.9-1
- Centreon 1.4.1
- MySQL 5.0.45-1ubuntu3
Introduction
Integrate Nagios and Centreon for network management
Install Nagios2
apt-get install nagios2 nagios-images nagios-plugins
Create an administrator user for nagios
#cd /etc/nagios2
#htpasswd -c htpasswd.users nagiosadmin
Install MySQL5.0
apt-get install mysql-server-5.0
Install PHP5
#apt-get install php5
#apt-get install php-db php-date
#apt-get install php5-gd php5-mysql php5-snmp php5-ldap
#apt-get install php-mail php-mail-mime php-net-smtp php-net-socket
#apt-get install php5-xmlrpc
Install RRDTool
#apt-get install rrdtool librrds-perl
Install SNMP
#apt-get install snmp snmpd libnet-snmp-perl
Upgrade PEAR and Install Needed Components
#pear upgrade pear
#pear install -o -f --alldeps DB_DataObject DB_DataObject_FormBuilder MDB2 Numbers_Roman Numbers_Words HTML_Common HTML_QuickForm HTML_QuickForm_advmultiselect HTML_Table Auth_SASL HTTP Image_Canvas Image_Color Image_Graph Image_GraphViz Net_Traceroute Net_Ping Validate XML_RPC SOAP
Install Centreon
#wget http://download.oreon-project.org/centreon/centreon-1.4.1.tar.gz
#tar zxvf centreon-1.4.1.tar.gz
#cd centreon-1.4.1
#./install.sh
Are you sure to continue ?
[y/n], default to [n]:y
Where is installed Nagios ?
default to [/usr/local/nagios]:/lib/cgi-bin/nagios2
Where are your nagios etc directory ?
default to [/lib/cgi-bin/nagios2/etc]:/etc/nagios2
Where are your nagios plugins / libexec directory ?
default to [/lib/cgi-bin/nagios2/libexec]:/usr/lib/nagios/plugins
Where are your nagios bin directory ?
default to [/lib/cgi-bin/nagios2/bin]:/usr/sbin
Where do I install Oreon ?
default to [/usr/local/oreon]:
Where is sudo ?
default to [/etc/sudoers]:
Where is installed RRD perl modules (RRDs.pm) ?
Just put directory, not full path.
default to [/usr/local/rrdtool/lib/perl]:/usr/lib/perl5
Where is rrdtool binary ?
default to [/usr/bin/rrdtool]:
Where is mail binary ?
default to [/usr/bin/mail]:
Where is PEAR Path ?
default to [/usr/share/pear]:/usr/share/php
Do you want to install Oreon Plugins ?
[y/n], default to [y]:
Do you want to install Oreon Traps Plugins ?
[y/n], default to [y]:
Where is your SNMP configuration file?
default to [/etc/snmp/]:
You already seem to have installed the plugins Oreon.
Do you want overwrite this file ? You must regenerate this one from Oreon interface.
[y/n], default to [n]:y
Please specify user do you use for oreon cron
By default, oreon use nagios user, it's correct ?
[y] or specifie user, default to [nagios]
Setup Centreon
Start a firefox to navigate to http://localhost/oreon/install/setup.php
Parameters List
Nagios Version | 2.x |
Oreon Database | oreon |
Oreon Data Storage Database | ods |
MySQL Client Version | >= 4.1 |
Reload Nagios Configuration
Once setup is compeleted. Nagios configuration can be loaded to Centreon
First prepare a tar file of check command since Centreon supports upload a tar/zip file for loading configuration
#tar cvvf config.tar /etc/nagios-plugins/config/
Navigate to "Configuration" > "Nagios" > "Load"
- File Type: nagios.cfg. /etc/nagios2/nagios.cfg
- File Type: cgi.cfg, /etc/nagios2/cgi.cfg
- File Type: /etc/nagios2/cgi.cfg
- File Type: Template based method file, Command Type: Check Command, /etc/nagios-plugins/config.tar
After loading the configuration, enable all are loaded
Edit Centreon Configuration
For Centreon can restart Nagios, there are some values that are needed to change
Navigate to "Options" > "General Options" > "Nagios"
Parameters List
Init Script | /etc/init.d/nagios2 |
Directory | /usr/lib/cgi-bin/nagios2 |
Directory + binary | /usr/sbin/nagios2 |
Image Directory | /usr/share/nagios/htdocs/images |
Plugins Directory | /usr/lib/nagios/plugins |
Centreon Graphics
Edit /usr/lib/nagios/plugins/process-service-perfdata to change "PERFFILE" to be
PERFFILE="/var/lib/nagios2/service-perfdata"Navigate to "Configuration" > "Nagios" > "Nagios CFG" > Select the configuration is using currently
- Set "Host Performance Data Processing Command" to "process-service-perfdata"
- Set "Service Performance Data Processing Command" to "process-service-perfdata"
Navigate to "Options" > "Centreon" > "General Options" > "CentreonDataStorage"
- Set "Perfdata" to "/var/lib/nagios2/service-perfdata"
- Set "Drop file" to "/var/lib/nagios2/service-perdata.tmp"
update-rc.d ods start 20 3 4 5 . stop 20 0 1 6 .
Useful Sites
- http://www.nagios.org/
- http://www.oreon-project.org/