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

2.7.0 container can't find default paths #5157

Closed
cemsbr opened this Issue Jan 30, 2019 · 3 comments

Comments

Projects
None yet
2 participants
@cemsbr
Copy link

cemsbr commented Jan 30, 2019

Bug Report

What did you do?
Upgraded to docker image 2.7.0 from 2.6.1

What did you expect to see?

  • Container up
  • Preserved collected data

What did you see instead? Under which circumstances?

  • Container exited complaining about not finding prometheus.yml (it remained in the same location). Workaround: add the default option --config.file=/etc/prometheus/prometheus.yml to command in docker-compose.yml
  • After applying the workaround above, no data was displayed in grafana (maybe the workaround is analogous: specifying the default option in command).

Reverting to v2.6.1 worked.

Environment
Ubuntu 18.04, docker-compose version 1.23.2, Docker version 18.06.1-ce.

  • System information:

    Linux 4.15.0-1029-aws x86_64

  • Prometheus version:

    2.7.0, from docker hub

  • Alertmanager version:

    alertmanager, version 0.16.0

  • Prometheus configuration file:

# my global config
global:
  scrape_interval:     15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
  evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
  # scrape_timeout is set to the global default (10s).

# Alertmanager configuration
alerting:
  alertmanagers:
  - static_configs:
    - targets:
      - alertmanager:9093

# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
rule_files:
- "alert_rules.yml"
  # - "second_rules.yml"

# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
  # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
- job_name: 'prometheus'

  # metrics_path defaults to '/metrics'
  # scheme defaults to 'http'.

  static_configs:
  - targets:
    - 'prometheus:9090'
  relabel_configs:
  - source_labels: [__address__]
    target_label: instance
    regex: ([^\.]+).*:\d+

- job_name: ...
  • Logs:
    It was complaining about not finding prometheus.yml

  • Docker compose:

  prometheus:
    ports:
      # Access via tunnel (no user/pass via web)
      - 9090:9090
    image: prom/prometheus:v2.6.1
    command:
      - '--storage.tsdb.retention=60d'
    volumes:
      - ./config/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro
      - ./config/prometheus/alert_rules.yml:/etc/prometheus/alert_rules.yml:ro
      - prometheus-storage:/prometheus
@simonpasquier

This comment has been minimized.

Copy link
Member

simonpasquier commented Jan 31, 2019

As noted in the v2.7.0 changelog, Dockerfile has been reverted to its v2.5.0 version because the changes broke too many users (see ##5043). You probably have to specify both --config.file=/etc/prometheus/prometheus.yml and --storage.tsdb.path=/prometheus.

@cemsbr

This comment has been minimized.

Copy link
Author

cemsbr commented Jan 31, 2019

These settings are included in prometheus Dockerfile in the release-2.7.0 branch. Shouldn't it just work?

@cemsbr

This comment has been minimized.

Copy link
Author

cemsbr commented Jan 31, 2019

Probably my commands config overrode the CMD in Dockerfile, as stated in https://docs.docker.com/compose/compose-file/#command.

@cemsbr cemsbr closed this Jan 31, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.