docker_monitoring_logging_alerting
docker_monitoring_logging_alerting copied to clipboard
Update monitoring/docker-compose.yml
Nodeexporter does not have an access to system network metrics, need to map /proc and make some magic with PID=1
Prometheus container keeps restarting out-of-the box. Error message in logs:
level=error ts=2018-10-05T13:29:04.49903181Z caller=main.go:596 err="Opening storage failed lock DB directory: open /prometheus/lock: permission denied"
Please fix.
I am not sure I understand, there is no lock file in the location you specified: https://github.com/uschtwill/docker_monitoring_logging_alerting/tree/master/storage
Sorry, Prometheus creators have changed user used for Prometheus running (https://prometheus.io/docs/prometheus/2.0/migration/ - section miscelaneous). Possible solutions:
- create ./storage/prometheus directory and chown to 1000 (user nobody) - these steps to be included into setup.sh
- using docker volume for Prometheus tsdb storage
- running Prometheus container as a root
I am pretty sure Prometheus' tsdb is already contained in a volume, no? I am currently not as deeply involved in the specifics, but isn't Prometheus putting the tdsb here?
I guess from the remaining two options I prefer 1.
Would you amend your PR?
make a config folder in the location of your docker-compose.yml. insert the files prometheus.yml and alert_rules.yml in the config folder. This code worked for me on v2.10 prometheus image
prometheus:
image: prom/prometheus
container_name: prometheus
volumes:
- './config:/prometheus'
restart: unless-stopped
ports:
- 9090:9090