NagiosXI 2014R1.2
Is it possible to permanently change the date format in nagios.log?
It is such a pain to have it in the decimal format which serves no purpose to us.
Thanks.
Nagios Log Date Format
Nagios Log Date Format
5 x Nagios 5.6.9 Enterprise Edition
RHEL 6 & 7
rrdcached & ramdisk optimisation
RHEL 6 & 7
rrdcached & ramdisk optimisation
Re: Nagios Log Date Format
I am not sure if "permanent" change is possible withing breaking the functionality, but you can always run:
to view the timestamps in "human readable" format.
Code: Select all
tail /usr/local/nagios/var/nagios.log | perl -pe 's/(\d+)/localtime($1)/e'Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Nagios Log Date Format
Thank you Ludmill fir this nice tip. I will be able to use that. The Unix timestamps can be very confusing.
Grtz
Willem
Grtz
Willem
Nagios XI 5.8.1
https://outsideit.net
https://outsideit.net
Re: Nagios Log Date Format
If I can throw my two cents in, the prevalence of the UNIX timestamp is largely due to how precise it is. There is no need to figure out a multitude of date formats (mm/dd/yyyy, dd/mm/yyyy, yy,mm,dd) and 12- vs 24-hour clocks. It is just an integet, and the conversion is very easy. It's terrible for humans to read, but there are enough ways to deal with it like ludmil's suggestion that it is a minor annoyance at worst.
Former Nagios employee