Page 1 of 1

3 dots in nagios log are transform in date inside event

Posted: Thu Dec 22, 2016 5:15 am
by emi65
Hi expert
I'm using Nagios 4.2.1

When I look the event log by web user interface some time I see these messages:
gennaio 01, 1970 01:00
Informational Message[01-01-1970 01:00:00]

I attach also an image

If I check directly in the nagios.log file I find
...

I suppose that this 3 dots are converted in the date gennaio 01, 1970 01:00

I find these 3 dots using this command
grep -i "^\.\.\." nagios.log

Does it a potential problem ?
Why happens this ?

Regards
Emilio

Re: 3 dots in nagios log are transform in date inside event

Posted: Thu Dec 22, 2016 2:27 pm
by rkennedy
Are all of your times lining up on your system? What is the output from these commands?

Code: Select all

grep "date.timezone" /etc/php.ini
ls -l /etc/localtime
php -r 'echo date("D M j G:i:s T Y")."\n";'
date
mysql -unagiosxi -pn@gweb -e "SELECT NOW();"
Additionally, how are you managing time?

Re: 3 dots in nagios log are transform in date inside event

Posted: Fri Dec 23, 2016 3:02 am
by emi65
here the answer

Code: Select all

grep "date.timezone" /etc/php.ini
; http://www.php.net/manual/en/datetime.configuration.php#ini.date.timezone
;date.timezone =
date.timezone = 'Europe/Rome'

Code: Select all

[root@sgsvrasnag006lx:~]# ls -l /etc/localtime
-rw-r--r--. 1 root root 2652  2 mag  2011 /etc/localtime

Code: Select all

[root@sgsvrasnag006lx:~]# php -r 'echo date("D M j G:i:s T Y")."\n";'
Fri Dec 23 8:59:43 CET 2016

Code: Select all

[root@sgsvrasnag006lx:~]# date
ven 23 dic 2016, 08.59.43, CET

Code: Select all

+---------------------+
| NOW()               |
+---------------------+
| 2016-12-23 09:02:09 |
+---------------------+

Re: 3 dots in nagios log are transform in date inside event

Posted: Tue Dec 27, 2016 2:39 pm
by dwhitfield
Is this system running in a VM (specifically VMWare)? ntpd and the VM may be arguing about the time.

Also, can you post the output of tail -1000 /usr/local/nagios/var/nagios.log. We want a couple of days. If the -1000 is way too much or way too little, adjust accordingly.

Also, do you have auditd installed by chance? It would be nice to know if anything/anybody is modifying that log other than nagios.

Based on the output of /etc/localtime it looks like you are running some sort of Debian release. Could you post the output of cat /etc/*lease? Thanks!

Re: 3 dots in nagios log are transform in date inside event

Posted: Thu Dec 29, 2016 8:34 am
by emi65
Hi

sorry for my later answer
cat /etc/*lease
LSB_VERSION=base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Red Hat Enterprise Linux Server release 6.7 (Santiago)
Red Hat Enterprise Linux Server release 6.7 (Santiago)

I was in holiday and just today I checkd the presence of "..." in nagios.log file and I dind't find nothing .

I got it (...) in archives nagio log files

thanks
Emilio

Re: 3 dots in nagios log are transform in date inside event

Posted: Thu Dec 29, 2016 11:22 am
by dwhitfield
If you don't feel comfortable post tail -1000 /usr/local/nagios/var/nagios.log you can PM it to me. If you choose to PM, just make sure you update this thread after you PM. I know the dots aren't there, but there might be something strange that we pick up on. If you are going to PM, you might as well go ahead and send your objects.cache. It's probably overkill, but it'll help us start connecting dots.

NagiosQL hasn't been updated since 2013-04-25, and they don't claim to support Nagios 4.x. You might want to look at other options. As time moves on, we are likely to become less and less compatible with NagiosQL.

Nagios 4.2.4 has a number of important security improvements since 4.2.1. I would strongly suggest upgrading.