Create monitor
Creates a monitor. Axiom runs the monitor's query once before saving it and rejects the request if the query fails, for example because it's invalid or references a dataset that doesn't exist. labelIds replaces assignments when supplied; [] clears them. Omitted or null labelIds preserves assignments on updates and creates an unlabeled resource on creation. IDs must belong to existing labels in your organization and are validated before saving.
Body
Configuration for a monitoring rule. Monitors can be configured to: - Check threshold values (e.g., CPU usage > 90%) - Match specific events in logs - Detect anomalies based on historical patterns Each monitor runs on a specified interval and can trigger notifications through configured notifiers.
application/json| Property | Type | Description |
|---|---|---|
alert | boolean | Whether to alert when no data is received |
apl | string | APL (Axiom Processing Language) query string used for monitoring. This query defines what data to analyze and how to process it. At least one of aplQuery or mplQuery must be provided. |
backfill | integer | NewValues monitors only. Before the first evaluation, the values the query returns over this many days are recorded as seen, so they do not alert. Must not exceed lookbackDays. 0 disables the backfill. |
column | string | Name of the column to monitor |
compare | number | Number of days to compare for anomaly detection |
description | string | Detailed description of the monitor's purpose |
disabled | boolean | Whether the monitor is currently disabled |
disabled | string | Timestamp until when the monitor should remain disabled |
include | boolean | Whether to include a query chart in triggered notifications |
interval | integer | How frequently the monitor should run, in minutes. Minimum value is 1 minute. |
lookback | integer | NewValues monitors only. A value counts as new when it was not seen in this many days. |
mpl | string | MPL (Metrics Processing Language) query string for metrics-based monitoring. Use this as an alternative to aplQuery for metrics datasets. At least one of aplQuery or mplQuery must be provided. |
name | stringRequired | Name of the monitor |
notifier | string[] | List of notifier IDs that will receive alerts. Notifiers can be email, Slack, webhook endpoints, etc. |
notify | boolean | Whether to group notifications |
notify | boolean | Whether to send notifications on every check |
operator | string | Comparison operator for threshold checks: - Below: Trigger when value < threshold - BelowOrEqual: Trigger when value <= threshold - Above: Trigger when value > threshold - AboveOrEqual: Trigger when value >= threshold - AboveOrBelow: Trigger when value is outside a range |
range | integer | Time window to evaluate in each check, in minutes. For example, "last 5 minutes of data" |
resolvable | boolean | Whether the alert can be manually resolved |
second | number | Number of seconds to move each run's query window into the past, so data that arrives late is included. For example, with a value of 300, a run at 10:05 queries up to 10:00. |
skip | boolean | Whether to skip resolved alerts |
threshold | number | Threshold value for triggering the alert |
tolerance | number | Tolerance percentage for anomaly detection |
tracked | string | NewValues monitors only, and required for them. The column of the query result whose values are checked for new ones. |
trigger | number | Number of runs among the last triggerFromNRuns runs, including the current one, that must meet the trigger condition for the monitor to trigger.
The current run must always meet it.
For example, set both fields to 3 to trigger only after 3 consecutive runs meet the condition.
If unset or 0, the first run that meets the condition triggers.
Values above triggerFromNRuns are lowered to it when the monitor is saved.
Applies to Threshold and AnomalyDetection monitors.
|
trigger | number | Number of most recent runs, including the current one, that the monitor looks at when deciding whether to trigger.
Has no effect unless triggerAfterNPositiveResults is also set.
Applies to Threshold and AnomalyDetection monitors.
|
type | stringRequired | Type of monitoring check to perform: - Threshold: Compares a numeric value against a threshold - MatchEvent: Looks for specific events or patterns - AnomalyDetection: Identifies unusual patterns based on historical data - NewValues: Alerts when the trackedValue column of the query result holds a value not seen within lookbackDays. Each run queries the last rangeMinutes, which defaults to intervalMinutes and cannot be less. Sends one notification per new value. |
label | string[] | Existing label IDs; replaces assignments when supplied, clears with [], and preserves them when omitted or null. |
Request
Try itRun this request against your Axiom organization
Credentials stay in this browser tab and are only sent to Axiom when you run the request.
Response
200Created monitor.400Bad Request| Property | Type | Description |
|---|---|---|
alert | boolean | Whether to alert when no data is received |
apl | string | APL (Axiom Processing Language) query string used for monitoring. This query defines what data to analyze and how to process it. At least one of aplQuery or mplQuery must be provided. |
backfill | integer | NewValues monitors only. Before the first evaluation, the values the query returns over this many days are recorded as seen, so they do not alert. Must not exceed lookbackDays. 0 disables the backfill. |
column | string | Name of the column to monitor |
compare | number | Number of days to compare for anomaly detection |
description | string | Detailed description of the monitor's purpose |
disabled | boolean | Whether the monitor is currently disabled |
disabled | string | Timestamp until when the monitor should remain disabled |
include | boolean | Whether to include a query chart in triggered notifications |
interval | integer | How frequently the monitor should run, in minutes. Minimum value is 1 minute. |
lookback | integer | NewValues monitors only. A value counts as new when it was not seen in this many days. |
mpl | string | MPL (Metrics Processing Language) query string for metrics-based monitoring. Use this as an alternative to aplQuery for metrics datasets. At least one of aplQuery or mplQuery must be provided. |
name | stringRequired | Name of the monitor |
notifier | string[] | List of notifier IDs that will receive alerts. Notifiers can be email, Slack, webhook endpoints, etc. |
notify | boolean | Whether to group notifications |
notify | boolean | Whether to send notifications on every check |
operator | string | Comparison operator for threshold checks: - Below: Trigger when value < threshold - BelowOrEqual: Trigger when value <= threshold - Above: Trigger when value > threshold - AboveOrEqual: Trigger when value >= threshold - AboveOrBelow: Trigger when value is outside a range |
range | integer | Time window to evaluate in each check, in minutes. For example, "last 5 minutes of data" |
resolvable | boolean | Whether the alert can be manually resolved |
second | number | Number of seconds to move each run's query window into the past, so data that arrives late is included. For example, with a value of 300, a run at 10:05 queries up to 10:00. |
skip | boolean | Whether to skip resolved alerts |
threshold | number | Threshold value for triggering the alert |
tolerance | number | Tolerance percentage for anomaly detection |
tracked | string | NewValues monitors only, and required for them. The column of the query result whose values are checked for new ones. |
trigger | number | Number of runs among the last triggerFromNRuns runs, including the current one, that must meet the trigger condition for the monitor to trigger.
The current run must always meet it.
For example, set both fields to 3 to trigger only after 3 consecutive runs meet the condition.
If unset or 0, the first run that meets the condition triggers.
Values above triggerFromNRuns are lowered to it when the monitor is saved.
Applies to Threshold and AnomalyDetection monitors.
|
trigger | number | Number of most recent runs, including the current one, that the monitor looks at when deciding whether to trigger.
Has no effect unless triggerAfterNPositiveResults is also set.
Applies to Threshold and AnomalyDetection monitors.
|
type | stringRequired | Type of monitoring check to perform: - Threshold: Compares a numeric value against a threshold - MatchEvent: Looks for specific events or patterns - AnomalyDetection: Identifies unusual patterns based on historical data - NewValues: Alerts when the trackedValue column of the query result holds a value not seen within lookbackDays. Each run queries the last rangeMinutes, which defaults to intervalMinutes and cannot be less. Sends one notification per new value. |
created | string | Timestamp when the monitor was created |
created | string | ID of the user who created the monitor |
created | boolean | true when the MCP server created this monitor |
datasets | string[] | Dataset names referenced by the monitor query. |
id | stringRequired | Unique identifier for the monitor |
label | string[]Required | IDs of labels assigned to this monitor. |
label | string[]Required | Names of assigned labels, including with exclude=labels; [] when unassigned. |
labels | object[] | Resolved labels assigned to this monitor. |
color | objectRequired | |
name | stringRequired | |
type | stringRequired | |
description | string | |
id | stringRequired | |
name | stringRequired | |
last | string | Most recent error encountered while evaluating the monitor. |
updated | string | Timestamp when the monitor was last updated |