I setup Loki (distributed w/ Cassandra) 2.2.0 (and 2.2.1) using the Helm chart, with promtail ingesting log data, and I get the error below when I try to query Loki:
curl -v -H "Content-Type: application/json" "http://<url>:3100/loki/api/v1/query" --data-urlencode 'query={namespace=<mynamespace}'
Error:
Syntax error: unexpected $end
The Grafana dashboard shows Loki is ingesting data into Cassandra but I can’t query and get data back. Any ideas?
I’m also getting these errors in the logs:
msg: “TCPTransport: unknown message type”
msgType: G
datadude:
{namespace=<mynamespace}
Hi @datadude
Your query {namespace=<mynamespace}
is invalid - the query parser is expecting to find the end of the line because of a syntax error.
it’s actually ‘query={namespace=“mon”}’
I just put this “<>” to show its a variable.
This is a vanilla install of Loki. It’s a problem for 2.2.0 and 2.2.1.
1 Like
/loki/api/v1/labels works but /loki/api/v1/query does not.
When I add a -G the response says ‘not implemented’
curl -G -v -H "Content-Type: application/json" "http://<url>:3100/loki/api/v1/query" --data-urlencode 'query={namespace="mon"}'
I can’t be the only one having this problem with Loki Distributed and Cassandra. If I just tear down Cassandra and Loki and do a fresh install I get the same problem.
1 Like
I’m still getting the response ‘not implemented’ when I query Loki /query. Oh well. Maybe the next version will resolve this.
I resolved my issue by setting two specific parameters. See info here:
opened 06:50PM - 19 May 21 UTC
**Describe the bug**
When I install Cassandra and Loki distributed in Kuberne… tes using the Helm charts everything seems to work but I can't query the Querier.
I query like this:
curl -G -v -H "Content-Type: application/json" "http://<url>:3100/loki/api/v1/query" --data-urlencode 'query={namespace="mon"}'
response is "not implemented"
I get the same response in Grafana: "not implemented"
Querying the /labels api works but not the /query api.
**To Reproduce**
Steps to reproduce the behavior:
Install Cassandra using Helm chart
Install Loki distributed using Helm chart
Install promtail to send logs to the distributor
**Expected behavior**
I expect to query and get results back not the message "not implemented"
**Environment:**
* Kubernetes
* Helm
* Cassandra
* Loki distributed 2.2.1 or 2.2.0
*
**Screenshots, Promtail config, or terminal output**
This is on a closed network where I can not bring stuff to the internet.
1 Like
system
Closed
May 27, 2022, 3:09pm
11
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.