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, and converts each row into a Standard Alert Event using field mapping rules. Your system does not need to support push delivery.
Pull integrations run only on the Pro plan; on other plans no pull runs, including manual triggers.
:::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

Configure in Flashduty

DB Pull is configured entirely in Flashduty. On the database side you only need a read-only account that Flashduty can connect with.
1

Configure the database connection in Flashduty

Where: Integration Center › Alert Events › DB Pull › Database connection (dedicated integration: Channel › Configuration › Integrations › Private integration › Add integration › DB Pull)
2

Configure the query and cursor in Flashduty

Where: Integration Center › Alert Events › DB Pull › Query settings (dedicated integration: Channel › Configuration › Integrations › Private integration › Add integration › DB Pull)Each cycle fetches only the rows whose time column and ID column come after the last row of the previous cycle. Rows older than the initial time are not fetched. Do not include ORDER BY, LIMIT, or OFFSET in your own query. Flashduty controls ordering and paging.Automatic checkpoint resetAfter you change any of driver, host, port, database, query, time_column, id_column, or initial_time, 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.
3

Configure pull settings in Flashduty

Where: Integration Center › Alert Events › DB Pull › Pull settings (dedicated integration: Channel › Configuration › Integrations › Private integration › Add integration › DB Pull)
Each cycle ingests at most max_pages × page_size rows. Set page_size to 200–500 and tune max_pages to your alert throughput.
4

Configure field mapping and severity mapping in Flashduty

Where: Integration Center › Alert Events › DB Pull › Mappings (dedicated integration: Channel › Configuration › Integrations › Private integration › Add integration › DB Pull)Field mapping controls which database columns (or constant values) are mapped to which fields of the Standard Alert Event. 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 source (label mapping, labels) 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:
5

Save and confirm the first event

Where: Integration Center › Alert Events › DB Pull › Save (dedicated integration: Channel › Configuration › Integrations › Private integration › Add integration › DB Pull)Click Save. A shared integration also needs a Default route (see “Default route” below), otherwise pulled events are dropped. After saving, Flashduty queries the database every Pull interval (minimum 30 seconds). Insert a row into the target table whose time is later than Initial pull time, wait one interval, then return to the integration list: when the integration shows Latest event time, the pull works.

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 Configuration → Integrations → Private integration in 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.