Weird timestamp format being seen

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
linuser
Posts: 102
Joined: Fri Sep 18, 2015 9:53 am

Weird timestamp format being seen

Post 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.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Weird timestamp format being seen

Post by scottwilkerson »

do you have debug logging turned on?
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
linuser
Posts: 102
Joined: Fri Sep 18, 2015 9:53 am

Re: Weird timestamp format being seen

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Weird timestamp format being seen

Post 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
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked