Alerter is the alert component for WWP, lives in Level 2
  • Python 98.9%
  • Dockerfile 1.1%
Find a file
2026-07-03 19:02:35 +00:00
src Adaptación de Alerter para integración a WWP_HMI 2026-07-03 19:02:35 +00:00
.gitignore Adaptación de Alerter para integración a WWP_HMI 2026-07-03 19:02:35 +00:00
Dockerfile Adaptación de Alerter para integración a WWP_HMI 2026-07-03 19:02:35 +00:00
README-ES.md Adaptación de Alerter para integración a WWP_HMI 2026-07-03 19:02:35 +00:00
README.md Adaptación de Alerter para integración a WWP_HMI 2026-07-03 19:02:35 +00:00

Alerter

Alerter is a service that runs at level 2 and depends on valkey_data_wwp.

About Criteria

Alerter actively monitors the state of process values and contrasts them against pre-established thresholds per variable.

For Continuous Variables

Thresholds can be based on instantaneous values and their absolute values.

For Digital Variables

Logical conditions can be defined that trigger an alert if they are not met at any moment, or a delay can be defined for the condition to be met before activating the alert.

Also, if a variable activates or deactivates within a certain period, the alert is triggered.

Users have subscription lists where it is defined which variables should be reported to the user, as well as schedules (shifts).

Environment Variables

Alerter requires the following environment variables to be set:

PostgreSQL Configuration

  • POSTGRES_HOST: PostgreSQL server hostname (default: localhost)
  • POSTGRES_PORT: PostgreSQL server port (default: 5432)
  • POSTGRES_DB: PostgreSQL database name (default: postgres)
  • POSTGRES_USER: PostgreSQL authentication user (default: postgres)
  • POSTGRES_PASSWORD: PostgreSQL authentication password (default: postgres)

Valkey Configuration

  • VALKEY_HOST: Valkey server hostname (default: localhost)
  • VALKEY_PORT: Valkey server port (default: 6379)
  • VALKEY_DATABASE: Valkey database number (default: 0)
  • VALKEY_PASSWORD: Valkey authentication password

SMTP Configuration (Email Notifications)

  • SMTP_HOST: SMTP server hostname
  • SMTP_PORT: SMTP server port (default: 587)
  • SMTP_USERNAME: SMTP authentication username
  • SMTP_PASSWORD: SMTP authentication password

Example .env file

POSTGRES_HOST = localhost
POSTGRES_PORT = 5432
POSTGRES_DB = postgres
POSTGRES_USER = postgres
POSTGRES_PASSWORD = postgres

VALKEY_HOST=localhost
VALKEY_PORT=6379
VALKEY_PASSWORD=your_valkey_password

SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USERNAME=your_email@gmail.com
SMTP_PASSWORD=your_app_password

TODO

  • Alarms should be created from the HMI, where the subscribes and alerts databases live in VarLoader.
  • For uniformity purposes, valkey_reader will be separated into a utilities repository where the most common code will be found, in order to expedite development.
  • Alarms should be stored permanently in a SQL table, where a record exists of when and to whom the alert was sent.
  • Options for absolute moving ranges and relative moving ranges.