I’m struggling to get this working for the first time using docker.
promtail config.yml
server:
http_listen_port: 9080
grpc_listen_port: 0
positions:
filename: /positions/positions.yaml
clients:
- url: http://localhost:3100/loki/api/v1/push
scrape_configs:
- job_name: system
static_configs:
- targets:
- localhost
labels:
job: varlogs
__path__: /var/log/*log
Loki local-config.yaml
auth_enabled: false
server:
http_listen_port: 3100
grpc_listen_port: 9096
common:
path_prefix: /tmp/loki
storage:
filesystem:
chunks_directory: /tmp/loki/chunks
rules_directory: /tmp/loki/rules
replication_factor: 1
ring:
instance_addr: 127.0.0.1
kvstore:
store: inmemory
schema_config:
configs:
- from: 2020-10-24
store: boltdb-shipper
object_store: filesystem
schema: v11
index:
prefix: index_
period: 24h
ruler:
alertmanager_url: http://localhost:9093
When I try and connect from Grafana to the Loki data source I get this error:
I see this in the Grafana log:
logger=context userId=1 orgId=1 uname=admin t=2022-11-01T21:20:38.419418035Z level=error msg="Failed to call resource" error="Get \"http://localhost:3100/loki/api/v1/labels?start=1667337038277000000&end=1667337638277000000\": dial tcp [::1]:3100: connect: connection refused" traceID=
Why is it refused? My containers are all on the same box.