SQLert (sqlert v0.0.2)

View Source

SQLert allows you to create self-contained alert modules that monitor your database by running SQL queries at defined schedule.

Overview

SQLert automatically discovers and runs alerts when your application starts. You can also control alerts at runtime:

SQLert allows you to define alerts that:

  • Run SQL queries at regular intervals
  • Check for specific conditions in your database
  • Trigger notifications when conditions are met

## Core Components

Summary

Functions

Returns a list of all discoverable alerts.

Returns a list of running alerts.

Returns the version of SQLert.

Functions

discoverable_alerts()

@spec discoverable_alerts() :: [module()]

Returns a list of all discoverable alerts.

Every module defined in the scope of the application implementing the SQLert.Alert behaviour, it will be considered discoverable.

Examples

iex> SQLert.discoverable_alerts()
[SQLertTest.DisabledAlert, SQLertTest.EnabledAlert]

running_alerts()

@spec running_alerts() :: [{module(), pid()}]

Returns a list of running alerts.

version()

Returns the version of SQLert.