I use Promtail+Loki to collect my logs.
Input logs are JSON strings that look like this:
{ "severity":"error", "msg":"very bad error", "duration":20 }
How can I parse this string by Promtail to get duration as numeric in Loki?
My goal is to be able to make queries like this:
{job="job_name"}|duration>10s