Hi.
I'm trying to use the logcli tool to check some data.
I did variables exports:
$ export GRAFANA_ADDR=http://grafana.setevoy.org.ua:3000
$ export GRAFANA_USERNAME=admin
$ export GRAFANA_PASSWORD=admin
But still when calling anything from the logcli - I have 404 errors:
# logcli labels job
http://grafana.setevoy.org.ua:3000/api/prom/label/job/values
2019/02/12 15:09:26 Error doing request: Error response from server: {"message":"Not found"} (<nil>)
# logcli query '{job="varlogs"}'
http://grafana.setevoy.org.ua:3000/api/prom/query?query=%7Bjob%3D%22varlogs%22%7D&limit=30&start=1549980735399034669&end=1549984335399034669&direction=BACKWARD®exp=
2019/02/12 15:12:15 Query failed: Error response from server: {"message":"Not found"} (<nil>)
I have 404 even tiring to just make an API:
# curl http://grafana.setevoy.org.ua:3000/api/prom/label
{"message":"Not found"}
So it looks like something is wrong on my Grafan's side?
Its logs says:
grafana_1 | t=2019-02-12T15:09:26+0000 lvl=info msg="Request Completed" logger=context userId=1 orgId=1 uname=admin method=GET path=/api/prom/label/job/values status=404 remote_addr=52.16.65.121 time_ms=24 size=23 referer=
grafana_1 | t=2019-02-12T15:09:52+0000 lvl=info msg="Request Completed" logger=context userId=0 orgId=0 uname= method=GET path=/api/prom/label status=404 remote_addr=52.16.65.121 time_ms=0 size=23 referer=
But data present in Grafana and I can see it via _Explore_.
What I'm doing wrong here?
Thanks.
馃憤 I'm experiencing the same problem 馃槩
I had the same issue, looks like the GRAFANA_ADDR url needs to point to Loki, not to Grafana (port 3100 instead of 3000).
indeed. the doc is very confusing about this. Here LOKI_ADDR is more clear than GRAFANA_ADDR
This issue has been automatically marked as stale because it has not had any activity in the past 30 days. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.
Most helpful comment
I had the same issue, looks like the GRAFANA_ADDR url needs to point to Loki, not to Grafana (port 3100 instead of 3000).