8000 Prometheus config rendered from struct no longer parses · Issue #2899 · prometheus/prometheus · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Prometheus config rendered from struct no longer parses #2899

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

Closed
tcolgate opened this issue Jul 4, 2017 · 1 comment
Closed

Prometheus config rendered from struct no longer parses #2899

tcolgate opened this issue Jul 4, 2017 · 1 comment
Labels

Comments

@tcolgate
Copy link
Contributor
tcolgate commented Jul 4, 2017

5c89cec breaks configs rendered from the internal config struct (yeah, I know it's nasty, but we build prom configs automatically and we vendor prom to support it).

The above change beaks because the config renders as

...
relabel_rules:
  - action: labeldrop
    source_labels: []
...

either source_labels should include "omitempty", or the above sourcelabel check should be updated to something which parses with nil vs empty slice (e.g. len())

What did you do?

Attempted to run prometheus master with a configuration from our config management tool.

What did you expect to see?

Prometheus accept the configuration and start.

What did you see instead? Under which circumstances?

prometheus fails with ```time="2017-07-04T12:10:18Z" level=error msg="Error loading config: couldn't load configuration (-config.file=/etc/prometheus/config.yaml): labeldrop action requires only 'regex', and no other fields" source="main.go:160"


**Environment**

Linux 

* System information:

	Linux 4.7.0-0.bpo.1-amd64 x86_64

* Prometheus version: 

	image from quay.io master


gouthamve pushed a commit to gouthamve/prometheus that referenced this issue Jul 5, 2017
Fixes prometheus#2899

Signed-off-by: Goutham Veeramachaneni <goutham@boomerangcommerce.com>
@lock
Copy link
lock bot commented Mar 23, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants
0