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
Hi,
If I launch prometheus without --web.enable-lifecycle, it works as expected:
astronaute@instance-2 ~ $ docker run -p 9090:9090 -v /home/astronaute/prometheus.yml:/etc/prometheus/prometheus.yml prom/prometheus level=info ts=2019-09-04T19:10:03.545Z caller=main.go:293 msg="no time or size retention was set so using the default time retention" duration=15d level=info ts=2019-09-04T19:10:03.546Z caller=main.go:329 msg="Starting Prometheus" version="(version=2.11.1, branch=HEAD, revision=e5b22494857deca4b806f74f6e3a6ee30c251763)" level=info ts=2019-09-04T19:10:03.547Z caller=main.go:330 build_context="(go=go1.12.7, user=root@d94406f2bb6f, date=20190710-13:51:17)" level=info ts=2019-09-04T19:10:03.547Z caller=main.go:331 host_details="(Linux 4.14.111+ #1 SMP Wed Jul 10 23:21:58 PDT 2019 x86_64 4bd463d34ca6 (none))" level=info ts=2019-09-04T19:10:03.547Z caller=main.go:332 fd_limits="(soft=1048576, hard=1048576)" level=info ts=2019-09-04T19:10:03.547Z caller=main.go:333 vm_limits="(soft=unlimited, hard=unlimited)" level=info ts=2019-09-04T19:10:03.551Z caller=main.go:652 msg="Starting TSDB ..." level=info ts=2019-09-04T19:10:03.565Z caller=main.go:667 fs_type=EXT4_SUPER_MAGIC level=info ts=2019-09-04T19:10:03.566Z caller=main.go:668 msg="TSDB started" level=info ts=2019-09-04T19:10:03.566Z caller=main.go:738 msg="Loading configuration file" filename=/etc/prometheus/prometheus.yml level=info ts=2019-09-04T19:10:03.603Z caller=web.go:448 component=web msg="Start listening for connections" address=0.0.0.0:9090 level=info ts=2019-09-04T19:10:03.759Z caller=main.go:766 msg="Completed loading of configuration file" filename=/etc/prometheus/prometheus.yml level=info ts=2019-09-04T19:10:03.760Z caller=main.go:621 msg="Server is ready to receive web requests."
but with it, it looks for configuration in wrong location for some reason: astronaute@instance-2 ~ $ docker run -p 9090:9090 -v /home/astronaute/prometheus.yml:/etc/prometheus/prometheus.yml prom/prometheus --web.enable-lifecycle level=info ts=2019-09-04T19:09:25.158Z caller=main.go:293 msg="no time or size retention was set so using the default time retention" duration=15d level=info ts=2019-09-04T19:09:25.159Z caller=main.go:329 msg="Starting Prometheus" version="(version=2.11.1, branch=HEAD, revision=e5b22494857deca4b806f74f6e3a6ee30c251763)" level=info ts=2019-09-04T19:09:25.159Z caller=main.go:330 build_context="(go=go1.12.7, user=root@d94406f2bb6f, date=20190710-13:51:17)" level=info ts=2019-09-04T19:09:25.159Z caller=main.go:331 host_details="(Linux 4.14.111+ #1 SMP Wed Jul 10 23:21:58 PDT 2019 x86_64 4f1450ce295a (none))" level=info ts=2019-09-04T19:09:25.159Z caller=main.go:332 fd_limits="(soft=1048576, hard=1048576)" level=info ts=2019-09-04T19:09:25.160Z caller=main.go:333 vm_limits="(soft=unlimited, hard=unlimited)" level=info ts=2019-09-04T19:09:25.165Z caller=main.go:652 msg="Starting TSDB ..." level=info ts=2019-09-04T19:09:25.168Z caller=web.go:448 component=web msg="Start listening for connections" address=0.0.0.0:9090 level=info ts=2019-09-04T19:09:25.196Z caller=main.go:667 fs_type=EXT4_SUPER_MAGIC level=info ts=2019-09-04T19:09:25.196Z caller=main.go:668 msg="TSDB started" level=info ts=2019-09-04T19:09:25.197Z caller=main.go:738 msg="Loading configuration file" filename=prometheus.yml level=info ts=2019-09-04T19:09:25.198Z caller=main.go:521 msg="Stopping scrape discovery manager..." level=info ts=2019-09-04T19:09:25.198Z caller=main.go:535 msg="Stopping notify discovery manager..." level=info ts=2019-09-04T19:09:25.198Z caller=main.go:557 msg="Stopping scrape manager..." level=info ts=2019-09-04T19:09:25.199Z caller=main.go:531 msg="Notify discovery manager stopped" level=info ts=2019-09-04T19:09:25.199Z caller=main.go:517 msg="Scrape discovery manager stopped" level=info ts=2019-09-04T19:09:25.199Z caller=manager.go:776 component="rule manager" msg="Stopping rule manager..." level=info ts=2019-09-04T19:09:25.199Z caller=manager.go:782 component="rule manager" msg="Rule manager stopped" level=info ts=2019-09-04T19:09:25.202Z caller=notifier.go:602 component=notifier msg="Stopping notification manager..." level=info ts=2019-09-04T19:09:25.205Z caller=main.go:722 msg="Notifier manager stopped" level=info ts=2019-09-04T19:09:25.205Z caller=main.go:551 msg="Scrape manager stopped" level=error ts=2019-09-04T19:09:25.206Z caller=main.go:731 err="error loading config from \"prometheus.yml\": couldn't load configuration (--config.file=\"prometheus.yml\"): open prometheus.yml: no such file or directory"
astronaute@instance-2 ~ $ docker run -p 9090:9090 -v /home/astronaute/prometheus.yml:/etc/prometheus/prometheus.yml prom/prometheus --web.enable-lifecycle level=info ts=2019-09-04T19:09:25.158Z caller=main.go:293 msg="no time or size retention was set so using the default time retention" duration=15d level=info ts=2019-09-04T19:09:25.159Z caller=main.go:329 msg="Starting Prometheus" version="(version=2.11.1, branch=HEAD, revision=e5b22494857deca4b806f74f6e3a6ee30c251763)" level=info ts=2019-09-04T19:09:25.159Z caller=main.go:330 build_context="(go=go1.12.7, user=root@d94406f2bb6f, date=20190710-13:51:17)" level=info ts=2019-09-04T19:09:25.159Z caller=main.go:331 host_details="(Linux 4.14.111+ #1 SMP Wed Jul 10 23:21:58 PDT 2019 x86_64 4f1450ce295a (none))" level=info ts=2019-09-04T19:09:25.159Z caller=main.go:332 fd_limits="(soft=1048576, hard=1048576)" level=info ts=2019-09-04T19:09:25.160Z caller=main.go:333 vm_limits="(soft=unlimited, hard=unlimited)" level=info ts=2019-09-04T19:09:25.165Z caller=main.go:652 msg="Starting TSDB ..." level=info ts=2019-09-04T19:09:25.168Z caller=web.go:448 component=web msg="Start listening for connections" address=0.0.0.0:9090 level=info ts=2019-09-04T19:09:25.196Z caller=main.go:667 fs_type=EXT4_SUPER_MAGIC level=info ts=2019-09-04T19:09:25.196Z caller=main.go:668 msg="TSDB started" level=info ts=2019-09-04T19:09:25.197Z caller=main.go:738 msg="Loading configuration file" filename=prometheus.yml level=info ts=2019-09-04T19:09:25.198Z caller=main.go:521 msg="Stopping scrape discovery manager..." level=info ts=2019-09-04T19:09:25.198Z caller=main.go:535 msg="Stopping notify discovery manager..." level=info ts=2019-09-04T19:09:25.198Z caller=main.go:557 msg="Stopping scrape manager..." level=info ts=2019-09-04T19:09:25.199Z caller=main.go:531 msg="Notify discovery manager stopped" level=info ts=2019-09-04T19:09:25.199Z caller=main.go:517 msg="Scrape discovery manager stopped" level=info ts=2019-09-04T19:09:25.199Z caller=manager.go:776 component="rule manager" msg="Stopping rule manager..." level=info ts=2019-09-04T19:09:25.199Z caller=manager.go:782 component="rule manager" msg="Rule manager stopped" level=info ts=2019-09-04T19:09:25.202Z caller=notifier.go:602 component=notifier msg="Stopping notification manager..." level=info ts=2019-09-04T19:09:25.205Z caller=main.go:722 msg="Notifier manager stopped" level=info ts=2019-09-04T19:09:25.205Z caller=main.go:551 msg="Scrape manager stopped" level=error ts=2019-09-04T19:09:25.206Z caller=main.go:731 err="error loading config from \"prometheus.yml\": couldn't load configuration (--config.file=\"prometheus.yml\"): open prometheus.yml: no such file or directory"
Am I doing something wrong?
The text was updated successfully, but these errors were encountered:
You need to pass all the other command flags too:
docker run -p 9090:9090 -v /home/astronaute/prometheus.yml:/etc/prometheus/prometheus.yml prom/prometheus \ --web.enable-lifecycle \ --config.file=/etc/prometheus/prometheus.yml \ --storage.tsdb.path=/prometheus \ --web.console.libraries=/usr/share/prometheus/console_libraries --web.console.templates=/usr/share/prometheus/consoles
I'm closing it for now. If you have further questions, please use our user mailing list, which you can also search.
Sorry, something went wrong.
No branches or pull requests
astronaute77 commentedSep 4, 2019
•
edited
Hi,
If I launch prometheus without --web.enable-lifecycle, it works as expected:
astronaute@instance-2 ~ $ docker run -p 9090:9090 -v /home/astronaute/prometheus.yml:/etc/prometheus/prometheus.yml prom/prometheus level=info ts=2019-09-04T19:10:03.545Z caller=main.go:293 msg="no time or size retention was set so using the default time retention" duration=15d level=info ts=2019-09-04T19:10:03.546Z caller=main.go:329 msg="Starting Prometheus" version="(version=2.11.1, branch=HEAD, revision=e5b22494857deca4b806f74f6e3a6ee30c251763)" level=info ts=2019-09-04T19:10:03.547Z caller=main.go:330 build_context="(go=go1.12.7, user=root@d94406f2bb6f, date=20190710-13:51:17)" level=info ts=2019-09-04T19:10:03.547Z caller=main.go:331 host_details="(Linux 4.14.111+ #1 SMP Wed Jul 10 23:21:58 PDT 2019 x86_64 4bd463d34ca6 (none))" level=info ts=2019-09-04T19:10:03.547Z caller=main.go:332 fd_limits="(soft=1048576, hard=1048576)" level=info ts=2019-09-04T19:10:03.547Z caller=main.go:333 vm_limits="(soft=unlimited, hard=unlimited)" level=info ts=2019-09-04T19:10:03.551Z caller=main.go:652 msg="Starting TSDB ..." level=info ts=2019-09-04T19:10:03.565Z caller=main.go:667 fs_type=EXT4_SUPER_MAGIC level=info ts=2019-09-04T19:10:03.566Z caller=main.go:668 msg="TSDB started" level=info ts=2019-09-04T19:10:03.566Z caller=main.go:738 msg="Loading configuration file" filename=/etc/prometheus/prometheus.yml level=info ts=2019-09-04T19:10:03.603Z caller=web.go:448 component=web msg="Start listening for connections" address=0.0.0.0:9090 level=info ts=2019-09-04T19:10:03.759Z caller=main.go:766 msg="Completed loading of configuration file" filename=/etc/prometheus/prometheus.yml level=info ts=2019-09-04T19:10:03.760Z caller=main.go:621 msg="Server is ready to receive web requests."but with it, it looks for configuration in wrong location for some reason:
astronaute@instance-2 ~ $ docker run -p 9090:9090 -v /home/astronaute/prometheus.yml:/etc/prometheus/prometheus.yml prom/prometheus --web.enable-lifecycle level=info ts=2019-09-04T19:09:25.158Z caller=main.go:293 msg="no time or size retention was set so using the default time retention" duration=15d level=info ts=2019-09-04T19:09:25.159Z caller=main.go:329 msg="Starting Prometheus" version="(version=2.11.1, branch=HEAD, revision=e5b22494857deca4b806f74f6e3a6ee30c251763)" level=info ts=2019-09-04T19:09:25.159Z caller=main.go:330 build_context="(go=go1.12.7, user=root@d94406f2bb6f, date=20190710-13:51:17)" level=info ts=2019-09-04T19:09:25.159Z caller=main.go:331 host_details="(Linux 4.14.111+ #1 SMP Wed Jul 10 23:21:58 PDT 2019 x86_64 4f1450ce295a (none))" level=info ts=2019-09-04T19:09:25.159Z caller=main.go:332 fd_limits="(soft=1048576, hard=1048576)" level=info ts=2019-09-04T19:09:25.160Z caller=main.go:333 vm_limits="(soft=unlimited, hard=unlimited)" level=info ts=2019-09-04T19:09:25.165Z caller=main.go:652 msg="Starting TSDB ..." level=info ts=2019-09-04T19:09:25.168Z caller=web.go:448 component=web msg="Start listening for connections" address=0.0.0.0:9090 level=info ts=2019-09-04T19:09:25.196Z caller=main.go:667 fs_type=EXT4_SUPER_MAGIC level=info ts=2019-09-04T19:09:25.196Z caller=main.go:668 msg="TSDB started" level=info ts=2019-09-04T19:09:25.197Z caller=main.go:738 msg="Loading configuration file" filename=prometheus.yml level=info ts=2019-09-04T19:09:25.198Z caller=main.go:521 msg="Stopping scrape discovery manager..." level=info ts=2019-09-04T19:09:25.198Z caller=main.go:535 msg="Stopping notify discovery manager..." level=info ts=2019-09-04T19:09:25.198Z caller=main.go:557 msg="Stopping scrape manager..." level=info ts=2019-09-04T19:09:25.199Z caller=main.go:531 msg="Notify discovery manager stopped" level=info ts=2019-09-04T19:09:25.199Z caller=main.go:517 msg="Scrape discovery manager stopped" level=info ts=2019-09-04T19:09:25.199Z caller=manager.go:776 component="rule manager" msg="Stopping rule manager..." level=info ts=2019-09-04T19:09:25.199Z caller=manager.go:782 component="rule manager" msg="Rule manager stopped" level=info ts=2019-09-04T19:09:25.202Z caller=notifier.go:602 component=notifier msg="Stopping notification manager..." level=info ts=2019-09-04T19:09:25.205Z caller=main.go:722 msg="Notifier manager stopped" level=info ts=2019-09-04T19:09:25.205Z caller=main.go:551 msg="Scrape manager stopped" level=error ts=2019-09-04T19:09:25.206Z caller=main.go:731 err="error loading config from \"prometheus.yml\": couldn't load configuration (--config.file=\"prometheus.yml\"): open prometheus.yml: no such file or directory"Am I doing something wrong?
The text was updated successfully, but these errors were encountered: