Thursday, January 30, 2014

Icinga log parsing perl command

The perl command changes unix time to human readable time in the output... Very useful for searching the check log archives.

more /usr/local/icinga/var/archives/* | perl -p -e 's/^\[(\d+)\]/"[". localtime($1) . "]"/e' | grep <what you're looking for>

No comments: