Alerter is the alert component for WWP, lives in Level 2
  • Python 98.2%
  • Dockerfile 1.8%
Find a file
Fabian Quiñones Escárzaga 547632f298
Initial commit
2026-06-07 18:24:59 -06:00
src Initial commit 2026-06-07 18:24:59 -06:00
.gitignore Initial commit 2026-06-07 18:24:59 -06:00
compose.yaml Initial commit 2026-06-07 18:24:59 -06:00
Dockerfile Initial commit 2026-06-07 18:24:59 -06:00
README-ES.md Initial commit 2026-06-07 18:24:59 -06:00
README.md Initial commit 2026-06-07 18:24:59 -06: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:

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

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.