Main Page/IT/nagios

From Lewis Consultancy Wiki
< Main Page‎ | IT
Revision as of 10:44, 25 May 2016 by Clewis (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

A one liner to split up a nagios log

cat nagios.log  | while read line; do  unixts=`echo $line | cut -b 2-11`;  logname="nagios-`date -d \@$unixts +%m-%d-%Y`-00.log"; echo $line >> $logname; done