Skip to content

Alerta automatically deletes my alerts after 2 hours #37

@Jouyn60

Description

@Jouyn60

Alerta Issue Report

Issue Summary

Alerta automatically deletes my alerts after 2 hours, without any apparent configuration directing it to do so.


Environment

  • OS: Linux (Red Hat 8)
  • API version: Alerta API 9.0.4
  • Deployment: Docker
  • Database: Postgres
  • Auth enabled? No
  • Web UI version: 8.7.1

To Reproduce

  1. Create or receive alerts in Alerta.
  2. Monitor the alerts for around 2 hours.
  3. Notice that the alerts are completely removed from the system after approximately 2 hours.
  4. No errors appear, but the alerts vanish nonetheless.

Docker-Compose File

services:
  web:
    image: alerta/alerta-web
    ports:
      - 8080:8080
    depends_on:
      - db
    environment:
      DATABASE_URL: "postgres://postgres:postgres@db:5432/monitoring"
      AUTH_REQUIRED: "false"
      ADMIN_USERS: "[email protected],[email protected]"
      ADMIN_PASSWORD: "alerta"
      ADMIN_KEY: "demo-key"
      # -- Alerta Plugins
      PLUGINS: "remote_ip,reject,heartbeat,blackout,normalise,enhance,prometheus"
      # -- Prometheus Plugin
      PROMETHEUS_USE_LABELS: "true"
      ALLOWED_ENVIRONMENTS: "Production,Development,Demo,PreProd,Integration,Unknown"
      DEFAULT_ENVIRONMENT: "Unknown"
      DELETE_EXPIRED_AFTER: 0  # hours
      DELETE_INFO_AFTER: 0     # do not delete informational alerts
      ALERT_TIMEOUT: 0
      SHELVE_TIMEOUT: 0
      DEFAULT_INFORM_SEVERITY: informational
      DEFAULT_EXPIRED_DELETE_HRS: 0   # hours
      DEFAULT_INFO_DELETE_HRS: 0      # hours
    restart: always

  db:
    image: postgres
    volumes:
      - ./pg-data:/var/lib/postgresql/data
    environment:
      POSTGRES_DB: "monitoring"
      POSTGRES_USER: "postgres"
      POSTGRES_PASSWORD: "postgres"
    restart: always

Expected Behavior

I expect the alerts to remain in the system longer than 2 hours (or follow the configured retention period) rather than being automatically deleted without explanation.


Additional Context

I have checked my Alerta configuration and did not find any settings indicating a 2-hour retention or automatic purge.
No errors or warnings appear in the logs around the time the alerts are removed.
This issue persists across different alert sources and severities
.
Please let me know if you need any more information or specific configuration details to diagnose why Alerta is deleting these alerts prematurely.

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