3 dots in nagios log are transform in date inside event

Engage with the community of users including those using the open source solutions.
Includes Nagios Core, Plugins, and NCPA

3 dots in nagios log are transform in date inside event

Postby emi65 » Thu Dec 22, 2016 5:15 am

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
Attachments
NagiosEventLog.jpg
emi65
 
Posts: 109
Joined: Fri Aug 17, 2012 3:41 am

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

Postby rkennedy » Thu Dec 22, 2016 2:27 pm

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?
Former Nagios Employee
rkennedy
 
Posts: 6581
Joined: Mon Oct 05, 2015 11:45 am

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

Postby emi65 » Fri Dec 23, 2016 3:02 am

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 |
+---------------------+
Last edited by dwhitfield on Tue Dec 27, 2016 1:38 pm, edited 2 times in total.
Reason: code blocks FTW
emi65
 
Posts: 109
Joined: Fri Aug 17, 2012 3:41 am

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

Postby dwhitfield » Tue Dec 27, 2016 2:39 pm

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!
Need additional support for CentOS or ubuntu? Try OpenLogic: https://www.openlogic.com/talk-to-expert

We can write Nagios plugins for you!

We are hiring: https://www.perforce.com/careers
dwhitfield
Former Nagios Staff
 
Posts: 4582
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN

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

Postby emi65 » Thu Dec 29, 2016 8:34 am

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
emi65
 
Posts: 109
Joined: Fri Aug 17, 2012 3:41 am

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

Postby dwhitfield » Thu Dec 29, 2016 11:22 am

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.
Need additional support for CentOS or ubuntu? Try OpenLogic: https://www.openlogic.com/talk-to-expert

We can write Nagios plugins for you!

We are hiring: https://www.perforce.com/careers
dwhitfield
Former Nagios Staff
 
Posts: 4582
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN


Return to Community Support

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 10 guests