Skip to main content Skip to docs navigation
Monitors

Creating a monitor

A monitor is the core unit of Datarist. It defines what to watch, when to fire, and where to send the alert. This guide walks through all five steps of the creation wizard.

12 minute read
Updated Apr 3, 2026
All plans

Authentication

Before creating monitors or connecting data sources, you need a Datarist account. Datarist uses email-based authentication — no third-party SSO required on free plans.

🔐
Sign up
Create a new Datarist account with your work email. Free plan available, no credit card required.
Create account →
🔓
Sign in
Already have an account? Log in with your email and password or magic link.
Sign in →

API authentication

For programmatic access, Datarist uses bearer tokens. Generate an API key from Settings → API keys in your dashboard. All API keys are prefixed with dt_live_.

bash Authenticating with the API
# Pass your API key as a Bearer token
curl https://api.datarist.io/v1/monitors \
-H "Authorization: Bearer dt_live_xxxxxxxxxxxx"
Keep API keys secret
API keys provide full access to your monitors and connectors. Never expose them in client-side code, version control, or public repositories. Rotate a key immediately from Settings if it is ever compromised.

Overview

The monitor creation wizard is a five-step flow. Each step is independently editable after activation — you never need to delete and recreate a monitor to change a threshold or add a channel.

#StepWhat you configureRequired
01Data sourceWhich connector to poll and how to authenticateYes
02ConditionsField path, operator, threshold, AND/OR logicYes
03ChannelsEmail recipients, Slack webhook, SMS numbersYes
04ScheduleCheck frequency, deduplication, auto-resolveOptional
05ReviewPreview sample notification, activate or save draftYes
Note
New monitors always start in draft status. They begin polling only after you explicitly click Activate monitor on the review screen.

Interactive demo

This is a live replica of the actual monitor creation UI. Click through each step to see exactly what you'll encounter in the dashboard.

New monitor — Datarist draft
01 source
02 conditions
03 channels
04 schedule
05 review
🐘
PostgreSQL
📊
Google Sheets
🐬
MySQL
🔗
Webhook
+
More soon
PostgreSQL connection
Fire when ALL conditions match
On crossing
fire once at threshold
Every match
alert each cycle
All selected channels fire simultaneously when conditions are met.
#
Slack
channel message
📱
SMS
text message
Real-time
webhook push
1 min
polling
5 min
polling
15 min
polling
Hourly
polling
Daily
digest 9am
Deduplication
Suppress repeats within cooldown window
Cooldown window
Min time between repeated alerts
Auto-resolve
Notify when condition returns to normal
Failure alerts
Alert if source is unreachable
Review your monitor before going live. Click any section to edit.
Data sourceEdit
name
source
PostgreSQL
ConditionsEdit
logic
ALL match
rules
not set
ChannelsEdit
send to
EmailSlack
ScheduleEdit
frequency
every 1 min
dedup
on · 1 hour
Sample notification
monitor:
condition: field > value
value_seen:
source: PostgreSQL
fired_at: 2026-03-24T14:32:01Z

Step 1 — Data source

The first step asks you to name the monitor and select the connector type. The name appears in all alert notifications and your dashboard, so be descriptive. "Revenue crossed $50k" is better than "Monitor 3".

Supported connector types

ConnectorAuth methodQuery methodPlan
PostgreSQLUsername + passwordSQL — must return value columnAll
MySQLUsername + passwordSQL — must return value columnAll
Google SheetsOAuth 2.0Spreadsheet ID + cell rangeAll
WebhookNone (URL-based)JSON path to value fieldAll

SQL query requirements

For PostgreSQL and MySQL connectors, your query must return exactly one row with a column named value. Datarist reads this column and compares it against your condition thresholds.

sql Good — single numeric value
-- Count new orders in the last hour
SELECT COUNT(*) AS value
FROM orders
WHERE created_at > NOW() - INTERVAL '1 hour';

-- Sum revenue for today
SELECT SUM(amount_cents) / 100.0 AS value
FROM charges
WHERE status = 'succeeded'
AND created_at::date = CURRENT_DATE;
Never use write credentials
Datarist only needs SELECT access. Create a dedicated read-only role with GRANT SELECT ON ALL TABLES IN SCHEMA public TO datarist_ro and use those credentials exclusively.

Step 2 — Conditions

Conditions define the logic Datarist evaluates on each check run. Each condition compares a field value against a threshold using an operator. You can stack multiple conditions with AND or OR logic.

