PlanetIT.WS - Beta

Welcome, Guest

Search: Advanced

Home » Linux » Debian » Nagios 3 with Centreon 2.1 on Debian based Distributions

Nagios 3 with Centreon 2.1 on Debian based Distributions Print View

Article Stats:
Submitted by: alex
Date: 2009-10-05 20:02:24
Views: 30675
Rating: 4.98

Introduction:
About Nagios (http://www.nagios.org)
Nagios is a host and service monitor designed to inform you of network problems before your clients, end-users or managers do. It has been designed to run under the Linux operating system, but works fine under most *NIX variants as well. The monitoring daemon runs intermittent checks on hosts and services you specify using external "plugins" which return status information to Nagios. When problems are encountered, the daemon can send notifications out to administrative contacts in a variety of different ways (email, instant message, SMS, etc.). Current status information, historical logs, and reports can all be accessed via a web browser.
 
About Centreon (http://www.centreon.com)
Centreon is a network, system, applicative supervision and monitoring tool, it is based upon the most effective Open Source monitoring engine: Nagios. Centreon provides a new frontend and new functionalities to Nagios.
 
Prerequisites that not covered in this guide:
- You will need some knowledge of basic Linux administration, in case you will need to do troubleshooting.
- You will need to be familiar with Nagios architecture, and know how to solve errors that comes from nagios config validation.
- You will need an MTA daemon installed & configured, so nagios will able to send notifications, good examples are sendmail, postfix, exim.
 
Notes before we begin:
- This guide is intended for Debian/Ubuntu based distributions. It was tested on Debian 5.0 64-bit, and Ubuntu 8.10/9.04 Server 64-bit
- Centreon version 2.1.x is required for this gude to work, version 2.0.x of Centreon won't work with this article.
- It's recommended to use a clean install of Debian/Ubuntu.
- All commands in this article must be run as root user, in Ubuntu you can become a root user by using command "sudo -s".
 
Install required Ubuntu/Debian packages:
Debian only:
# apt-get install sudo lsb-release
 
dos2unix, Converts DOS <-> Unix text files, alias tofromdos:
# apt-get install tofrodos
 
MTA (exim by default) and mail utilities:
# apt-get install mailx
 
Apache web server and PHP5:
# apt-get install apache2 php5 php-pear php5-mysql php5-ldap php5-snmp php5-gd
 
MySQL-Server:
# apt-get install mysql-server-5.0
You will be asked to specify a new password for the MySQL "root" user. Remember it, we will use it later.
 
RRDTool:
# apt-get install rrdtool librrds-perl
 
Required Perl modules:
# apt-get install libconfig-inifiles-perl libcrypt-des-perl libdigest-hmac-perl libdigest-sha1-perl libgd-gd2-perl
 
SNMP daemon:
# apt-get install snmp snmpd libnet-snmp-perl libsnmp-perl
 
Install Nagios 3 and NDOutils for MySQL:
Type:
# apt-get install nagios3 nagios-nrpe-plugin ndoutils-nagios3-mysql
When asked for "Configure database for ndoutils-mysql with dbconfig-common?", answer NO, Centreon installation script will deal with it.
 
Now let's move/backup the original Nagios configuration directory, as Centreon will use its own structure for Nagios configuration files:    
# mv /etc/nagios3 /etc/nagios3.orig
# mkdir /etc/nagios3
# cp -Rt /etc/nagios3 /etc/nagios3.orig/nagios.cfg /etc/nagios3.orig/apache2.conf /etc/nagios3.orig/stylesheets/
# chown nagios:www-data /etc/nagios3
# chmod ug+w /etc/nagios3
 
Install optional packages (not required):
OpenSSH server (Every linux server must have it!):
# apt-get install ssh
 
PHPMyAdmin - web based Mysql console:
# apt-get install phpmyadmin
 
Install Centreon:
Note: Before beginning the installation make sure you have an internet connection!
 
Now download the latest Centreon distribution (by the time of writing latest version was 2.1.1):
# cd; wget http://download.centreon.com/centreon/centreon-2.1.1.tar.gz
 
Centreon installation script will update PEAR modules (if required). If you are behind proxy, use following command for PEAR proxy configuration:
# pear config-set http_proxy http://<my_proxy>:<port>/
Replace "<my_proxy>" with to your proxy address and "<port>" with your proxy port.
 
Next, type following commands (remember to replace the names to Centreon version you use):
# tar xzf centreon-2.1.1.tar.gz
# cd centreon-2.1.1
# ./install.sh -i
 
Let's follow the installation script questions:
Press "Enter" to read the Centreon License, then type "y" to accept it.
 
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]: /usr/local/centreon
 
Do you want me to create this directory ? [/usr/local/centreon]
[y/n], default to [n]: y
 
Where is your Centreon log directory
default to [/usr/local/centreon/log]: /usr/local/centreon/log
 
Do you want me to create this directory ? [/usr/local/centreon/log]
[y/n], default to [n]: y
 
Where is your Centreon etc directory
default to [/etc/centreon]: /etc/centreon
 
Do you want me to create this directory ? [/etc/centreon]
[y/n], default to [n]: y
 
Where is your Centreon generation_files directory?
default to [/usr/local/centreon]: /usr/local/centreon
 
Where is your Centreon variable library directory?
default to [/var/lib/centreon]: /var/lib/centreon
 
Do you want me to create this directory ? [/var/lib/centreon]
[y/n], default to [n]: y
 
Where is your CentPlugins Traps binary
default to [/usr/local/centreon/bin]: /usr/local/centreon/bin
 
Do you want me to create this directory ? [/usr/local/centreon/bin]
[y/n], default to [n]: y
 
Where is the RRD perl module installed [RRDs.pm]
default to [/usr/lib/perl5/RRDs.pm]: /usr/lib/perl5/RRDs.pm
 
Where is PEAR [PEAR.php]
default to [/usr/share/php/PEAR.php]: /usr/share/php/PEAR.php
 
Where is installed Nagios ?
default to [/usr/local/nagios]: /usr/lib/cgi-bin/nagios3
 
Where is your nagios config directory
default to [/usr/local/nagios/etc]: /etc/nagios3
 
Where is your Nagios var directory ?
default to [/usr/local/nagios/var]: /var/lib/nagios3
 
Where is your Nagios plugins (libexec) directory ?
default to [/usr/local/nagios/libexec]: /usr/lib/nagios/plugins
 
Where is your Nagios image directory ?
default to [/usr/local/nagios/share/images/logos]: /usr/share/nagios/htdocs/images/logos
 
Where is your NDO ndomod binary ?
default to [/usr/sbin/ndomod.o]: /usr/lib/ndoutils/ndomod-mysql-3x.o
 
Where is sudo configuration file
default to [/etc/sudoers]: /etc/sudoers
 
Do you want me to configure your sudo ? (WARNING)
[y/n], default to [n]: y
 
Do you want to add Centreon Apache sub configuration file ?
[y/n], default to [n]: y
 
Do you want to reload your Apache ?
[y/n], default to [n]: y
 
Do you want me to install/upgrade your PEAR modules
[y/n], default to [y]: y
 
Where is your Centreon Run Dir directory?
default to [/var/run/centreon]: /var/run/centreon
 
Do you want me to create this directory ? [/var/run/centreon]
[y/n], default to [n]: y
 
Where is your CentStorage binary directory
default to [/usr/local/centreon/bin]: /usr/local/centreon/bin
 
Where is your CentStorage RRD directory
default to [/var/lib/centreon]: /var/lib/centreon
 
Do you want me to install CentStorage init script ?
[y/n], default to [n]: y
 
Do you want me to install CentStorage run level ?
[y/n], default to [n]: y
 
Where is your CentCore binary directory
default to [/usr/local/centreon/bin]: /usr/local/centreon/bin
 
Do you want me to install CentCore init script ?
[y/n], default to [n]: y
 
Do you want me to install CentCore run level ?
[y/n], default to [n]: y
 
Where is your CentPlugins lib directory
default to [/var/lib/centreon/centplugins]: /var/lib/centreon/centplugins
 
Do you want me to create this directory ? [/var/lib/centreon/centplugins]
[y/n], default to [n]: y
 
Where is your SNMP configuration directory
default to [/etc/snmp]: /etc/snmp
 
Where is your SNMPTT binaries directory
default to [/usr/local/centreon/bin/]: /usr/local/centreon/bin/
 
Continue the installation with the Centreon Web interface:
Open in web browser: "http://<yourserverip>/centreon/" replace "<yourserverip>" with your Centreon server ip address or hostname.
 
Follow Centreon Setup instructions:
- Press Start
- Check "I Accept" and press Next
- Make sure that selected "Nagios Version" is "3.x", then press Next
- On next screen, make sure that all components status is "OK", then press Next
- If all components are "OK", then press Next again
- Fill required DB info as follows, then press Next
 · Root Password for MySQL: [MySQL root password which you entered during MySQL installation]
 · Centreon Database Name: centreon
 · Centreon Data Storage Database Name: centstorage
 · Database Password: centreon
 · Confirm it: centreon
 · MySQL Client version (Password Haching Changes): >=4.1 - PASSWORD()
- Press Next in the screen of DataBase Verification           
- Fill required Admin user info, then press next (make sure that a username is Admin)
- Check "No" in "LDAP Authentication" screen, then press Next
- Press Next again
- Press Next in "Creating Database" screen
- Press on "Click here to complete your install"      
 
NDOUtils configuration (from command line):
In Centreon version 2.1 and newer, NDO database is configured as part of the Centreon installation. We don't need to configure manually. We only need to enable NDO, in "/usr/default/ndoutils".
 
Edit the "/usr/default/ndoutils" by typing:
# vi /etc/default/ndoutils
Change "ENABLE_NDOUTILS=0" to "ENABLE_NDOUTILS=1"
 
Finalize Centreon configuration:
Open in webrowser: "http://<yourserverip>/centreon/", replace "<yourserverip>" with your Centreon server ip address or hostname.   
   
Go to: Configuration -> Nagios -> cgi (in sidebar), Press on "CGI.cfg" link
Change settings to some options, as writed below:
- Physical HTML Path: /usr/share/nagios3/htdocs
- URL HTML Path     : /nagios3
- Nagios Process Check Command: /usr/lib/nagios/plugins/check_nagios /var/cache/nagios3/status.dat 5 '/usr/sbin/nagios3'
Press Save
                              
Go to: Configuration -> Nagios -> nagios.cfg (in sidebar), Press on "Nagios CFG 1" link, you should be in "Files" section of the configuration screen.
Make sure to set folowing configuration values:
- Log File              : /var/log/nagios3/nagios.log
- Downtime File         : /var/lib/nagios3/downtime.dat
- Comment File          : /var/lib/nagios3/comment.dat
- Temp File             : /var/cache/nagios3/nagios.tmp
- P1 File               : /usr/lib/nagios3/p1.pl
- Lock File             : /var/run/nagios3/nagios3.pid       
- Object Cache File     : /var/cache/nagios3/objects.cache
- Status File           : /var/cache/nagios3/status.dat
- External Command File : /var/lib/nagios3/rw/nagios.cmd
 
Now Press on "Logs Options" tab to go to "Logs Options" section.
Make sure to set folowing configuration values:
- Log Archive Path     : /var/log/nagios3/archives/
- State Retention File : /var/lib/nagios3/retention.dat
Press Save
 
Go to: Administration -> Options -> CentStorage (in sidebar)
Make sure to set folowing configuration values:
- Nagios current log file to parse: /var/log/nagios3/nagios.log
Press Save
 
Now let's apply our changes, go to: Configuration -> Nagios
Select as below:
- Generate Configuration Files
- Include Comments
- Run Nagios debug (-v)
- Move Export Files
- Restart Nagios
- Method: "External Command"
Press Export
 
This will restart Nagios & apply all changes you made in Web Interface.
You will do it every time you make changes, e.g. adding/modifying of hosts, commands, contacts, services...etc...
 
The installation of Centreon is completed.
 
Final fixes (very important):
Go to terminal console, then...
 
In Debian/Ubuntu the user "nagios" is set to "/bin/false" shell. Because of it "centcore" and "centstorage" daemons won't start. A reason for that is because those daemons use "su -c" command which requires a real shell, so the shell for "nagios" user must be set to "/bin/sh":
# usermod -s /bin/sh nagios
 
Apply permissions for Web interface to be able to send "External Commands", perform the following commands to change directory permissions and to make the changes permanent:
# invoke-rc.d nagios3 stop
# dpkg-statoverride --update --add nagios www-data 2710 /var/lib/nagios3/rw
# dpkg-statoverride --update --add nagios nagios 751 /var/lib/nagios3
 
Add htaccess user with password "P@ssw0rd" for nagios CGI:
# htpasswd -bc /etc/nagios3/htpasswd.users nagiosadmin P@ssw0rd
 
Allow SNMP readonly access:
# echo "rocommunity public" > /etc/snmp/snmpd.conf
 
If you want to allow SNMP access only for localhost then use this instead:
# echo "rocommunity public 127.0.0.1" > /etc/snmp/snmpd.conf
 
Now, restart the server
# sync;sync;init 6
 
That's it, after reboot, you will have a fully functional Nagios & Centreon environment.
Feel free to add comments/suggestions.

Comments

Oct 15th 2009, by Guest
Hi there, look, I´ve followed your post and at the end, when the nagios reload was needed I received:

error in configuration file /usr/local/centreon/filesGeneration/nagiosCFG/1/nagiosCFG.DEBUG - Line 28 (Illegal value for log_rotation_method)

I found this solution and everything works as expected

http://forum.centreon.com/f33/line-28-illegal-value-for-log-rotation-method-t8883/

UPDATE `centreon`.`cfg_nagios` SET `log_rotation_method` = 'd' WHERE `cfg_nagios`.`nagios_id` =1 LIMIT 1 ;

Thanks for such a great tutorial!

Oct 17th 2009, by alex
Thanks for the feedback :)
Regarding the issue you had, this is known issue, and was fixed in Centreon 2.1.1. I recommend to upgrade to version 2.1.1 as the solution you found is temporary...and can return again.

