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

Update monitoring/docker-compose.yml #44

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

VladimirDe
Copy link
Contributor

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

Nodeexporter does not have an access to system network metrics, need to map /proc and make some magic with PID=1
…ker-compose.yml, updated Prometheus alertmanager rules
@uschtwill
Copy link
Owner

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
Copy link
Owner

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

@VladimirDe
Copy link
Contributor Author

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

@uschtwill
Copy link
Owner

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?

@alokhom
Copy link

alokhom commented May 24, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants