Display normal time in Nagios Log

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
liquidcool
Posts: 59
Joined: Tue Feb 21, 2012 6:08 am

Display normal time in Nagios Log

Post by liquidcool »

Hi,

Is there any way to get the nagios.log file to have normal human readable time instead of UTC time for each entry ?

Thanks
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Display normal time in Nagios Log

Post by abrist »

Many. This link may be of interest to you . . .
http://www.epochconverter.com/
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
liquidcool
Posts: 59
Joined: Tue Feb 21, 2012 6:08 am

Re: Display normal time in Nagios Log

Post by liquidcool »

I know about this site, but I want to know if nagios can have non utc time in the logs so when I trawl through it to debug certain events then it will be easier.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Display normal time in Nagios Log

Post by abrist »

Not as far as I know. Nagios uses those logs for check results and historical data. There is a good change that converting them without leaving the originals intact would lead to severe breakage in historical reporting and check results. You could write a script that reads in the logs and outputs new files (named differently) with the time stamps converted to date time from Epoch.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked