Parse Data to get value from label

The below is how our sample data looks like

{
@timestamp”: “2025-06-05T09:34:28.617+01:00”,
@version”: “1”,
“message”: “Valuation=3452_iq3452 took 195668 ms to process”,
“logger_name”: “eksdatadervice”,
“thread_name”: “pub-#3451%”,
“level”: “INFO”,
“level_value”: 20000,
“HOSTNAME”: “ip-10-112-11-28.ap-southeast-1.compute.internal”,
“clientId”: “56342”,
“clientName”: “Test01”,
“sendNotification”: “false”,
“valuationId”: “3452_iq3452”,
“version”: “1.2”,
}

by using the json parser we are able to get labels and search it . the issue is that we need to know the time taken by the log, which is available inside the message .

How can we get the numerical value as a separate label for querying .

we were able to parse it using derived labels ,but unfortunately we are not able to search or query that in loki. so is there any suggestion to use log parser or anything to achieve this( to parse the numerical value in message as a separate searchable label)

Hey, have you tried pattern or regexp parsers? For example, you could do something like

| json | line_format "{{.message}}" | pattern `Valuation=<_> took <process_time> ms to process`

Then you should have the process_time field extracted. Afterwards, you can filter logs based on values of this field:
| process_time >100
Or unwrap it and create metrics.