Just a useful one line trick for Nagios logs

Nagios logs timestamp is not human readable, so how to see when something occurred? Here is a one line trick to convert log from epoch timestamp to human readable time:

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

 

Found on: http://unix.stackexchange.com/a/2992i

Lascia un commento

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *

Questo sito usa Akismet per ridurre lo spam. Scopri come i tuoi dati vengono elaborati.