Skip to main content
By configuring a database connection and a SELECT query, Flashduty connects to your database on the schedule you define, incrementally fetches new rows via cursor-based pagination, and converts each row into a Standard Alert Event using field mapping rules. Your system does not need to support push delivery. :::tips DB Pull is the right choice when alert data is already stored in a relational database and you cannot or do not want to modify the existing system to support webhook push. If the database is on a network that Flashduty cannot reach, consider exporting alerts to a publicly accessible HTTP endpoint and using the HTTP Pull integration instead. :::

Setup Steps


In Flashduty

Configuration


Database Driver

Connection

Query Configuration

The total rows ingested per cycle is bounded by max_pages × page_size and is also subject to a system-wide event count ceiling. Set page_size to a batch size your database can handle efficiently (typically 200–500 rows) and tune max_pages based on your alert throughput.

Cursor Configuration

Flashduty uses keyset pagination to fetch new rows incrementally and avoid full-table scans. After each polling cycle, the system persists the cursor position of the last processed row and resumes from there on the next cycle. How pagination works The system wraps your SELECT statement in a subquery and appends keyset conditions, ordering, and a LIMIT on the outer query:
Do not include ORDER BY, LIMIT, or OFFSET in your own query — the system controls these. Automatic checkpoint reset The system computes a fingerprint over the fields that define the ordered row stream: driver, host, port, database, query, time_column, id_column, and initial_time. When any of these fields change, the checkpoint is automatically invalidated and the next fetch restarts from initial_time. Editing field mappings or severity mappings does not trigger a checkpoint reset and will not replay historical rows.

Field Mapping

Field mapping controls which database columns (or constant values) are mapped to which fields of the Standard Alert Event.

Standard Field Mapping (fields)

Each mapping rule specifies a target field (a Standard Event field name) and a rule. Three rule types are supported: When the target field is event_time, the system automatically converts the column value to a Unix timestamp in seconds. Supported input formats include time.Time, Unix milliseconds (integer), "2006-01-02T15:04:05", "2006-01-02 15:04:05", and other common datetime representations.

Label Mapping (labels)

Label mapping controls how database columns are converted into the labels dictionary of the alert event. Four modes are supported:

Severity Mapping

External systems use inconsistent field names and values for alert severity. Severity Mapping translates the external value into Flashduty’s standard Critical / Warning / Info / Ok.
  • Flashduty reads the event_status field produced by field mapping and looks it up in the severity mapping table.
  • Fallback when no match: if event_status does not match any key in the table, the severity defaults to Warning.
Example configuration:

Default Route


When creating a “Shared Integration” (under Integration Center => Alert Events), you must configure a default route — otherwise newly pulled events will be dropped. After creation, you can add finer-grained rules under Route. A “Dedicated Integration” (created under the Integrations tab of a specific channel) is automatically bound to that channel and does not require a separate default route.

Notes


  • Database account permissions: Create a dedicated read-only account for DB Pull with only SELECT privilege on the target table. Do not grant write access.
  • Network reachability: The Flashduty service must be able to reach host:port over the public internet or a dedicated line. Private subnets (10.x.x.x, 192.168.x.x, 172.16–31.x.x) and loopback addresses are rejected by the system.
  • Index on cursor columns: For performance, create a composite index on (time_column, id_column) to support efficient keyset pagination queries.
  • Time column precision: The system records cursor timestamps with microsecond precision (2006-01-02 15:04:05.999999). Use at least millisecond precision for your time column (DATETIME(3) or TIMESTAMP(6)) to avoid missing rows when many rows arrive within the same second.
  • Query idempotency: After a checkpoint reset, the same rows may be fetched again. Ensure your field mapping includes a column that uniquely identifies each alert (mapped to alert_key) so that Flashduty can correctly deduplicate events.