Hello, peopleeeee !
sorry to disturb you with probably such an easy question for you, veteran... BUT ... im stuck, and I mean it...
heres the situation, i need to backfill a few days back log from /var/log/network.log
sample log :
VERSION 1 that need to be backfilled.
2016-02-01T10:44:13-05:00 chrgft.ca date=2016-02-01 time=10:44:13 devname=FG-200D-MASTER devid=FG200D3915877554 logid=0000000013 type=traffic subtype=forward level=notice vd=root srcip=10.24.136.141 srcport=58626 srcintf="port1" dstip=174.252.90.36 dstport=443 dstintf="wan1" poluuid=9499a3ae-87e3-53e5-05b9-1e6e2db9c5c3 sessionid=39393540 proto=6 action=close user="BCA11380" group="SocialMedia" policyid=63 dstcountry="United States" srccountry="Reserved" trandisp=snat transip=10.24.214.5 transport=58626 service="HTTPS" appid=15832 app="Facebook" appcat="Social.Media" apprisk=medium applist="APP-SocialApp" appact=detected duration=115 sentbyte=12948 rcvdbyte=3186 sentpkt=21 rcvdpkt=20 utmaction=allow countapp=1
VERSION 2 that needs to be backfilled
itime=1448930548 date=2015-11-30 time=19:42:28 devid=FG200D3912801116 logid=0001000014 type=traffic subtype=local level=notice vd=root srcip=172.116.14.22 srcport=51680 srcintf="wan2" dstip=172.16.15.255 dstport=137 dstintf="root" sessionid=632299376 status=deny policyid=0 dstcountry="Reserved" srccountry="Reserved" trandisp=noop service=137/udp proto=17 app=137/udp duration=0 sentbyte=0 rcvdbyte=0
So . for a start, lets focus on the first version ... I tried different solution found on the web, playing with date, trying to make my own timestamp etc.. but unfortunately it seem im too stupid to figure it out alone ... so guys, I NEED your help ...
See the problem is HERE :
i NEED to take the timestamp from the "message" and use it as my OWN timestamp, not the "currentday" it indexes in ES...
"message" => "2016-01-27T14:13:25-05:00 10.24.214.33 date=2016-01-27 time=14:13:21 devname=CTR device_id=FGT60B34507623279 log_id=0021000002 subtype=allowed type=traffic pri=notice status=accept vd=root dir_disp=org tran_disp=noop src=10.214.181.15 srcname=10.214.181.15 src_port=51042 dst=10.214.224.16 dstname=10.214.224.16 dst_country=Reserved src_country=Reserved dst_port=8080 tran_ip=0.0.0.0 tran_port=0 tran_sip=0.0.0.0 tran_sport=0 service=CHRG-8080 proto=6 app_type=N/A duration=278 rule=1 policyid=1 identidx=0 sent=3048 rcvd=2456 shaper_drop_sent=0 shaper_drop_rcvd=0 perip_drop=0 shaper_sent_name=N/A shaper_rcvd_name=N/A perip_name=N/A sent_pkt=14 rcvd_pkt=13 vpn=N/A vpn_tunnel=N/A src_int=internal dst_int=wan1 SN=75670534 app=N/A app_cat=N/A user=N/A group=N/A carrier_ep=N/A profilegroup=N/A subapp=N/A subappcat=N/A",
"@version" => "1",
********************* "@timestamp" => "2016-02-01T15:22:52.187Z", ********************
and heres the actual config file :
input {
tcp {
'port' => 3333
type => "syslog_backfill"
}
}
filter{
kv { source => "message" field_split => " " value_split => "="
trimkey=>[ "<[0-9][0-9][0-9]>" ]
}
date{
locale => "en"
match => ["message" , "%{TIMESTAMP_ISO8601:logtimestamp} %{LOGLEVEL:level} %{GREEDYDATA:msg}"]
}
geoip{
source =>"dstip"
database =>"/opt/logstash/GeoLiteCity.dat"
}
}
unfortunately ... not working
Please. help ?