electrs
electrs copied to clipboard
Bug: doc/monitoring.md does not work on Ubuntu 20.04
Describe the bug
A clear and concise description of what the bug is.
If one follows the commands mentioned in monitoring.md
, it results in an invalid prometheus.yml
file. As the field scrape configs
is already set in it.
Electrs version Version: 0.9.5
To Reproduce Steps to reproduce the behavior:
- Enter the commands in
monitoring.md
. It will install prometheus as well. Don't install it separately. - Check status of prometheus using:
sudo systemctl status prometheus
- It fails to start, due to the invalid config file located at:
/etc/prometheus/prometheus.yml
Expected behavior
A clear and concise description of what you expected to happen.
Prometheus was expected to start and listen to metrics from electrs
from port 4224
System running electrs
- Deployment method: Manual. Doesn't matter as
monitoring.md
is a simple script - OS name and version: Ubuntu 20.04
Additional context Here are the last lines of the error log of prometheus after running the commands:
level=info ts=2022-02-24T11:02:10.428Z caller=main.go:545 msg="Scrape manager stopped"
level=error ts=2022-02-24T11:02:10.428Z caller=main.go:725 err="error loading config from \"/etc/prometheus/prometheus.yml\": couldn't load configuration (--config.file=\"/etc/prometheus/prometheus.yml\"): parsing YAML file /etc/prometheus/prometheus.yml: yaml: unmarshal errors:\n line 46: field scrape_configs already set in type config.plain"
The full log can be found here: https://pastebin.com/JdEVLzsa
We can add an additional comment asking to remove or comment the scrape config
field, in case it's already present.
I'm not sure how hard we should try making the example perfect. It'd eventually become an electrs-prometheus installer. Maybe suitable for packaging.