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 on reload when using "metrics" stage #3408

Closed
darxriggs opened this issue Apr 2, 2023 · 3 comments
Closed

Promtail: Error on reload when using "metrics" stage #3408

darxriggs opened this issue Apr 2, 2023 · 3 comments
Labels
bug Something isn't working frozen-due-to-age Locked due to a period of inactivity. Please open new issues or PRs if more discussion is needed.

Comments

@darxriggs
Copy link
Contributor

darxriggs commented Apr 2, 2023

When using a metrics stage and trying to reload the Grafana Agent configuration, it logs the following error:

ts=2023-04-02T10:06:40.238329045Z caller=entrypoint.go:167 level=error msg="failed to update loki" err="failed to unregister all metrics from previous promtail. THIS IS A BUG"

How to reproduce
Scrape from files and configure a metrics stage (like the "counter" example in the documentation):

logs:
  positions_directory: /tmp/positions
  configs:
    - name: metrics example
      clients:
        - url: <FILL IN>
      scrape_configs:
        - job_name: log files
          static_configs:
            - labels:
                __path__: /var/log/*.log
          pipeline_stages:
            - metrics:
               log_lines_total:
                 type: Counter
                 description: "total number of log lines"
                 prefix: my_promtail_custom_
                 max_idle_duration: 24h
                 config:
                   match_all: true
                   action: inc

Send the process a SIGHUP signal.

Environment

  • Grafana Agent v0.32.1
@darxriggs
Copy link
Contributor Author

@tpaschalis A quick check shows that util.Unregisterer.Unregister() returns false for a metric.metricVec.

@rfratto rfratto added bug Something isn't working type/signals labels Apr 4, 2023
@darxriggs
Copy link
Contributor Author

This seems to describe the same issue as in #2754.

@mattdurham
Copy link
Collaborator

Closing as duplicate of #2754

@github-project-automation github-project-automation bot moved this from Todo to Done in Grafana Agent (Public) Jul 25, 2023
@github-actions github-actions bot added the frozen-due-to-age Locked due to a period of inactivity. Please open new issues or PRs if more discussion is needed. label Feb 21, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working frozen-due-to-age Locked due to a period of inactivity. Please open new issues or PRs if more discussion is needed.
Projects
No open projects
Development

No branches or pull requests

3 participants