You could do something like this:
Replace the paths to reflect your environment.
tail -f /usr/local/nagios/var/nagios.log | perl -pe
's/(\d+)/localtime($1)/e'
or
grep 'something important to look for'
somelogfilewithepochtimestamps.log | perl -pe 's/(\d+)/localtime($1)/e'
or
perl -pe 's/(\d+)/localtime($1)/e' somelogfilewithepochtimestamps.log
Chris Waters
________________________________
From: shadih rahman [mailto:[email protected]]
Sent: Wednesday, July 15, 2009 9:10 AM
To: [email protected]
Subject: [Nagios-users] nagios log file date format
Is there any way to change nagios log file date format to human readable
format. I did not see any option in nagios.cfg file. Please advise on
this. Thanks
--
Cordially,
Shadhin Rahman
------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Nagios-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting
any issue.
::: Messages without supporting info will risk being sent to /dev/null