0

I would like for my grok to output results based on my custom pattern.
Input: May 23 22:23:39 vd='root'

I did a grok discover and the results were:

%{SYSLOGTIMESTAMP} vd=%{QS}

I would like to make a custom pattern that will use the discovered results parameters or conditions.Am having no success this is my custom pattern am new to this grok patterns.

#Myown
MYCUSTOM %{SYSLOGTIMESTAMP}[ ]%{QUOTEDSTRING}
robasta
  • 4,621
  • 5
  • 35
  • 53
Meryvn
  • 65
  • 3
  • 12

2 Answers2

1

I had just checked your pattern and was ok: MYCUSTOM %{SYSLOGTIMESTAMP:myTime} vd=%{QUOTEDSTRING:myString}

All you need to do was giving grok the field names where you wanted to store the values. I used "myTyme" and "myString" and worked.

Arturo Herrero
  • 12,772
  • 11
  • 42
  • 73
alfredocambera
  • 3,155
  • 34
  • 29
0
%{SYSLOGTIMESTAMP:Timestamp} vd='%{DATA:String}'

Maybe this will help

Sebastian Lenartowicz
  • 4,695
  • 4
  • 28
  • 39
nul305
  • 1