Condition structure

Each condition has three parts: a field path, an operator, and a threshold value.

OperatorSymbolFires whenThreshold type
gt>Value is strictly greater than thresholdNumeric
gteValue is greater than or equal to thresholdNumeric
lt<Value is strictly less than thresholdNumeric
lteValue is less than or equal to thresholdNumeric
eq=Value exactly equals thresholdAny
neqValue does not equal thresholdAny
pct_change_gtΔ%>% change from previous check exceeds thresholdPercentage (0–100)
is_nullQuery returned no rows or NULL valueNone
new_row+1Row count increased since last checkNone

Trigger modes

The trigger mode controls when alerts fire relative to your polling cycle:

ModeBehaviorBest for
on_crossingFires exactly once when the condition transitions from false → true. Suppresses subsequent checks while still true.Revenue milestones, MRR targets, one-time events
every_matchFires on every polling cycle where the condition evaluates to true (subject to deduplication cooldown).Error rate monitoring, latency spikes, continuous health checks
💡
Tip
Use on_crossing for milestone alerts (revenue targets, user counts). Use every_match for operational monitoring where you want repeated reminders while a condition persists.

Step 3 — Channels

Configure where Datarist sends the alert. All selected channels fire simultaneously — not sequentially. A failed SMS delivery will not delay or prevent email delivery.

Sample alert notifications

Email
🔔 Datarist Alert

monitor: Revenue > $50k
value: $51,240
source: PostgreSQL
fired: 14:32 UTC
Slack
:bell: Revenue > $50k

current: $51,240
threshold: $50,000
source: PostgreSQL
time: 14:32 UTC
SMS
Datarist: Revenue > $50k
Value: $51,240
Source: PostgreSQL · 14:32 UTC
datarist.io/w/abc123

Message templates

Override the default message with a custom template using handlebars-style variables. Templates are per-monitor and apply to all channels unless overridden at the channel level.

handlebars Available template variables
{{monitor_name}} — the monitor's display name
{{field}} — the field or metric that fired
{{value}} — the observed value at fire time
{{threshold}} — the configured threshold
{{operator}} — the condition operator (gt, lt, etc.)
{{source_name}} — the connector display name
{{timestamp}} — ISO 8601 UTC timestamp
{{dashboard_url}} — deep link to this monitor in the app
SMS length limit
SMS messages are capped at 160 characters. Templates longer than 160 chars are silently truncated on SMS delivery. Email and Slack have no enforced length limit.

Step 4 — Schedule

Control how often Datarist polls your source and how it behaves when the same condition fires repeatedly.

Check frequency

FrequencyMechanismMin planApprox. checks/month
realtimeWebhook push — no pollingAllUnlimited
1minPollingGrowth~43,200
5minPollingAll~8,640
15minPollingAll~2,880
1hourPollingAll~720
daily_digestSingle summary at 9am UTCAll~31

Deduplication

When dedup_enabled is true, Datarist suppresses repeat alerts for the same monitor within the configured cooldown window. This prevents alert fatigue when using every_match mode on a fast polling interval.

example Dedup behavior with 1-hour cooldown
14:00 check run → condition TRUE → alert fires (email + slack)
14:01 check run → condition TRUE → suppressed (within 1hr cooldown)
14:05 check run → condition TRUE → suppressed (within 1hr cooldown)
15:01 check run → condition TRUE → alert fires (cooldown expired)
15:02 check run → condition FALSE → no alert (condition not met)

Auto-resolve

When auto_resolve is enabled, Datarist sends a recovery notification the first time a condition returns to false after having been true. Useful for incident-style monitoring where you want to know both when a problem starts and when it ends.

Step 5 — Review & activate

The review screen shows a complete summary of every configured value and a rendered sample notification message. Take a moment to verify the summary is correct — mismatched thresholds are the most common setup mistake.

1
Verify the condition summary
Check that the field, operator, and threshold read the way you intend. Click "Edit" next to any section to jump back and change it without losing other settings.
2
Read the sample notification
The preview shows the rendered message with placeholder values. If you've set a custom template, this is where you'll see if it looks right before any real data fires it.
3
Activate or save as draft
Click Activate monitor to go live immediately, or close the wizard to save as draft. Drafts appear in your monitor list with a gray status indicator and can be activated at any time.
Draft status
A monitor in draft status does not poll your source and will not fire alerts. Activate it from the review screen or from the monitor list in your dashboard.

