Extract substring and convert it to numeric from log

Hi everyone. Currently in our app we are logging the quantity of records written to a db, and what we want to do is in a dashboard print the sum of all written records in the, say, last 30 minutes.

The logs we want to “slice” looks like this:

message: "info: RecordsWritten: 1234"

And, I would like to extract the substring "1234". Then, I know it can be converted to numeric value with the function numeric().

Any help is appreciated! Thanks!

Have you considering parsing rules for your logs?


1 Like