Reputation: 327
I want create userId field with use of grok. in log sample you can see [userId: id of user in guid format]. so what is the pattern need to add in grok for userId ? need some guidence for this.
here is my log
2020-10-15 16:01:29.1350 [84680] ERROR FinanceAPI.Controllers.TransactionController 192.168.43.244 Invalid Ledgers [UserId:1dfae3d2-258d-42d4-802e-c39a751574e3]
here is the grok pattern
grok {
match => { "message" => "%{TIMESTAMP_ISO8601:timestamp} \[%{INT:processId}]\ %{LOGLEVEL:level} %{DATA:logger} %{IPV4:clientIp} %{GREEDYDATA:message} }
overwrite => "message"
}
Upvotes: 0
Views: 821
Reputation: 370
UUID
pattern should work to get the user id out of message.
Here is the default list of Grok pattens.
Upvotes: 0