gamechanger17
gamechanger17

Reputation: 4599

Promtail is not able to send logs to Grafana

Promtail is giving me this error. It was working fine till yesterday.

level=warn ts=2022-03-31T17:57:10.266631785Z caller=client.go:349 component=client host=loki-gateway msg="error sending batch, will retry" status=-1 error="Post \"http://loki-gateway/loki/api/v1/push\": dial tcp: lookup loki-gateway on 10.100.0.10:53: no such host"

Loki logs:

level=info ts=2022-03-31T17:58:05.469740401Z caller=compactor.go:263 msg="compactor is ACTIVE in the ring"
level=info ts=2022-03-31T17:58:05.487108207Z caller=scheduler.go:629 msg="scheduler is ACTIVE in the ring"
level=info ts=2022-03-31T17:58:05.487260134Z caller=module_service.go:64 msg=initialising module=querier
level=info ts=2022-03-31T17:58:05.487330504Z caller=module_service.go:64 msg=initialising module=query-frontend
level=info ts=2022-03-31T17:58:05.48759267Z caller=loki.go:355 msg="Loki started"
level=info ts=2022-03-31T17:58:08.487541256Z caller=worker.go:205 msg="adding connection" addr=172.17.48.142:9095
level=info ts=2022-03-31T17:58:08.487819299Z caller=scheduler.go:663 msg="this scheduler is in the ReplicationSet, will now accept requests."
level=info ts=2022-03-31T17:58:10.470544823Z caller=compactor.go:305 msg="this instance has been chosen to run the compactor, starting compactor"
level=info ts=2022-03-31T17:58:10.470639278Z caller=compactor.go:332 msg="waiting 10m0s for ring to stay stable and previous compactions to finish before starting compactor"
level=info ts=2022-03-31T17:58:15.48798601Z caller=frontend_scheduler_worker.go:100 msg="adding connection to scheduler" addr=172.17.48.142:9095
level=info ts=2022-03-31T17:59:05.346176281Z caller=table_manager.go:171 msg="uploading tables"
level=info ts=2022-03-31T18:00:05.348704439Z caller=table_manager.go:171 msg="uploading tables"
level=info ts=2022-03-31T18:01:05.345773048Z caller=table_manager.go:171 msg="uploading tables"
level=info ts=2022-03-31T18:02:05.345744777Z caller=table_manager.go:171 msg="uploading tables"
level=info ts=2022-03-31T18:03:05.34667879Z caller=table_manager.go:171 msg="uploading tables"
level=info ts=2022-03-31T18:03:05.346699401Z caller=table_manager.go:207 msg="syncing tables"
level=info ts=2022-03-31T18:03:05.355327332Z caller=checkpoint.go:617 msg="starting checkpoint"
level=info ts=2022-03-31T18:03:05.355872498Z caller=checkpoint.go:342 msg="attempting checkpoint for" dir=/data/loki/wal/checkpoint.000000
level=info ts=2022-03-31T18:03:05.358364448Z caller=checkpoint.go:504 msg="atomic checkpoint finished" old=/data/loki/wal/checkpoint.000000.tmp new=/data/loki/wal/checkpoint.000000

Upvotes: 2

Views: 6926

Answers (1)

Serhii Kyslyi
Serhii Kyslyi

Reputation: 1823

If you use promtail helm chart, pay attention to values.yaml configuration.

They have changed the structure:

old (v4.2.1)

config:
  lokiAddress: http://<LOKI_DOMAIN>:3100/loki/api/v1/push

new (v5.0.0+)

config:
  clients:
    - url: http://<LOKI_DOMAIN>:3100/loki/api/v1/push

Upvotes: 6

Related Questions