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

cannot set only_counter for status, daemon panics #216

Closed
vthriller opened this issue Oct 20, 2021 · 3 comments · Fixed by #279
Closed

cannot set only_counter for status, daemon panics #216

vthriller opened this issue Oct 20, 2021 · 3 comments · Fixed by #279

Comments

@vthriller
Copy link

Issue type: Bug report

What happened:

panic: inconsistent label cardinality: expected 3 label values but got 2 in []string{"rpc", "POST"}

goroutine 65 [running]:
github.com/prometheus/client_golang/prometheus.(*CounterVec).WithLabelValues(0xc000182078, 0xc000390030, 0x2, 0x3, 0xb63401, 0xc000354060)
        /home/runner/go/pkg/mod/github.com/prometheus/[email protected]/prometheus/counter.go:248 +0xdf
main.processSource(0xc0001b00d8, 0x4, 0x0, 0x0, 0x0, 0xc0001a43b0, 0x0, 0x0, 0xc0001d60c0, 0xc, ...)
        /home/runner/work/prometheus-nginxlog-exporter/prometheus-nginxlog-exporter/main.go:408 +0x6ed
created by main.processNamespace
        /home/runner/work/prometheus-nginxlog-exporter/prometheus-nginxlog-exporter/main.go:353 +0x232

How to reproduce it (as minimally and precisely as possible):

    relabel_configs:
    - target_label: status
      #from: status # panics both with and without this option
      only_counter: true

Environment:

  • Exporter version: 1.9.0
  • OS (e.g. from /etc/os-release): any
@helmich-bot
Copy link
Collaborator

There has not been any activity to this issue in the last 30 days. It will automatically be closed after 7 more days. Remove the stale label to prevent this.

@martin-helmich
Copy link
Owner

Apologies, this should not have gotten stale. I haven't gotten around to investigate this yet, though. In the meantime, all contributions are welcome -- even a PR with a failing behave test case would already be helpful. 🙂

@helmich-bot
Copy link
Collaborator

There has not been any activity to this issue in the last 30 days. It will automatically be closed after 7 more days. Remove the stale label to prevent this.

e1mo added a commit to e1mo/prometheus-nginxlog-exporter that referenced this issue Sep 17, 2022
Deduplicate labels used in `Collection.init()` in the same way as in
`processSource`.
Side-Effect: When overriding `method` one needs to manually add the
split/whitelist config from `DefaultRelabelings` in their own config
file.
Resolve martin-helmich#216
e1mo added a commit to e1mo/prometheus-nginxlog-exporter that referenced this issue Sep 17, 2022
Deduplicate labels used in `Collection.init()` in the same way as in
`processSource`.
Side-Effect: When overriding `method` one needs to manually add the
split/whitelist config from `DefaultRelabelings` in their own config
file.
Resolve martin-helmich#216
e1mo added a commit to e1mo/prometheus-nginxlog-exporter that referenced this issue Sep 17, 2022
Deduplicate labels used in `Collection.init()` in the same way as in
`processSource`.
Side-Effect: When overriding `method` one needs to manually add the
split/whitelist config from `DefaultRelabelings` in their own config
file.
Resolve martin-helmich#216
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants