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.
Weird timestamp format being seen
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Weird timestamp format being seen
do you have debug logging turned on?
Re: Weird timestamp format being seen
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
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
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Weird timestamp format being seen
Yes, you need to debut to a different file than the nagios.loglinuser wrote:Are you saying this is the problem? Is there a way to keep debug logging enabled and have it use the normal timestamp?
change this line
Code: Select all
debug_file=/var/log/nagios/nagios.log
Code: Select all
debug_file=/var/log/nagios/nagios.debug