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 configuration failed parsing with unmarshal errors. #3052

Closed
viktorisacenko opened this issue Dec 7, 2020 · 2 comments
Closed

Promtail configuration failed parsing with unmarshal errors. #3052

viktorisacenko opened this issue Dec 7, 2020 · 2 comments
Labels
stale A stale issue or PR that will automatically be closed.

Comments

@viktorisacenko
Copy link

viktorisacenko commented Dec 7, 2020

Describe the bug
Get unmarshall errors when i try to start promtail with config file.

To Reproduce
Steps to reproduce the behavior:

  1. cd /usr/local/bin
  2. sudo curl -fSL -o promtail.gz "https://github.com/grafana/loki/releases/download/v2.0.0/promtail-linux-amd64.zip"
  3. sudo gunzip promtail.gz
  4. sudo chmod a+x promtail
  5. sudo nano config-promtail.yml

->

server:
  http_listen_port: 9080
  grpc_listen_port: 0

positions:
  filename: /tmp/positions.yaml

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

scrape_configs:
  - job_name: journal
    journal:
      max_age: 12h
      labels:
        job: systemd-journal
    relabel_configs:
      - source_labels: ['__journal__systemd_unit']
        target_label: 'unit'
  1. sudo ./promtail -config.file ./config-promtail.yml

->

failed parsing config: ./config-promtail.yml: yaml: unmarshal errors:
  line 5: field positions not found in type main.Config
  line 8: field clients not found in type main.Config
  line 11: field scrape_configs not found in type main.Config

Environment:

  • Ubuntu 18.04.5 LTS
@stale
Copy link

stale bot commented Jan 9, 2021

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.

@stale stale bot added the stale A stale issue or PR that will automatically be closed. label Jan 9, 2021
@stale stale bot closed this as completed Jan 17, 2021
cyriltovena pushed a commit to cyriltovena/loki that referenced this issue Jun 11, 2021
My machine was upgraded to go1.15 and tests were failing with
"conversion from int to string yields a string of one rune, not a string
of digits (did you mean fmt.Sprint(x)?)"

Signed-off-by: Goutham Veeramachaneni <[email protected]>
@SimingLiu
Copy link

maybe you‘v use the ./loki -config.file ./config-promtail.yml instead of ./promtail -config.file ./config-promtail.yml, in some mistake

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale A stale issue or PR that will automatically be closed.
Projects
None yet
Development

No branches or pull requests

2 participants