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

The configuration values in Dockerfile should be the same as the default values #4029

Closed
chihkaiyu opened this Issue Mar 30, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@chihkaiyu
Copy link

chihkaiyu commented Mar 30, 2018

This is not a bug.
When I run the Prometheus in docker, it's good and everything works properly.
Then I try to alter some configurations like TSDB data path, retention period, it says it can't load my configuration files (prometheus.yml).
After tracing the code a little bit, I know this is not a bug.
But I think it's much more intuitive if the configuration values in Dockerfile could be the same as default values.

What did you do?
I run a docker container via:
docker run -d --name prometheus -p 9090:9090 prom/prometheus:v2.1.0 --storage.tsdb.retention=90d

What did you expect to see?
I expect that the Prometheus should load the configuration file from /etc/prometheus/prometheus.yml

What did you see instead? Under which circumstances?
err="Error loading config couldn't load configuration (--config.file=prometheus.yml): open prometheus.yml: no such file or directory"

Environment
Docker version: 17.09.0-ce
Distributor ID: Ubuntu
Description: Ubuntu 16.04.3 LTS
Release: 16.04
Codename: xenial

  • System information:
    Linux 4.10.0-40-generic x86_64

  • Prometheus version:
    v2.1.0

  • Logs:

level=info ts=2018-03-30T02:07:54.697323439Z caller=main.go:225 msg="Starting Prometheus" version="(version=2.1.0, branch=HEAD, revision=85f23d82a045d103ea7f3c89a91fba4a93e6367a)"
level=info ts=2018-03-30T02:07:54.697350761Z caller=main.go:226 build_context="(go=go1.9.2, user=root@6e784304d3ff, date=20180119-12:01:23)"
level=info ts=2018-03-30T02:07:54.697361073Z caller=main.go:227 host_details="(Linux 4.10.0-40-generic #44~16.04.1-Ubuntu SMP Thu Nov 9 15:37:44 UTC 2017 x86_64 211662f71a04 (none))"
level=info ts=2018-03-30T02:07:54.697369249Z caller=main.go:228 fd_limits="(soft=1048576, hard=1048576)"
level=info ts=2018-03-30T02:07:54.698844139Z caller=main.go:499 msg="Starting TSDB ..."
level=info ts=2018-03-30T02:07:54.698855713Z caller=web.go:383 component=web msg="Start listening for connections" address=0.0.0.0:9090
level=info ts=2018-03-30T02:07:54.702465846Z caller=main.go:509 msg="TSDB started"
level=info ts=2018-03-30T02:07:54.70249326Z caller=main.go:585 msg="Loading configuration file" filename=prometheus.yml
level=info ts=2018-03-30T02:07:54.702522151Z caller=main.go:386 msg="Stopping scrape discovery manager..."
level=info ts=2018-03-30T02:07:54.702531541Z caller=main.go:400 msg="Stopping notify discovery manager..."
level=info ts=2018-03-30T02:07:54.702538729Z caller=main.go:424 msg="Stopping scrape manager..."
level=info ts=2018-03-30T02:07:54.702578957Z caller=main.go:382 msg="Scrape discovery manager stopped"
level=info ts=2018-03-30T02:07:54.702601063Z caller=manager.go:460 component="rule manager" msg="Stopping rule manager..."
level=info ts=2018-03-30T02:07:54.702594457Z caller=manager.go:59 component="scrape manager" msg="Starting scrape manager..."
level=info ts=2018-03-30T02:07:54.702584062Z caller=main.go:396 msg="Notify discovery manager stopped"
level=info ts=2018-03-30T02:07:54.702616317Z caller=manager.go:466 component="rule manager" msg="Rule manager stopped"
level=info ts=2018-03-30T02:07:54.702619926Z caller=main.go:418 msg="Scrape manager stopped"
level=info ts=2018-03-30T02:07:54.702623801Z caller=notifier.go:493 component=notifier msg="Stopping notification manager..."
level=info ts=2018-03-30T02:07:54.702631386Z caller=main.go:570 msg="Notifier manager stopped"
level=error ts=2018-03-30T02:07:54.702648309Z caller=main.go:579 err="Error loading config couldn't load configuration (--config.file=prometheus.yml): open prometheus.yml: no such file or directory"
@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Mar 30, 2018

This is a Docker usage question, we can't help you with that.

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 22, 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 22, 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.