Overview

List all monitors

The API endpoint /v2/monitors only returns monitors for datasets that your API token has query access to. If the API returns an empty list, ensure your token has query permissions for the datasets used by your monitors.

GET/v2/monitors
Features

Send the token in the Authorization: Bearer API_TOKEN header. See Tokens for which token types this endpoint accepts.

Input0
Authorizationheaderrequired
Sent from your browser straight to the API — never to Docsbook, never stored.
Output27
alertOnNoDataboolean
Whether to alert when no data is received
aplQuerystring
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.
columnNamestring
Name of the column to monitor
compareDaysnumber
Number of days to compare for anomaly detection
createdAtstring
Timestamp when the monitor was created
createdBystring
ID of the user who created the monitor
descriptionstring
Detailed description of the monitor's purpose
disabledboolean
Whether the monitor is currently disabled
disabledUntilstring
Timestamp until when the monitor should remain disabled
intervalMinutesinteger
How frequently the monitor should run, in minutes. Minimum value is 1 minute.
mplQuerystring
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.
namestring
Name of the monitor
notifierIdsstring[]
List of notifier IDs that will receive alerts. Notifiers can be email, Slack, webhook endpoints, etc.
notifyByGroupboolean
Whether to group notifications
notifyEveryRunboolean
Whether to send notifications on every check
operatorstring
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 One of: Below, BelowOrEqual, Above, AboveOrEqual, AboveOrBelow.
rangeMinutesinteger
Time window to evaluate in each check, in minutes. For example, "last 5 minutes of data"
resolvableboolean
Whether the alert can be manually resolved
secondDelaynumber
Delay in seconds before triggering the alert
skipResolvedboolean
Whether to skip resolved alerts
thresholdnumber
Threshold value for triggering the alert
tolerancenumber
Tolerance percentage for anomaly detection
triggerAfterNPositiveResultsnumber
Number of positive results needed before triggering
triggerFromNRunsnumber
Number of consecutive check runs that must fail before triggering an alert. Use this to avoid alerting on temporary spikes.
typestring
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 One of: Threshold, MatchEvent, AnomalyDetection.
updatedAtstring
Timestamp when the monitor was last updated
idstring
Unique identifier for the monitor
Responses
200Monitor
Example input
curl 'https://api.axiom.co/v2/monitors' \
  -H 'Authorization: Bearer API_TOKEN'
Example output
[
  {
    "alertOnNoData": true,
    "aplQuery": "| where severity = 'error' | count() > 100",
    "columnName": "cpu_usage",
    "compareDays": 7,
    "createdAt": "2024-03-20T10:00:00Z",
    "createdBy": "usr_789xyz",
    "description": "Monitors CPU usage and alerts when it exceeds 90%",
    "disabled": false,
    "disabledUntil": "2024-04-01T00:00:00Z",
    "intervalMinutes": 5,
    "mplQuery": "test-metrics:http_request_duration_seconds",
    "name": "Production CPU Monitor"
  }
]

Updated

Was this page helpful?