I'm trying to test the some custom log filter for logstash but somehow i'm not able to get it, I googled and looked over many examples but I am not able to create a one I want.
Below is my log patterns:
testhost-in2,19/01/11,06:34,04-mins,arnav,arnav 2427 0.1 0.0 58980 580 ? S 06:30 0:00 rm -rf /test/ehf/users/arnav-090119-184844,/dv/ehf/users/arnav-090119-
testhost-in2,19/01/11,06:40,09-mins,arnav,arnav 2427 0.1 0.0 58980 580 ? S 06:30 0:00 rm -rf /dv/ehf/users/arnav-090119-184844,/dv/ehf/users/arnav-090119-\
testhost-in2,19/01/11,06:45,14-mins,arnav,arnav 2427 0.1 0.0 58980 580 ? S 06:30 0:01 rm -rf /dv/ehf/users/arnav-090119-184844,/dv/ehf/users/arnav-090119-\
below is what I trying to create but does not works.
HOSTNAME:hostname DATE:date HOURS_Time:hour_min USERNAME: username USERNAME:username NUMBER:pid COMMAND
any help Will be much appreciated.
Tried:
%{HOSTANME}%{TIMESTAMP_ISO8601:RecordedDateTimeStamp} %{USERNAME:User} %{USERNAME:User} %{NUMBER:PID} %{FLOAT:mem} %{FLOAT:res} %{NUMBER:PID} %{NUMBER:PID} %{GREEDYDATA}
AND
%{HOSTANME}%{TIMESTAMP_ISO8601}%{HOUR}%{MINUTE}%{NUMBER}%{WORD}%{USER}%{USER}%{NUMBER: pid}%{NUMBER:float}%{NUMBER:float}%{NUMBER}%{NUMBER}%{GREEDYDATA}
Great start! Here is a grok pattern that should work better: