Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Promtail - Error - at least one client config should be provided #2194

Closed
darox opened this issue Jun 8, 2020 · 4 comments · Fixed by #2196
Closed

Promtail - Error - at least one client config should be provided #2194

darox opened this issue Jun 8, 2020 · 4 comments · Fixed by #2196

Comments

@darox
Copy link

darox commented Jun 8, 2020

I have just started with promtail and loki with docker. My promtail config is:

server:
   http_listen_port: 9080
   grpc_listen_port: 0

positions:
  filename: /tmp/positions.yaml

clients:
  - url: http://172.19.0.107:3100/loki/api/v1/push

scrape_configs:
- job_name: system
  static_configs:
  - targets:
      - localhost
    labels:
      job: varlogs
      __path__: /var/log/*log

The container fails just after starting with:

level=error ts=2020-06-08T08:20:15.859761174Z caller=main.go:63 msg="error creating promtail" error="at least one client config should be provided"

Promtail docker deploy command:

docker run -d \
-v /var/log:/var/log \
-v /storage/docker/promtail/etc/config.yml:/etc/promtail/config.yml \
--restart=always \
--name=prod-promtail \
--net prod-network --ip 172.19.0.108 \
grafana/promtail:master

I am missing something?

@hjfeng1988
Copy link

I think logs said that can't find correct loki server,Try to use ip address.

@darox
Copy link
Author

darox commented Jun 8, 2020

@hjfeng1988 Still not working. When running promtail not in docker, it works.

@cyriltovena
Copy link
Contributor

cyriltovena commented Jun 8, 2020

It's because the config file by default is empty.

Try this. I leave it open because the error is not good.

docker run -d \
-v /var/log:/var/log \
-v /storage/docker/promtail/etc/config.yml:/etc/promtail/config.yml \
--restart=always \
--name=prod-promtail \
--net prod-network --ip 172.19.0.108 \
grafana/promtail:master -config.file=/etc/promtail/config.yml

cyriltovena added a commit to cyriltovena/loki that referenced this issue Jun 8, 2020
Closes grafana#2194.

This is already the case for Loki. I think it's better to have this since most people would expect it as default at least for docker.

Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
@darox
Copy link
Author

darox commented Jun 9, 2020

-config.file=/etc/promtail/config.yml

Worked, thank you for the quick answer!

cyriltovena added a commit that referenced this issue Jun 22, 2020
Closes #2194.

This is already the case for Loki. I think it's better to have this since most people would expect it as default at least for docker.

Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants