Page 1 of 1

Weird timestamp format being seen

Posted: Wed Jun 13, 2018 1:36 pm
by linuser
Hi all running nagios core 4.3.2. on RHEL 6.8

Iv'e noticed in the nagios log file lines with a timestamp format I've never seen. Is this normal? How can I get these specific log entries to log with the usual timestamp?

(unusual- possible problem?)

[1528914023.932248] [032.0] [pid=14036] ** Service Notification Attempt ** Host: 'xont1', Service: 'DHCPD-POOL', Type: NORMAL, Options: 0, Current State: 1, Last Notification: Tue Jun 5 18:12:35 2018
[1528914023.932301] [032.1] [pid=14036] This service problem has already been acknowledged, so we won't send a notification out.
[1528914023.932311] [032.0] [pid=14036] Notification viability test failed. No notification will be sent out.

(normal timestamp)
[1528914056] EXTERNAL COMMAND: SCHEDULE_FORCED_HOST_CHECK;xont1;1528914055
[1528914097] EXTERNAL COMMAND: SCHEDULE_FORCED_SVC_CHECK;thor.megagate.com;Root Drive;1528914095
[1528914557] EXTERNAL COMMAND: SCHEDULE_FORCED_SVC_CHECK;thor.megagate.com;ccctank;1528914556

This is sort of a problem for us because we are using an application called Evoli to parse the nagios logs and its complaining about that format in the first example.

Re: Weird timestamp format being seen

Posted: Wed Jun 13, 2018 1:44 pm
by scottwilkerson
do you have debug logging turned on?

Re: Weird timestamp format being seen

Posted: Wed Jun 13, 2018 1:59 pm
by linuser
Yes, we do actually. Are you saying this is the problem? Is there a way to keep debug logging enabled and have it use the normal timestamp?

debug_level=32
# DEBUG VERBOSITY
# This option determines how verbose the debug log out will be.
debug_verbosity=1
# DEBUG FILE
# This option determines where Nagios should write debugging information.
# debug_file=/var/log/nagios/nagios.debug
debug_file=/var/log/nagios/nagios.log
# MAX DEBUG FILE SIZE
# This option determines the maximum size (in bytes) of the debug file. If
# get out of control when debugging Nagios.
#max_debug_file_size=1000000

Re: Weird timestamp format being seen

Posted: Wed Jun 13, 2018 4:15 pm
by scottwilkerson
linuser wrote:Are you saying this is the problem? Is there a way to keep debug logging enabled and have it use the normal timestamp?
Yes, you need to debut to a different file than the nagios.log
change this line

Code: Select all

debug_file=/var/log/nagios/nagios.log
to this line

Code: Select all

debug_file=/var/log/nagios/nagios.debug