Editing a monitor

You can edit any field of an active monitor without deleting and recreating it. Changes take effect on the next polling cycle after saving.

What can be edited

FieldEditable while active?Notes
Monitor nameYesUpdates immediately in all notifications
Conditions & thresholdsYesOn-crossing state resets on save
Alert channelsYesAdd or remove channels at any time
Message templateYesApplied on next alert fire
Check frequencyYesNew schedule begins immediately
Data source / connectorLimitedMust re-authenticate if connector changes
SQL queryYesValidated on save; must still return value

Editing via dashboard

1
Open the monitor
Navigate to Monitors in the sidebar, then click the monitor you want to edit.
2
Click Edit
Use the Edit button in the top-right of the monitor detail page, or click the pencil icon in the monitor list row.
3
Save changes
Click Save monitor. The monitor remains active during the edit — polling continues until you save.

Editing via API

bash PATCH /v1/monitors/{id}
curl -X PATCH https://api.datarist.io/v1/monitors/mt_9fKx2mQpAbL3 \
-H "Authorization: Bearer dt_live_xxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"frequency": "15min", "dedup_window_secs": 14400}'

Pausing & resuming

Pausing a monitor halts all polling and alert delivery without deleting any configuration. This is useful during planned maintenance windows or when you want to temporarily silence a noisy monitor.

Monitor states

StatePollingAlertsVisible in list
draftNoNoYes
activeYesYesYes
pausedNoNoYes
errorRetryingOn failure onlyYes

Pausing via dashboard

Open the monitor detail page and click the Pause button in the top-right action bar. The monitor's status indicator turns gray immediately. All pending check runs are cancelled.

Pausing via API

bash Pause a monitor
# Pause
curl -X PATCH https://api.datarist.io/v1/monitors/mt_9fKx2mQpAbL3 \
-H "Authorization: Bearer dt_live_xxxxxxxxxxxx" \
-d '{"status": "paused"}'

# Resume
curl -X PATCH https://api.datarist.io/v1/monitors/mt_9fKx2mQpAbL3 \
-H "Authorization: Bearer dt_live_xxxxxxxxxxxx" \
-d '{"status": "active"}'
On-crossing state on resume
When you resume a monitor using on_crossing mode, Datarist evaluates the current data state fresh. If the condition is already true at the moment of resumption, it will fire once immediately.

Alert history

Every alert fired, suppressed, or failed is recorded in the monitor's alert history. History is retained for 90 days on all plans.

History log fields

FieldTypeDescription
idstringUnique alert event identifier
monitor_idstringThe monitor that triggered this event
statusenumfired, suppressed, failed, resolved
value_seennumberThe actual value observed at fire time
condition_snapshotobjectCopy of condition config at the time of fire
channels_deliveredarrayList of channels and their delivery status
fired_atISO 8601UTC timestamp of the alert event

Fetching history via API

bash GET /v1/monitors/{id}/history
curl https://api.datarist.io/v1/monitors/mt_9fKx2mQpAbL3/history?limit=20 \
-H "Authorization: Bearer dt_live_xxxxxxxxxxxx"

PostgreSQL connector

The PostgreSQL connector allows Datarist to poll any PostgreSQL 12+ database. Datarist connects using a standard TCP connection and executes your configured SQL query on each check run.

Setup

1
Create a read-only role
Run the following in your database to create a dedicated Datarist user with read-only access.
2
Whitelist Datarist IPs
Add Datarist's static egress IPs to your database firewall or security group: 34.90.12.45, 34.90.88.201.
3
Enter connection details
In the monitor wizard, select PostgreSQL and fill in host, port (default 5432), database name, username, and password.
sql Create read-only Datarist role
CREATE ROLE datarist_ro WITH LOGIN PASSWORD 'your_password';
GRANT CONNECT ON DATABASE your_database TO datarist_ro;
GRANT USAGE ON SCHEMA public TO datarist_ro;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO datarist_ro;

Connection settings

SettingDefaultRequired
HostYes
Port5432No
DatabaseYes
UsernameYes
PasswordYes
SSL moderequireNo
Query timeout10sNo

MySQL connector

The MySQL connector supports MySQL 5.7+ and MariaDB 10.3+. Configuration mirrors the PostgreSQL connector — provide host, port, database, and credentials for a read-only user.

Setup

