log time stamps

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
sflennik
Posts: 3
Joined: Mon Feb 20, 2017 2:54 pm

log time stamps

Post by sflennik »

Currently the nagios logs use the unix timestamp. Can I configure nagios to use utc instead? Something like 2017-01-22T07:39:32Z instead of [1485070772]?

I've seen the perl code to convert timestamps to human readable but I don't want to do this step.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: log time stamps

Post by mcapra »

Not really beyond parsing the logs. The unix timestamp is used by several processes on the back-end of Nagios Core, so altering the state of the log file to use an ISO 8601 timestamp or similar formats would need to be accounted for in several other components of Nagios Core, not just the log file.
Former Nagios employee
https://www.mcapra.com/
Locked