P.S.
The bug was submitted by me with proposed solution ;)
---
View Alex Simenduev's LinkedIn profileView my profile

Nov 29th 2009, by Guest
Thanks for your good article
Is there any document about config centreon? for example adding new host ??because I could not config centreon correctly yet :(


Nov 29th 2009, by alex
Centreon is a web GUI for Nagios. You must learn how to configure Nagios, if you know how to configure Nagios, you won't have problem with Centreon.
---
View Alex Simenduev's LinkedIn profileView my profile

Nov 30th 2009, by Guest
I just installed 8.10 and upgraded the repositories. I then installed Nagios3 and when i go to chech the install i get this error:
root@lbhweb1:/home/administrator# nagios3 -v nagios.cfg

Nagios 3.0.2
Copyright (c) 1999-2008 Ethan Galstad (http://www.nagios.org)
Last Modified: 05-19-2008
License: GPL

Reading configuration data...

Error: Cannot open main configuration file '/home/administrator/nagios.cfg' for reading!

***> One or more problems was encountered while processing the config files...

Check your configuration file(s) to ensure that they contain valid
directives and data defintions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed.

root@lbhweb1:/home/administrator# Error: Cannot open main configuration file '/home/administrator/nagios.cfg' for reading!
bash: Error:: command not found


Any ideas?

Dec 3rd 2009, by alex
try nagios3 -v /etc/nagios3/nagios.cfg
---
View Alex Simenduev's LinkedIn profileView my profile

Dec 3rd 2009, by Guest
Hi,

When i login in to the nagios frontend if i click any link i am getting the following error

Whoops!

Error: Could not read object configuration data!

Here are some things you should check in order to resolve this error:

Verify configuration options using the -v command-line option to check for errors.
Check the Nagios log file for messages relating to startup or status data errors.
Make sure you've compiled the main program and the CGIs to use the same object data storage options (i.e. default text file or template-based file).
Make sure you read the documentation on installing, configuring and running Nagios thoroughly before continuing. If all else fails, try sending a message to one of the mailing lists. More information can be found at http://www.nagios.org.

How to fix this error

Thanks for your help

Dec 3rd 2009, by alex
What is a URL (link), you are trying to browse? Please post it here...
---
View Alex Simenduev's LinkedIn profileView my profile

Dec 3rd 2009, by Guest
Hi,
when i use /etc/init.d/nagios3 restart i am getting the following error

shift: 117: can't shift that many

How ti fix this error

Thanks for help.

Dec 3rd 2009, by Guest
i'm trying to browse localhost

Dec 3rd 2009, by alex
Dec 3rd 2009, by Guest
Hi,
when i use /etc/init.d/nagios3 restart i am getting the following error

shift: 117: can't shift that many

How ti fix this error

Thanks for help.


please provide more info:
What distribution you using?
Which version of distribution?
---
View Alex Simenduev's LinkedIn profileView my profile

Dec 3rd 2009, by Guest
Hi,
i used nagios3-centreon2.1 installation steps provided by you on ubuntu 9.04.

Dec 3rd 2009, by Guest
Hi,

i used nagios3-centreon2.1 installation steps provided by you on ubuntu 9.04.

And i'm trying to browse localhost.

Dec 3rd 2009, by alex
Dec 3rd 2009, by Guest
i'm trying to browse localhost

localhost what? be more specific (e.g: http://localhost/centreon, http://localhost/cgi-bin/nagios3). Another question, do you trying to browse on same machine where the nagios was installed?
---
View Alex Simenduev's LinkedIn profileView my profile

Dec 3rd 2009, by Guest
Hi,

i used nagios3-centreon2.1 installation steps provided by you on ubuntu 9.04.

And i'm trying to browse localhost.

And when i used /etc/init.d/nagios3 reload

I m getting the following eror :

* Reloading nagios3 monitoring daemon configuration files nagios3
Nagios 3.0.6
Copyright (c) 1999-2008 Ethan Galstad (http://www.nagios.org)
Last Modified: 12-01-2008
License: GPL

Reading configuration data...


***> One or more problems was encountered while processing the config files...

Check your configuration file(s) to ensure that they contain valid
directives and data defintions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed.

* errors in config!


Dec 3rd 2009, by alex
Looks like you have not followed the guide correctly. This message means that you have configuration errors in one of nagios config files. Please read the guide carefully. Also you should configure Nagios only from Centreon web interface and not directly edit the config files.
---
View Alex Simenduev's LinkedIn profileView my profile

Dec 17th 2009, by Guest
Hello here is Ot Bono from Brazil!!

Thank you very very very mutch for the article! I follow the instructions and now I have a great monitoring system!!


Jan 1st 2010, by Guest
I am sure that someone should keep in mind if see the professional custom writing firm, this will be an opportunity to get the very interesting thing about this good post and purchase the custom essay paper connecting with become a freelance writer. Therefore, that is really good selection. Try that at this moment!

Jan 14th 2010, by Guest
good post! congratulations!!!

cya

@mluano

Jan 22nd 2010, by Guest
Very good
Jinju

Feb 8th 2010, by Guest
Impressive article.
Very helpful. I know I struggled with Centreon from when it was still known as oreon.

Thanks.
Sebs

Feb 10th 2010, by Guest
Thanks ALOT for this, especially the fixes.
What would the world look like without people like you? ;)



Feb 20th 2010, by Guest
Show de Bola Parabens....Funcionou Direitinho

Saudações

Anderson Rauber
Jaraguá do Sul - SC - Brasil

Feb 25th 2010, by Guest
hai,

I did this setup 2 times exactly the same.. and..
after - Press on "Click here to complete your install"
2 times Connection failed, please contact your administrator
I was able to get this working through modifying directly in the database ( config section )
this happens i think because i have an @ in my passwords.
can some confirm this..
nice setup btw, i like it, im only missing nagvis..


Feb 25th 2010, by Guest
this
# mv /etc/nagios3 /etc/nagios3.orig
# mkdir /etc/nagios3
# cp -Rt /etc/nagios3 /etc/nagios3.orig/nagios.cfg /etc/nagios3.orig/apache2.conf /etc/nagios3.orig/stylesheets/
# chown nagios:www-data /etc/nagios3
# chmod ug+w /etc/nagios3

is wrong also, just make a copy of the /etc/nagios3 for backup but leave everything in it.
when the setup is finished, add a host, generate the new nagios files, and now you can remove the "unmoddified files".
nice setup thanks.

Feb 25th 2010, by alex
this
# mv /etc/nagios3 /etc/nagios3.orig
# mkdir /etc/nagios3
# cp -Rt /etc/nagios3 /etc/nagios3.orig/nagios.cfg /etc/nagios3.orig/apache2.conf /etc/nagios3.orig/stylesheets/
# chown nagios:www-data /etc/nagios3
# chmod ug+w /etc/nagios3

is wrong also, just make a copy of the /etc/nagios3 for backup but leave everything in it.
when the setup is finished, add a host, generate the new nagios files, and now you can remove the "unmoddified files".
nice setup thanks.

It will work anyway, I just prefer to start with clean config directory...
---
View Alex Simenduev's LinkedIn profileView my profile

Feb 25th 2010, by Guest
and make sure to set the files in /etc/nagios3 and subfolder to nagios:www-data
set it to 664 for file 775 for the folders.


Mar 2nd 2010, by Guest
Hi guys, hi Alex,

very nice howto, thanks for it, but i got one question, please:

# echo "rocommunity public 127.0.0.1" > /etc/snmp/snmpd.conf

i have no permission to execute this command. i tried to make those changes with vi manually.

rocommunity readwrite default public is that the right way?

sorry for double post


Mar 2nd 2010, by alex
Mar 2nd 2010, by Guest
Hi guys, hi Alex,

very nice howto, thanks for it, but i got one question, please:

# echo "rocommunity public 127.0.0.1" > /etc/snmp/snmpd.conf

i have no permission to execute this command. i tried to make those changes with vi manually.

rocommunity readwrite default public is that the right way?

sorry for double post

You don't want to allow write access, so it's not right way ...

Just put "rocommunity public 127.0.0.1" in /etc/snmp/snmpd.conf file (without quotas)
---
View Alex Simenduev's LinkedIn profileView my profile

Mar 3rd 2010, by Guest
Hi Alex,

first i would like to say GooD Work!!! But i have a big Problem in my options of centstorge. The charts of the dashboard are empty, because there isn't the process-host-perfdata on the system. Did anybody else get this error? Where can i find the process-host-perfdata?

Peace

Mar 19th 2010, by Guest
Hello Alex!

Great work! I installed everything without any problems.
But as someone stated above, I can login into the nagios frontend (http://localhost/nagios3) but if I click any link other than Home or Documnetation I'm getting the following error:

Whoops!

Error: Could not read object configuration data!

Here are some things you should check in order to resolve this error:

Verify configuration options using the -v command-line option to check for errors.
Check the Nagios log file for messages relating to startup or status data errors.
Make sure you've compiled the main program and the CGIs to use the same object data storage options (i.e. default text file or template-based file).
Make sure you read the documentation on installing, configuring and running Nagios thoroughly before continuing. If all else fails, try sending a message to one of the mailing lists. More information can be found at http://www.nagios.org.

What could be wrong?

I'm running Ubuntu server 9.10, Centreon 2.1.5, Nagios 3.0.6
Nagios Home:
http://localhost/nagios3
Example of link not working ()Host Detail under Monitoring section:
http://localhost/cgi-bin/nagios3/status.cgi?hostgroup=all&style=hostdetail

Thanks in advance!

Marko


Mar 22nd 2010, by Guest
Hello Alex,

After doublechecking all steps, I found my mistake. I wrote wrong path for P1 File. After fixing that, all seems to work perfectly.

Thanks once more for this great guide!

Marko

Mar 31st 2010, by Guest
I'm so glad I found this review. I'm currently writing a software review on mac data recovery and I found this article very useful in helping me to layout my outline. Thanks much.

Mar 31st 2010, by Guest
hi, nice howto, i only added some extra's.
my setup ubuntu 9.10 server 64bit.
nagios 3.2.0 rebuild from lucid
ndoutils for PPA, Nagvis from PPA ( latest versions ) ( nagvis has 1 wrong dep php 5.3 , get the source, adjust the controle file and change php5.3 to php5.3 and rebuild it.
and i found 1 error. ( or its because i used nagios 3.2.0 for lucid )

Where is your Nagios image directory ?
default to [/usr/local/nagios/share/images/logos]: /usr/share/nagios/htdocs/images/logos
/usr/share/nagios3/htdocs/images/logos ( with the 3 after nagios )

Apr 16th 2010, by Guest
This is nice. Very Very Nice. I got mine working on the first setup.

Apr 21st 2010, by Guest
Mine isnot working at all!
WHY? After generating and export all modification from centreon to nagios, there are errors like the following :

1st nag3.2.1/cent2.1.5 : It appears as though you do not have permission to view information for any of the hosts you requested...

If you believe this is an error, check the HTTP server authentication requirements for accessing this CGI
and check the authorization options in your CGI configuration file.


/var/log/apache2/error.log :

[notice] Apache/2.2.12 (Ubuntu) PHP/5.2.10-2ubuntu6.4 with Suhosin-Patch configured -- resuming normal operations
[Sun Apr 11 11:14:03 2010] [error] [client 10.4.129.254] user nagiosadmin not found: /nagios3/
eval: 1: /usr/local/nagios/libexec/check_nagios: not found
eval: 1: /usr/local/nagios/libexec/check_nagios: not found
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_US"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
eval: 1: /usr/local/nagios/libexec/check_nagios: not found
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_US"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
eval: 1: /usr/local/nagios/libexec/check_nagios: not found
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_US"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
[Sun Apr 11 18:35:09 2010] [error] [client 10.4.129.254] File does not exist: /var/www/favicon.ico
[Sun Apr 11 18:35:12 2010] [error] [client 10.4.129.254] File does not exist: /var/www/favicon.ico
eval: 1: /usr/local/nagios/libexec/check_nagios: not found
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_US"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
eval: 1: /usr/local/nagios/libexec/check_nagios: not found
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_US"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
~








2nd nag3.0.6/cent2.1.5: Whoops!

Error: Could not read host and service status information!

The most common cause of this error message (especially for new users), is the fact that Nagios is not actually running. If Nagios is indeed not running, this is a normal error message. It simply indicates that the CGIs could not obtain the current status of hosts and services that are being monitored. If you've just installed things, make sure you read the documentation on starting Nagios.

Some other things you should check in order to resolve this error include:

1. Check the Nagios log file for messages relating to startup or status data errors.
2. Always verify configuration options using the -v command-line option before starting or restarting Nagios!

Make sure you read the documentation on installing, configuring and running Nagios thoroughly before continuing. If all else fails, try sending a message to one of the mailing lists. More information can be found at http://www.nagios.org.


/var/log/apache2/error.log :

[Sun Apr 18 06:48:35 2010] [notice] Apache/2.2.12 (Ubuntu) PHP/5.2.10-2ubuntu6.4 with Suhosin-Patch configured -- resuming normal operations
[Tue Apr 20 11:34:21 2010] [error] [client 10.4.129.254] File does not exist: /var/www/favicon.ico
[Tue Apr 20 11:34:24 2010] [error] [client 10.4.129.254] File does not exist: /var/www/favicon.ico
[Tue Apr 20 11:34:28 2010] [error] [client 10.4.129.254] File does not exist: /var/www/nagios
[Tue Apr 20 11:34:36 2010] [error] [client 10.4.129.254] user nagiosServer not found: /nagios3
[Tue Apr 20 11:34:39 2010] [error] [client 10.4.129.254] user nagios not found: /nagios3
[Tue Apr 20 11:34:43 2010] [error] [client 10.4.129.254] user nagiosadmin: authentication failure for "/nagios3": Password Mismatch
[Tue Apr 20 12:11:45 2010] [notice] Graceful restart requested, doing restart
[Tue Apr 20 12:11:46 2010] [notice] Apache/2.2.12 (Ubuntu) PHP/5.2.10-2ubuntu6.4 with Suhosin-Patch configured -- resuming normal operations
[Tue Apr 20 14:21:07 2010] [notice] Graceful restart requested, doing restart
[Tue Apr 20 14:21:07 2010] [notice] Apache/2.2.12 (Ubuntu) PHP/5.2.10-2ubuntu6.4 with Suhosin-Patch configured -- resuming normal operations
[Tue Apr 20 14:21:55 2010] [error] [client 10.4.129.254] script not found or unable to stat: /usr/lib/cgi-bin/nagios3, referer: http://10.4.129.204/nagios3/side.html
[Tue Apr 20 14:21:56 2010] [error] [client 10.4.129.254] script not found or unable to stat: /usr/lib/cgi-bin/nagios3, referer: http://10.4.129.204/nagios3/side.html
[Tue Apr 20 14:21:57 2010] [error] [client 10.4.129.254] script not found or unable to stat: /usr/lib/cgi-bin/nagios3, referer: http://10.4.129.204/nagios3/side.html
[Tue Apr 20 14:21:58 2010] [error] [client 10.4.129.254] File does not exist: /var/www/nagios3, referer: http://10.4.129.204/nagios3/side.html
[Tue Apr 20 14:21:59 2010] [error] [client 10.4.129.254] File does not exist: /var/www/nagios3, referer: http://10.4.129.204/nagios3/side.html
[Tue Apr 20 14:59:13 2010] [error] [client 10.4.129.254] user nagiosServer not found: /nagios
[Tue Apr 20 14:59:20 2010] [error] [client 10.4.129.254] user nagiosadmin: authentication failure for "/nagios": Password Mismatch
[Tue Apr 20 14:59:28 2010] [error] [client 10.4.129.254] user nagiosadmin: authentication failure for "/nagios": Password Mismatch
[Tue Apr 20 14:59:30 2010] [error] [client 10.4.129.254] user lol not found: /nagios
[Tue Apr 20 14:59:33 2010] [error] [client 10.4.129.254] user nagios not found: /nagios
[Tue Apr 20 14:59:37 2010] [error] [client 10.4.129.254] user nagiosadmin: authentication failure for "/nagios": Password Mismatch
[Tue Apr 20 14:59:42 2010] [error] [client 10.4.129.254] user nagiosAdmin not found: /nagios
[Tue Apr 20 14:59:44 2010] [error] [client 10.4.129.254] user lol not found: /nagios
[Tue Apr 20 14:59:45 2010] [error] [client 10.4.129.254] user not found: /nagios
[Tue Apr 20 15:01:10 2010] [error] [client 10.4.129.254] user nagiosServer not found: /nagios
[Tue Apr 20 15:01:17 2010] [error] [client 10.4.129.254] user nagiosServer not found: /nagios
[Tue Apr 20 15:01:22 2010] [error] [client 10.4.129.254] user nagiosServer not found: /nagios
[Tue Apr 20 15:02:50 2010] [error] [client 10.4.129.254] user nagiosServer not found: /nagios
[Tue Apr 20 15:03:06 2010] [error] [client 10.4.129.254] user nagiosServer not found: /nagios
[Tue Apr 20 15:14:50 2010] [error] [client 10.4.129.254] script not found or unable to stat: /usr/local/nagios/sbin/statusmap.cgi, referer: http://10.4.129.204/nagios/side.php
[Tue Apr 20 15:15:19 2010] [error] [client 10.4.129.254] script not found or unable to stat: /usr/local/nagios/sbin/statusmap.cgi, referer: http://10.4.129.204/nagios/side.php
[Tue Apr 20 15:38:26 2010] [error] [client 10.4.129.254] script not found or unable to stat: /usr/local/nagios/sbin/statusmap.cgi, referer: http://10.4.129.204/nagios/side.php
[Tue Apr 20 16:27:06 2010] [error] [client 10.4.129.254] script not found or unable to stat: /usr/local/nagios/sbin/statusmap.cgi, referer: http://10.4.129.204/nagios/side.php
~





Can somebody help me? ubuntu server 9.10

some say that it can be the NDO pb issue. is it true? If yes, what should i do to correct these problem?

Thanks in advance for your help... :)

P.S : nagios3 -v nagios.cfg or usr/local/nagios/bin/nagios -v usr/local/nagios/etc/nagios.cfg are perfect. There is no error message neither nor warning messege.
But hosts created in centreon aren't UP at all, even if it's centreon interface.


Please, s.o.s, I'm a noob... :s



Apr 21st 2010, by alex
it seems like, your configuration paths pointing to /usr/local/nagios, but this article uses Nagios packages from repository, and all configuration files must be /etc/nagios3, bin files in /usr/sbin/. Did you follow the guide exactly as it written?
---
View Alex Simenduev's LinkedIn profileView my profile

Apr 21st 2010, by Guest
I sure did follow all instruction.
Actually I'm working on various servers differently. So I have the nag3.0.6/cent2.1.5 with /etc/nagios3, etc as you said. And this one i followed the instruction given in this blog. Since i've got various servers and so do nagios versions and the ways to install. :)

Now i'm redoing/undoing one of my server, the one with nag3.0.6/cent2.1.5. I'm now in nagios phase. Everything is ok til now and I've added a windows host to be remoted.

Do you want me to retry to reinstall centreon again? so that u'll tell me how to get it in the right way?





May 5th 2010, by Guest
Great article, thanks.

May 26th 2010, by Guest
I would be really interested in the installation of Nagios but still not able to figure out few parts of the article I am researching on mac data recoveryonce finish it i will try afterwords



Jun 1st 2010, by Guest
I have a question: Can't I run it in Windows? 2 Day Diet

Jun 1st 2010, by alex
I have a question: Can't I run it in Windows? 2 Day Diet 

No, Nagios runs only on POSIX based systems.
---
View Alex Simenduev's LinkedIn profileView my profile

Aug 15th 2010, by Guest
Can I run it in Red Linux?and how could I set up?super slim

Sep 24th 2010, by Guest
where is the procedure for update my centreon versio to last 3.3 ??

Thanks and Regards

Nov 19th 2010, by Guest
Great step-by-step manual.. working perectly..

Thanks a Lot !

Dec 24th 2010, by Guest
me no show anythings and i have some problems whit some packages

Mar 8th 2011, by Guest
Thanks for great step-by-step!

May 3rd 2011, by Guest
Thank you for this great tutorial, everything works fine here except i keep receiving local mails every 30 mins:

Subject: Cron [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/ph
p5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -delete
Content-Type: text/plain; charset=UTF-8
X-Cron-Env:
X-Cron-Env:
X-Cron-Env:
X-Cron-Env:
Date: Tue, 3 May 2011 08:39:02 +0200 (CEST)

No log handling enabled - turning on stderr logging
MIB search path: /root/.snmp/mibs:/usr/share/mibs/site:/usr/share/snmp/mibs:/usr
/share/mibs/iana:/usr/share/mibs/ietf:/usr/share/mibs/netsnmp
Cannot find module (SNMPv2-TC): At line 10 in /usr/share/mibs/netsnmp/UCD-DLMOD-
MIB
Cannot find module (SNMPv2-SMI): At line 34 in /usr/share/mibs/netsnmp/UCD-SNMP-
MIB
Cannot find module (SNMPv2-TC): At line 37 in /usr/share/mibs/netsnmp/UCD-SNMP-M
IB
Did not find 'enterprises' in module #-1 (/usr/share/mibs/netsnmp/UCD-SNMP-MIB)
Did not find 'DisplayString' in module #-1 (/usr/share/mibs/netsnmp/UCD-SNMP-MIB
)
:
etc...

Anyone got this problem and knows how to solve it? Thanks in advance !

May 3rd 2011, by alex
It seems that your php.ini file is mis-configured to load modules that don't exist.
---
View Alex Simenduev's LinkedIn profileView my profile

Aug 18th 2011, by Guest
Hello,

I followed your guide and all appeared to work fine. However I added a host and am unable to see it. Im also unable to see the localhost. I used Ubuntu 10.04 LTS and installed Centreon 2.2.2. Any advice you can offer would be great.

Thanks

Aug 18th 2011, by alex
Does nagios running?
/etc/init.d/nagios status

---
View Alex Simenduev's LinkedIn profileView my profile

Add Comment



Enter the code shown:

Visual CAPTCHA