Skip to content

Prometheus configuration in tutorial leads to directory mount error #20

Description

@BBITWestin

Issue Description

Following the tutorial instructions for adding Prometheus results in an error where Prometheus attempts to read its configuration file but encounters a directory instead.

Current Behavior

When following the tutorial steps exactly as written, Prometheus fails to start with the following error:

level=ERROR source=main.go:593 msg="Error loading config (--config.file=/etc/prometheus/prometheus.yml)" file=/etc/prometheus/prometheus.yml err="read /etc/prometheus/prometheus.yml: is a directory"

The error keeps repeating and Prometheus exits with code 2.

Current Tutorial Configuration

docker-compose.yml section:

  prometheus:
    image: prom/prometheus
    container_name: prometheus
    command:
      - '--config.file=/etc/prometheus/prometheus.yml'
    ports:
      - 9090:9090
    restart: unless-stopped
    volumes:
      - ./prometheus:/etc/prometheus

Environment

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions