nagios.log Date/Time Conversion to Human Readable

Sometimes, you need to parse a nagios.log, and even more so, need to be able to read the date and time of a logged event.  Here’s a simple command-line to do that:


cat /usr/local/nagios/var/nagios.log | perl -pe 's/(\d+)/localtime($1)/e'