sql Create read-only Datarist user in MySQL
CREATE USER 'datarist_ro'@'%' IDENTIFIED BY 'your_password';
GRANT SELECT ON your_database.* TO 'datarist_ro'@'%';
FLUSH PRIVILEGES;

Connection settings

SettingDefaultRequired
HostYes
Port3306No
DatabaseYes
UsernameYes
PasswordYes
SSLEnabledNo
💡
Query format is identical
MySQL queries follow the same rule as PostgreSQL — return a single row with a column named exactly value. The same SQL examples from the PostgreSQL section apply with minor dialect differences (e.g. use NOW() - INTERVAL 1 HOUR instead of NOW() - INTERVAL '1 hour').

Google Sheets connector

Monitor values in a Google Sheets spreadsheet using a cell range. Datarist reads the specified range and treats the top-left cell's value as the monitored value.

Connecting your Google account

1
Authorize via OAuth
In the monitor wizard, select Google Sheets and click Connect Google account. You'll be redirected to Google's OAuth consent screen.
2
Enter spreadsheet ID
Copy the spreadsheet ID from the URL: docs.google.com/spreadsheets/d/SPREADSHEET_ID/edit
3
Specify cell range
Enter the A1 notation range for the cell to monitor, e.g. Sheet1!B4 or Summary!C2.
Shared drives
To monitor spreadsheets in a Google Shared Drive, the authenticated Google account must have at least Viewer access to that drive. Datarist does not request Drive-wide access — only access to sheets you explicitly authorize.

Webhooks connector

The Webhooks connector gives you a unique inbound URL. When your system posts JSON to this URL, Datarist evaluates the payload against your monitor's conditions in real-time — no polling required.

Setup

Select Webhook as the source type in the monitor wizard. Datarist generates a unique endpoint URL for that monitor. Configure your system to POST JSON to this URL when data changes.

bash Posting to a Datarist webhook endpoint
curl -X POST https://hooks.datarist.io/v1/ingest/wh_abc123xyz \
-H "Content-Type: application/json" \
-d '{"revenue": 51240, "currency": "usd", "timestamp": "2026-04-03T14:32:00Z"}'

JSON path configuration

In the monitor setup, specify the JSON path to the numeric field you want to monitor, e.g. revenue or metrics.active_users. Datarist extracts this field and evaluates it against your conditions.

No authentication required
Webhook endpoints are authenticated by URL — the unique endpoint URL is a secret. If you need to rotate a compromised webhook URL, go to Monitors → Settings → Regenerate endpoint.

Email channel

Datarist delivers alert emails via SendGrid. Emails arrive from alerts@datarist.io and include the monitor name, observed value, threshold, source, and a direct link to the monitor dashboard.

Configuration

SettingRequiredNotes
RecipientsYesComma-separated list of email addresses
Subject templateNoSupports {{monitor_name}}, {{value}}
Body templateNoPlain text or HTML; uses default if blank
💡
Add to allowlist
If Datarist emails are landing in spam, add alerts@datarist.io and the SendGrid IP range to your email provider's allowlist. Enterprise plans support custom sending domains.

Slack channel

Datarist posts alerts to Slack via an Incoming Webhook URL. You can configure a different Slack webhook per monitor, allowing you to route alerts to different channels based on severity or team.

Getting a Slack webhook URL

1
Create an Incoming Webhook in Slack
Go to api.slack.com/apps, select your app (or create one), navigate to Incoming Webhooks, and activate them.
2
Add to workspace and select channel
Click Add New Webhook to Workspace, choose the target channel, and authorize. Copy the generated webhook URL.
3
Paste into Datarist
In the monitor's Channels step, paste the Slack webhook URL into the Slack webhook field. The URL begins with https://hooks.slack.com/services/.

SMS channel

Datarist delivers SMS alerts via Twilio. SMS is available on Growth and Enterprise plans. Each alert message is capped at 160 characters; longer messages are truncated.

Configuration

SettingRequiredNotes
Phone numbersYesE.164 format: +14155552671
Message templateNoMax 160 chars including variable substitution
International SMS
SMS delivery to international numbers may incur additional latency and is subject to carrier regulations in certain countries. If SMS is not delivering, check the alert history's channels_delivered field for the carrier error code.

Operators reference

Operators define the comparison logic between an observed value and a configured threshold. All operators are case-insensitive in the API.

