Group by generic Message Template on top of an existing regex parser


Author
Message
Marc
Marc
New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)
Group: Forum Members
Posts: 4, Visits: 31
Hi!
I'd like the find similar SELECT statements to the same table scattered throughout the file in repeating patterns. (See below for an example log entries)
09.12.2024 18:49:28:211 [Worker-0] com.example.MyLogger call INFORMATION: SELECT RandomValueStore WHERE Value = 519342 (duration=10.1504, #rows=9)
09.12.2024 18:49:28:211 [Worker-0] com.example.MyLogger call INFORMATION: SELECT TableA WHERE Value IN (1,2,3) (duration=10.1504, #rows=9)
09.12.2024 18:49:28:211 [Worker-0] com.example.MyLogger call INFORMATION: SELECT TableA WHERE Value = 1321 (duration=1000.1504, #rows=2451)
09.12.2024 18:49:28:211 [Worker-0] com.example.MyLogger call INFORMATION: SELECT RandomValueStore WHERE Value = 1 (duration=1000.1504, #rows=2451)
09.12.2024 18:49:28:211 [Worker-0] com.example.MyLogger call INFORMATION: SELECT TableA WHERE Value IN (5,6,7) (duration=10.1504, #rows=9)
09.12.2024 18:49:28:211 [Worker-0] com.example.MyLogger call INFORMATION: SELECT TableA WHERE Value = 234 (duration=10.1504, #rows=9)
09.12.2024 18:49:28:211 [Worker-0] com.example.MyLogger call INFORMATION: SELECT RandomValueStore WHERE Value = 851 (duration=1000.1504, #rows=2451)
09.12.2024 18:49:28:222 [Worker-0] com.example.MyLogger call INFORMATION: SELECT DISTINCT CURRENT_TIMESTAMP FROM RandomValueStore (duration=2.9189, #rows=50, result=2024-12-09 18:49:28.207)
09.12.2024 18:49:31:150 [Worker-0] com.example.MyLogger execute INFORMATION: Begin transaction (duration=2.5889)
09.12.2024 18:49:31:155 [Worker-0] com.example.MyLogger execute INFORMATION: INSERT INTO RandomValueStore (ID, Value) VALUES (?, ?) (duration=4.0736)
09.12.2024 18:49:31:166 [Worker-0] com.example.MyLogger execute INFORMATION: Commit transaction (duration=10.6521)
09.12.2024 18:49:31:168 [Worker-0] com.example.MyLogger fireDeferredEvents INFORMATION: Start fire 18 deferred events
09.12.2024 18:49:31:170 [Worker-0] com.example.MyLogger fireDeferredEvents INFORMATION: Fire 18 deferred events took totally 2 ms

I've found that parsing by Message Template does an very good job.

For further analyzation I need to also to parse the duration and rows.
See https://www.logviewplus.com/forum/2358/RE-Interpret-Column-as-Number#2360 for my previous post.

Therefore I'm using the following regex parse message filter:
(?<SQL>(.*)(?=\(duration\=))\(duration=(?<Duration>(\d+\.\d+)?)(?=[,\)]), #rows=(?<Rows>(\d+))(?=[,\)])


But with that filter in place i lost the ability to group by the different patters in the log file, because the Message Template is now my regex.


So I thought i could add on top another automatic parse message filter like so.



But then no data is shown anymore in both filters:


Also after removing the bottom filter, my regex cannot be edited:


If I further remove also my regex filter, the message template someties stuck with my regex when grouping by message template, but I wasn't able reproduce this anymore.
I'm using the version v3.1.18.

Is this even possible to do such parsing or am I doing something wrong?
Otherwise it would be very neat to have a feature to group by automatically recognized pattern on further parsed messages.

Thank you for your help
Kind Regards
Marc



GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Login

Explore
Messages
Mentions
Search