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

Alerta automatically deletes my alerts after 2 hours #37

Open
Jouyn60 opened this issue Feb 3, 2025 · 0 comments
Open

Alerta automatically deletes my alerts after 2 hours #37

Jouyn60 opened this issue Feb 3, 2025 · 0 comments

Comments

@Jouyn60
Copy link

Jouyn60 commented Feb 3, 2025

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.

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