I'm logging a JSON which is being shown as a detected field log
in Grafana:
Now I want to filter the logs by level name, but I can't figure out how...
I thought something like this would work, but doesn't, no results are returned:
{app="hello"} | json | line_format "{{.log}}" | levelname="ERROR"
What am I missing?
Detected fields
I have alog
key with, for example:"{\"asctime\": \"2022-04-29 09:28:37,817\", \"created\": 1651224517.8172572, \"filename\": \"main.py\", \"funcName\": \"root\", \"levelname\": \"ERROR\", \"levelno\": 40, \"lineno\": 30, \"module\": \"main\", \"msecs\": 817.2571659088135, \"message\": \"oh no an error\", \"name\": \"root\"}\n"
. Should I be doing this a different way? any pointers? – Oleum