OperatorAPI valueUI labelThreshold typeNotes
Greater thangt>NumericStrict; does not fire on equality
Greater than or equalgteNumericFires on equality
Less thanlt<NumericStrict; does not fire on equality
Less than or equallteNumericFires on equality
Equal toeq=AnyString or numeric comparison
Not equal toneqAnyFires when values differ
% change greater thanpct_change_gtΔ%>0–100Compares to previous check run's value
Is null / no datais_nullNoneNo threshold required
New row insertednew_row+1NoneSQL connectors only; checks row count delta

Combining operators with logic modes

When a monitor has multiple conditions, the condition_logic field controls how they combine:

Templates reference

Message templates let you customize the content of alert notifications. Templates use double-brace variable syntax and are evaluated at alert fire time using the actual observed values.

Available variables

VariableTypeExample valueDescription
{{monitor_name}}stringRevenue > $50kThe monitor's display name
{{field}}stringrevenue_totalThe monitored field or metric
{{value}}number51240Observed value at alert fire time
{{threshold}}number50000Configured threshold value
{{operator}}stringgtCondition operator API code
{{source_name}}stringProduction DBConnector display name
{{timestamp}}ISO 86012026-04-03T14:32:01ZUTC time of the alert event
{{dashboard_url}}URLapp.datarist.io/m/mt_…Deep link to the monitor
{{org_name}}stringAcme CorpYour organization name

Example templates

handlebars Slack message template
:bell: *{{monitor_name}}* fired
Value: {{value}} · Threshold: {{threshold}}
Source: {{source_name}} · At: {{timestamp}}
{{dashboard_url}}
handlebars SMS template (keep under 160 chars)
Datarist: {{monitor_name}} · {{value}} {{operator}} {{threshold}} at {{timestamp}}

REST API

The Datarist REST API allows full programmatic control over monitors, connectors, and alert history. The base URL is https://api.datarist.io/v1.

Endpoints

MethodPathDescription
GET/v1/monitorsList all monitors
POST/v1/monitorsCreate a new monitor
GET/v1/monitors/{id}Get monitor details
PATCH/v1/monitors/{id}Update a monitor (partial)
DELETE/v1/monitors/{id}Delete a monitor permanently
GET/v1/monitors/{id}/historyList alert history for monitor
GET/v1/connectorsList connectors
POST/v1/connectorsCreate a connector
GET/v1/connectors/{id}/testTest connector connectivity

Create a monitor

bash POST /v1/monitors
curl -X POST https://api.datarist.io/v1/monitors \
-H "Authorization: Bearer dt_live_xxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"name": "Revenue crossed $50k",
"connector_id": "conn_abc123",
"condition_logic": "all",
"trigger_mode": "on_crossing",
"frequency": "5min",
"dedup_enabled": true,
"dedup_window_secs": 3600,
"conditions": [{
"field_path": "value",
"operator": "gt",
"threshold_value": "50000"
}],
"channels": [{
"channel_type": "email",
"config": { "recipients": ["ops@company.com"] }
}, {
"channel_type": "slack",
"config": { "webhook_url": "https://hooks.slack.com/..." }
}]
}'
json 201 Created response
{
"id": "mt_9fKx2mQpAbL3",
"name": "Revenue crossed $50k",
"status": "draft",
"org_id": "org_xyz789",
"connector_id": "conn_abc123",
"frequency": "5min",
"created_at": "2026-04-03T14:32:01Z",
"dashboard_url": "https://app.datarist.io/m/mt_9fKx2mQpAbL3"
}
Activate via API
Monitors created via the API start in draft status. To activate, send PATCH /v1/monitors/{id} with {"status": "active"}.

Plan limits

Datarist enforces limits per plan across monitors, check frequency, and retention. Limits apply per organization workspace.

FeatureStarterGrowthEnterprise
Active monitors550Unlimited
Team members110Unlimited
Min check frequency15 min1 minReal-time
Alert history retention7 days90 days365 days
SMS alertsNoYesYes
API accessNoYesYes
Custom sending domainNoNoYes
SSO / SAMLNoNoYes
Connectors220Unlimited
SupportCommunityEmailDedicated SLA
Hitting a limit?
When you reach a plan limit (e.g. active monitor cap), Datarist will show a warning in the dashboard and block creation of new resources until you upgrade or remove existing ones. Upgrade anytime from Settings → Billing.

Troubleshooting

My monitor isn't firing

My source connection is failing

I'm getting too many alerts


Documentation

Complete Datarist documentation. API references, integration guides, tutorials, and technical resources for developers and users.

On this page

Quick start