Overview

Update monitor

Update monitor

PUT/v2/monitors/{id}
Features

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

Input27
Authorizationheaderrequired
Sent from your browser straight to the API — never to Docsbook, never stored.
idstring · pathrequired
(path)
alertOnNoDataboolean · body
Whether to alert when no data is received
aplQuerystring · body
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 · body
Name of the column to monitor
compareDaysnumber · body
Number of days to compare for anomaly detection
createdAtstring · body
Timestamp when the monitor was created
createdBystring · body
ID of the user who created the monitor
descriptionstring · body
Detailed description of the monitor's purpose
disabledboolean · body
Whether the monitor is currently disabled
disabledUntilstring · body
Timestamp until when the monitor should remain disabled
intervalMinutesinteger · body
How frequently the monitor should run, in minutes. Minimum value is 1 minute.
mplQuerystring · body
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 · bodyrequired
Name of the monitor
notifierIdsstring[] · body
List of notifier IDs that will receive alerts. Notifiers can be email, Slack, webhook endpoints, etc.
notifyByGroupboolean · body
Whether to group notifications
notifyEveryRunboolean · body
Whether to send notifications on every check
operatorstring · body
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 · body
Time window to evaluate in each check, in minutes. For example, "last 5 minutes of data"
resolvableboolean · body
Whether the alert can be manually resolved
secondDelaynumber · body
Delay in seconds before triggering the alert
skipResolvedboolean · body
Whether to skip resolved alerts
thresholdnumber · body
Threshold value for triggering the alert
tolerancenumber · body
Tolerance percentage for anomaly detection
triggerAfterNPositiveResultsnumber · body
Number of positive results needed before triggering
triggerFromNRunsnumber · body
Number of consecutive check runs that must fail before triggering an alert. Use this to avoid alerting on temporary spikes.
typestring · bodyrequired
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 · body
Timestamp when the monitor was last updated
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 -X PUT 'https://api.axiom.co/v2/monitors/{id}' \
  -H 'Authorization: Bearer API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"name":"Production CPU Monitor","type":"<type>"}'
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?