Nagios Logs, Handy One-Liner
Nagios is an amazing network monitoring tool, and its logs are a greppable goldmine of information. Most of us aren’t able to convert timestamps into local dates on the fly. GeekPeek offers the following one-liner which you can add into a pipe to convert timestamps into human-readable format on the fly.
perl -pe 's/(\d+)/localtime($1)/e'
I’ve used variations on this to convert the timestamps of BGP advertisements in JSON objects outputted from exabgp. It is a very handy chunk of a one-liner to keep handy.