Skip to content

Alerts

The alerts log records all threshold breach events across all tuners. Each alert entry captures the tuner, the type of violation, and the start and end time of the event. The log is persistent across reboots.


POST /alerts

Returns alert records with optional filtering, sorting, and pagination.

Roles: user, admin

Request body:

{
  "order": "desc",
  "by": "from",
  "type": ["SNR is low", "RDS synchronization lost"],
  "id": [],
  "limit": 50,
  "offset": 0,
  "from": 1710000000,
  "till": 1710086400
}
Field Type Required Description
order "asc" / "desc" Yes Sort direction
by "tuner_id" / "from" Yes Field to sort by
type array of strings Yes Filter by alert type — empty array returns all types
id array of integers Yes Filter by tuner IDs — empty array returns all tuners
limit integer Yes Maximum number of records to return
offset integer Yes Pagination offset
from integer No Start of time range as Unix timestamp
till integer No End of time range as Unix timestamp

Response:

{
  "total": 142,
  "alerts": [
    {
      "tuner_id": 2,
      "type": "SNR is low",
      "from": "2025-03-14T08:12:00Z",
      "till": "2025-03-14T08:14:33Z"
    }
  ]
}
Field Description
total Total number of records matching the filter (before pagination)
alerts Array of Alert objects for the current page

Alert Types

Type Description
RFL is low RF level below minimum threshold
RFL is high RF level above maximum threshold
SNR is low SNR below minimum threshold
SNR is high SNR above maximum threshold
Multipath is high Multipath interference above maximum threshold
Stereoblend is low Stereo blend below minimum threshold
Stereoblend is high Stereo blend above maximum threshold
AudioL level is low Left channel audio level below minimum threshold
AudioL level is high Left channel audio level above maximum threshold
AudioR level is low Right channel audio level below minimum threshold
AudioR level is high Right channel audio level above maximum threshold
RDS synchronization lost Tuner lost RDS synchronization
RDS buffer overflow RDS receive buffer overflowed
RDS error block A (data lost) Uncorrectable error in RDS block A
RDS error block B (data lost) Uncorrectable error in RDS block B
RDS error block C (data lost) Uncorrectable error in RDS block C
RDS error block D (data lost) Uncorrectable error in RDS block D

POST /alerts/csv

Returns the alert log in CSV format for export and offline analysis.

Roles: user, admin

Request body:

{ "order": "asc" }

Response: text/csv — alert records as a CSV file.

The response includes all alerts without pagination. Use the order field to control chronological direction.


DELETE /alerts

Clears the entire alert log for all tuners.

Roles: user, admin

Warning

This permanently deletes all alert history. There is no confirmation step.


Alert Object

Field Type Description
tuner_id integer Index of the tuner that triggered the alert
type string Alert type — see Alert Types above
from string ISO 8601 datetime when the alert condition began
till string ISO 8601 datetime when the alert condition cleared