PDA

View Full Version : Reporting only showing today on Cent 1.4.2.2


bhozar
01-25-2008, 05:54 PM
I cant get Centreon reporting working correctly. I have searched the WIKI and forums, but no luck so far in fixing this problem.

My system:
Debian Lenny
Centreon 1.4.2.2
Nagios 2.9

Reporting tab only shows todays results, and no previous days results.

I am guessing the cron job is correct, as it shows todays results.

/etc/cron.d/centreon
0 0 * * * nagios php -q /usr/local/centreon/cron/inventory_update.php >> /usr/local/centreon/log/archiveLogInDB.log 2>> /usr/local/centreon/log/odsParsing.log
0 0 1-31 * * nagios php -q /usr/local/centreon/cron/reporting/ArchiveLogInDB.php >> /usr/local/centreon/log/archiveLogInDB.log 2>> /usr/local/centreon/log/odsParsing.log
* * * * * nagios /usr/local/centreon/cron/parsing_status.pl >> /usr/local/centreon/log/odsParsingStatus.log 2>> /usr/local/centreon/log/odsParsingStatus.log
* * * * * nagios /usr/local/centreon/cron/parsing_log.pl >> /usr/local/centreon/log/odsParsing.log 2>> /usr/local/centreon/log/odsParsing.log


I have ran the above comands successfully from the command line using:
sudo -u nagios CRONLINE

Log files are created, but nothing is written to them.

/usr/local/centreon/log/
drwxrwxr-x 2 www-data nagios 4096 2008-01-25 15:33 .
drwxrwxr-x 10 www-data www-data 4096 2008-01-09 13:37 ..
-rw-r--r-- 1 root root 0 2008-01-25 15:33 archiveLogInDB.log
-rw-r--r-- 1 www-data www-data 4392 2008-01-25 13:50 auth.log
-rw-r--r-- 1 www-data www-data 6823 2008-01-11 11:15 cfgimport.log
-rw-rw-rw- 1 nagios nagios 0 2008-01-25 15:10 inventory.log
-rw-r--r-- 1 www-data www-data 14063 2008-01-09 16:27 ldapsearch.log
-rw-r--r-- 1 nagios nagios 0 2008-01-25 15:27 odsParsing.log
-rw-r--r-- 1 nagios nagios 0 2008-01-25 15:27 odsParsingStatus.log
-rw-r--r-- 1 www-data www-data 25358 2008-01-11 12:22 rrdtool.log


/var/log/nagios/
drwxr-s--x 3 nagios adm 4096 2008-01-25 15:41 .
drwxr-xr-x 13 root root 4096 2008-01-25 13:48 ..
drwxr-xr-x 2 root root 4096 2007-06-11 22:10 archives
-rw-r--r-- 1 nagios adm 1737544 2008-01-25 15:36 nagios.log
-rw-r--r-- 1 nagios adm 269481937 2008-01-25 15:41 service-perfdata.tmp


"Initial state logging option" is set to 1 in nagios.cfg.

So what else am I missing to get these reports working for more than just today?

DonKiShoot
01-25-2008, 06:32 PM
Just concentrate on this part of the cronfile for stat not keep in database :

php -q /usr/local/centreon/cron/reporting/ArchiveLogInDB.php
If i remember correctely, you must edit one or two parameters in it or in a config file.
Just look the first lines of the source codes, you should find easily what it need.

bhozar
01-25-2008, 07:33 PM
Thats correctly set in /usr/local/centreon/cron/reporting/ArchiveLogInDB.php to:
$path_oreon = '/usr/local/centreon';

SeanFromIT
01-25-2008, 09:16 PM
The Reporting page doesn't work in Debian, even in version 1.4.1. It works fine on a Red Hat install. If you find a fix, please post it here. To see what we've already tried to fix this problem, see http://forum.oreon-project.org/showthread.php?t=4889

bhozar
01-25-2008, 10:49 PM
The Reporting page doesn't work in Debian, even in version 1.4.1. It works fine on a Red Hat install. If you find a fix, please post it here. To see what we've already tried to fix this problem, see http://forum.oreon-project.org/showthread.php?t=4889

Actually, just remembered I am running the latest version of Ubuntu, not Debian. Guess Ubuntu has inherited the problem from its Debian code base.

This would be so much easier if it at least gave out some errors, rather than just nothing. Even running the cron lines as root from the command line does nothing.

bhozar
01-28-2008, 11:48 AM
Just noticed that Nagios has to be restarted each morning to get the reporting going for the day. Still doesnt work for previous days. Obviously this is a long runing bug, after looking at the forum.

rsoares
01-28-2008, 08:03 PM
I had the same old problem, i try restart all machine from zero.. and the problem still .. i'm running freebsd 6.2 stable version and centreon 1.4.2..

I'm waiting for centreon 2.0 version and pray for this f*** problem has beem solved...

Just noticed that Nagios has to be restarted each morning to get the reporting going for the day. Still doesnt work for previous days. Obviously this is a long runing bug, after looking at the forum.

bhozar
01-29-2008, 12:19 PM
I have now tried running the scripts as root, so I dont think it would be permissions, as root has access to everything. Still the exact same results; nothing what so ever. Not even an error.

I have entered a bug report, and linked this and another forum thread in it, so hopefully a dev will look at it eventually.

bhozar
02-20-2008, 02:47 PM
If anyone is having problems with this, it might be worth looking at the bug report I have submitted. Additional info from others may help.

http://bugs.centreon.com/?do=details&id=467

mck
02-22-2008, 09:28 AM
I have a fresh installation of Nagios 2.10 and Centreon 1.4.2.3 on Redhat Enterprise Linux ES Update 4 - the same problem.

ade028
04-18-2008, 11:40 AM
I've read a lot about this problem on the forum and I've read the bug report.
After a ArchiveLogInDB.php –d the issue seems to be solved for the hosts. But the reporting for some services show me only information for the current day and not for the days before.

I think it's linked with this problem because the problem affect only services with "/" in the service description : (bug report (http://bugs.centreon.com/?do=details&id=467))

Comment by Pierre B (octplane) - Tuesday, 26 February 2008, 06:55PM
Hi, after some investigation,
I found out that there might be some issue in the way the service names are stored in the DB :
In my nagios, the service name is "DNS / IDM / ISIS"
In the DB "DNS #S# IDM #S# ISIS"


I would like to run the patch found on the same page but I don't know how.
I've tried with something like that after copy my original file :
# patch ArchiveLogInDB.php diff.patch

But I have some errors
patching file ArchiveLogInDB.php
Hunk #2 FAILED at 31.
Hunk #4 FAILED at 175.
2 out of 4 hunks FAILED -- saving rejects to file ArchiveLogInDB.php.rej


Thanks in advance for your replies,

ade028


Problem solved !
I've copied the original file from the source code and patch this file. After some changes for centreon path, the reporting for services with "/" in service description works fine.

bhozar
04-18-2008, 02:31 PM
I dont have any slashes "/" in my service names. I tried the patch and it still didnt work.

fouinix
06-03-2008, 03:29 PM
Maybe a solution :
On my Debian Etch system part of the problem seems to be wrong permissions on /var/log/nagios2/archives.
Only root has write permission on this folder but the log files are rotated by the user nagios. So archiving of the nagios.log didn't work at all and there where no files to process for ArchiveLogInDB.php.
After changing the permissions the reporting seems to work.
http://bugs.centreon.com/?do=details&id=467