docker_monitoring_logging_alerting icon indicating copy to clipboard operation
docker_monitoring_logging_alerting copied to clipboard

Update monitoring/docker-compose.yml

Open VladimirDe opened this issue 7 years ago • 5 comments

Nodeexporter does not have an access to system network metrics, need to map /proc and make some magic with PID=1

VladimirDe avatar Sep 03 '18 08:09 VladimirDe

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.

uschtwill avatar Oct 05 '18 13:10 uschtwill

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

uschtwill avatar Oct 09 '18 17:10 uschtwill

Sorry, Prometheus creators have changed user used for Prometheus running (https://prometheus.io/docs/prometheus/2.0/migration/ - section miscelaneous). Possible solutions:

  1. create ./storage/prometheus directory and chown to 1000 (user nobody) - these steps to be included into setup.sh
  2. using docker volume for Prometheus tsdb storage
  3. running Prometheus container as a root

VladimirDe avatar Oct 10 '18 13:10 VladimirDe

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?

uschtwill avatar Oct 13 '18 20:10 uschtwill

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

alokhom avatar May 24 '19 10:05 alokhom