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

Error when starting local build with example configuration #3414

Closed
davkal opened this Issue Nov 5, 2017 · 2 comments

Comments

Projects
None yet
1 participant
@davkal
Copy link
Contributor

davkal commented Nov 5, 2017

What did you do?

git pull
make build
./prometheus --config.file=documentation/examples/prometheus.yml 

What did you expect to see?

Prometheus happily running in the foreground.

What did you see instead? Under which circumstances?

Prometheus stopped on with an error, see logs below.

Environment

  • System information:

    Darwin 16.7.0 x86_64

  • Prometheus version:

    prometheus, version 2.0.0-rc.3 (branch: master, revision: 8a9b32d)
    build user: david@kenobi-2.local
    build date: 20171105-16:27:20
    go version: go1.9.1

  • Alertmanager version:

    insert output of alertmanager --version here (if relevant to the issue)

  • Prometheus configuration file:

https://github.com/prometheus/prometheus/blob/3382f39046513d93742c02f39d9122f511d575ab/documentation/examples/prometheus.yml

  • Alertmanager configuration file:
insert configuration here (if relevant to the issue)
  • Logs:
level=error ts=2017-11-05T18:41:40.298082844Z caller=main.go:356 msg="Error loading config" err="couldn't load configuration (--config.file=documentation/examples/prometheus.yml): unknown fields in alertmanager config: static_config"
@davkal

This comment has been minimized.

Copy link
Contributor Author

davkal commented Nov 5, 2017

Proposal for fix: disable sections until config parser is updated.

diff --git a/documentation/examples/prometheus.yml b/documentation/examples/prometheus.yml
index 3f04f541..4967a8d8 100644
--- a/documentation/examples/prometheus.yml
+++ b/documentation/examples/prometheus.yml
@@ -12,8 +12,8 @@ global:
 # Alertmanager configuration
 alerting:
   alertmanagers:
-  - static_config:
-    - targets:
+  # - static_config:
+    # - targets:
       # - alertmanager:9093
 
 # Load rules once and periodically evaluate them according to the global 'evaluation_interval'.

davkal added a commit to davkal/prometheus that referenced this issue Nov 6, 2017

Fix typo in AM config field static_configs
* typo in prometheus.yml field causes prometheus to throw an error

Fixes prometheus#3414

@juliusv juliusv closed this in #3415 Nov 6, 2017

juliusv added a commit that referenced this issue Nov 6, 2017

Fix typo in AM config field static_configs (#3415)
* typo in prometheus.yml field causes prometheus to throw an error

Fixes #3414
@lock

This comment has been minimized.

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.
You can’t perform that action at this time.