View Full Version : Distributed Monitoring help
fatmcgav
15th September 2008, 13:41
Hi All,
I'm trying to set up Distributed Monitoring with Nagios 3 and Centreon RC4.
I've follows the documentation in the Centreon Wiki (http://en.doc.centreon.com/DistributedArchitecture)
The guide seems pretty straight forward, and i think i've followed it to the letter.
However, i'm not getting any nagios config files populated on my remote poller, and therefore I cant start Nagios or Ndo2db...
Also, when i'm logged into ssh on my Centreon server, i keep getting the following displayed on the console:
scp: /usr/local/nagios/var/nagios.log: No such file or directory
Now this has only started appearing since i've enabled the remote poller, so it must be related...
Also, when i try to export from Centreon, the status report for the remote poller gives:
...
Things look okay - No serious problems were detected during the pre-flight check
Running configuration check...done.
Stopping nagios: done.
Starting nagios: done.
Any ideas where i start?
Cheers
Gavin
Ronan_
15th September 2008, 14:26
First, you must know that when you export from Centreon, you can't trust the status report. You just know your config files are fine, that's all.
Is nagios.log existing on the remote server? Has it got the right permissions (owner, chmod)?
I won't be able to help you any further since I'm moving today (to setup a remote poller in a remote location, of course ^^), but you should keep providing as much info as you can so that other members of the forum will be able to help you.
fatmcgav
15th September 2008, 14:29
There is no nagios.log file on the remote server.
When i installed Nagios on teh remote poller, i didnt go make install-config.. does that matter?
Cheers
Gavin
fatmcgav
15th September 2008, 14:58
Also, another thing i noticed when reading the Wiki doc, is that in the notes at the bottom it says the following:
The procedures to restart, reload, ... nagios as well as the transfer of configs to remote pollers are called via a command file (/var/lib/centreon/centcore.cmd). Make sure the both the Apache and Centcore owner can modify this command file.
However, on my Centreon server, /var/lib/centreon/centcore.cmd doesn't exist...
I'm running RC4, and the wiki says remote pollers have been support since B5...
Any ideas?
Gav
VanGTO
16th September 2008, 10:53
However, on my Centreon server, /var/lib/centreon/centcore.cmd doesn't exist...
Gav
Well, this file doesn't exist because centcore move it when he's done reading it, so set up the right permission on /var/lib/centreon/ (Mine is nagioscmd, the custom group which hold apache+nagios... maybe nagioscommand for you).
The lack of nagios.log is a bit more disturbing, is nagios really started ? Try reinstall nagios and ndomod.
I'll edit if i find some more info.
Edit : Oh right, here's 2 things that might resolved your stuff :
- I assume you do the thing with ssh-keygen (cf. thread in centreon 2 bêta where you posted yesterday), be sure to leave an empty "passphrase"
- Configure the sudoers file ! Centcore use a line like sudo /etc/init.d/nagios restart to restart nagios, so you've to remove the use of password for the nagios user on the remote poller.
fatmcgav
16th September 2008, 10:56
Well, this file doesn't exist because centcore move it when he's done reading it, so set up the right permission on /var/lib/centreon/ (Mine is nagioscmd, the custom group which hold apache+nagios... maybe nagioscommand for you).
The lack of nagios.log is a bit more disturbing, is nagios really started ? Try reinstall nagios and ndomod.
I'll edit if i find some more info.
Nagios wasn't started, as i didnt do make install-conf, however i've done that now, and started Nagios, and still no joy... cant' see the config files being updated when i do an export...
Any ideas?
Cheers
Gav
fatmcgav
20th October 2008, 12:55
Ok, i've come back to this now and i need to get it working...
I've ran through all the config instructions again, and they all are correct...
I can see the updated config files being generated under /usr/local/centreon/filesGeneration/nagiosCFG/2
ls -l gives me:
-rw-r--r-- 1 apache apache 1851 Oct 20 10:44 cgi.cfg
-rw-r--r-- 1 apache apache 8769 Oct 20 10:44 checkcommands.cfg
-rw-r--r-- 1 apache apache 1338 Oct 20 10:44 contactgroups.cfg
-rw-r--r-- 1 apache apache 2183 Oct 20 10:44 contacts.cfg
-rw-r--r-- 1 apache apache 1089 Oct 20 10:44 dependencies.cfg
-rw-r--r-- 1 apache apache 1089 Oct 20 10:44 escalations.cfg
-rw-r--r-- 1 apache apache 1089 Oct 20 10:44 hostextinfo.cfg
-rw-r--r-- 1 apache apache 1175 Oct 20 10:44 hostgroups.cfg
-rw-r--r-- 1 apache apache 3358 Oct 20 10:44 hosts.cfg
-rw-r--r-- 1 apache apache 2937 Oct 20 10:44 misccommands.cfg
-rw-r--r-- 1 apache apache 3644 Oct 20 10:44 nagios.cfg
-rw-r--r-- 1 apache apache 2914 Oct 20 10:44 nagiosCFG.DEBUG
-rw-r--r-- 1 apache apache 1089 Oct 20 10:44 ndo2db.cfg
-rw-r--r-- 1 apache apache 1351 Oct 20 10:44 ndomod.cfg
-rw-r--r-- 1 apache apache 1139 Oct 20 10:44 resource.cfg
-rw-r--r-- 1 apache apache 1089 Oct 20 10:44 serviceextinfo.cfg
-rw-r--r-- 1 apache apache 1089 Oct 20 10:44 servicegroups.cfg
-rw-r--r-- 1 apache apache 9148 Oct 20 10:44 services.cfg
-rw-r--r-- 1 apache apache 1924 Oct 20 10:44 timeperiods.cfg
However these files aren't getting copied across to the second poller.
I can ssh login from main to 2nd using ssh man2
sudo is configured to allow nagios to restart without password, and group membership is set-up correctly.
Any ideas where i can begin?
Cheers
Gavin
fatmcgav
20th October 2008, 19:24
Also, i've since upgraded to RC5, and still no joy...
xoroz
29th July 2009, 14:23
Me too I am having issues trying to setup a Ditributed Nagios/Centreon.
Nagios supports NCSA ( a module that was developed by Ethan ) to maintain 2 nagios synced.
The way centcore works is not really clear.
I think it is all maintained in on SQL DB on the master server,
thru NDO TCPSocket it would update that DB, correct?
I believe again the main difficult setting up this is NDO,
my Master server does not have any daemon listening on ndo port 5668,
how do I setup that?
the wiki does not talk much about that...
I have the .cfg files here: /usr/local/centreon/filesGeneration/nagiosCFG/1
but nothing here: /usr/local/centreon/filesGeneration/nagiosCFG/2
centcore.log shows me these errors:
Try `mv --help' for more information.
Use of uninitialized value in concatenation (.) or string at /usr/local/centreon/bin/centcore line 293.
Use of uninitialized value in concatenation (.) or string at /usr/local/centreon/bin/centcore line 307.
Use of uninitialized value in concatenation (.) or string at /usr/local/centreon/bin/centcore line 313.
mv: invalid option -- o
any idea how to fix it?