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

Thanos Sidecar doesnt reload prometheus cofigfile #3190

Closed
hedeesaa opened this issue Sep 19, 2020 · 1 comment
Closed

Thanos Sidecar doesnt reload prometheus cofigfile #3190

hedeesaa opened this issue Sep 19, 2020 · 1 comment

Comments

@hedeesaa
Copy link

based on this document I made the docker-compose file like this:

version: "3"

services:
  prometheus:
    container_name: prometheus_test1
    restart: always
    image: prom/prometheus:latest
    user: root
    ports:
      - 9090:9090
    volumes:
      - ./prometheus/prometheus.yaml:/etc/prometheus/prometheus.yml
      - ./prometheus-data:/prometheus
      - /etc/localtime:/etc/localtime:ro
      - /etc/timezone:/etc/timezone:ro
    command:
      - '--config.file=/etc/prometheus/prometheus.yml'
      - '--storage.tsdb.path=/prometheus'
      - '--web.listen-address=:9090'
      - '--web.external-url=http://x.x.x.x:9090'
      - '--web.enable-lifecycle'
      - '--web.enable-admin-api'

  sidecar:
    container_name: sidecar_test1
    restart: always
    image: thanosio/thanos:master-2020-09-16-5be016a3
    user: root
    volumes:
      - ./prometheus/prometheus.yaml:/etc/prometheus/prometheus.yml    
    ports:
      - 19191:19191
      - 19090:19090
    command:
      - 'sidecar'
      - '--http-address=0.0.0.0:19191'
      - '--grpc-address=0.0.0.0:19090'
      - '--reloader.config-file=/etc/prometheus/prometheus.yml'
      - '--prometheus.url=http://x.x.x.x:9090'
      - '--tsdb.path=/prometheus'

but whenever I change anything in prometheus.yml file, nothing happens.
shouldn't sidecar reload the config file for prometheus? I thought this feature would omit the need of reloading prometheus to read new config file.

@hedeesaa
Copy link
Author

The problem was because of file mounting(./prometheus/prometheus.yaml:/etc/prometheus/prometheus.yml), I changed it and mounted the directory and everything worked as a charm:)

reference: moby/moby#15793 (comment)

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

No branches or pull requests

1 participant