Hi all,
I want to get the trap time ,but the trap time format is "Fri Nov 21 2014
15:04:32" ,how to change the format to "2014-11-21 15:04:32" in my single
rule ?
I try to transform the time format in my sec fule, $1 is the trap time ("Fri
Nov 21 2014 15:04:32")
type=Single
ptype=Regexp
pattern=(\S+) (\S+) Cisco-CA Loss Of Signal in (\S+)
\(criticalServiceAffecting\),ifIndex=(.+)
desc=$1 Cisco-CA Loss of signal events for interface $3($4)
action=lcall %time -> ( sub { my(@time) = $1; \
my($timestamp) = sprintf( "%04d-%02d-%02d %02d:%02d:%02d", \
$time[5]+1900, $time[4]+1, $time[3], $time[2], $time[1], $time[0]); \
return $timestamp; } );shellcmd /home/andrew/code/sendmail.sh "Loss Of
Signal" " Cisco-CA Loss of signal events for interface $3($4)" "%time"
cheers,
Andrew
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Simple-evcorr-users mailing list
Simple-evcorr-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/simple-evcorr-users