Skip to content

ubuntu/prometheus not accepting --storage.tsdb.retention.time #109

@lucabello

Description

@lucabello

From https://bugs.launchpad.net/bugs/2100899

With the following docker-compose configuration

services:
  prometheus:
    image: ubuntu/prometheus
    container_name: prometheus
    restart: unless-stopped
    volumes:
      #    - ~/data/prometheus/promo-config:/etc/prometheus
    - ./prometheus-config:/etc/prometheus
    - ./rules.yml:/etc/prometheus/rules.yml
    - ~/data/prometheus/data:/prometheus
    networks:
    - localprom
    ports:
    - 9090:9090
    command:
      - "/bin/prometheus"
      - "--config.file=/etc/prometheus/prometheus.yml"
      - "--storage.tsdb.path=/prometheus"
      - "--storage.tsdb.retention.time=60d"  # Retention period of 60 days
    user: "1000:1000"

the retention value of 60d is never retained, and the prometheus
instance always restarts at 15d

I have tried many things including the wonderful ChaGPT/Gemini and no
avail.

except it state that I should be using the prom/prometheus, and that
this image might not honour the variable (which I doubt)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions