new to logql here.
This is a sample json log line I have:
{
"accessedts":1696477777255,
"command":"get_user_details",
"country":"US",
"referrer":"google",
"status":"SUCCESS",
}
I am trying to write a simple logql query which will give me multiple line graphs, each representing the rate for a country (grouping by the country field. there would be mulitiple countries in the logs) and doing the same for the referrer.
So the end expectation would be to have a line graph per country which represents the rate.
I was trying something like this (but did not work):
sum by (country) (rate({namespace="mynamespace"}| json | __error__!="JSONParserErr"[10m]))
I can see all my logs when I query for {namespace="mynamespace"} in the explorer.
Would you know how I could write a query for this ?