npx skills add ...
npx skills add axiomhq/skills --skill axiom-alerting
npx skills add axiomhq/skills --skill axiom-alerting
Create and manage Axiom monitors and notifiers via the v2 public API. Use when building alerting, routing notifications, validating monitor behavior, and maintaining alert configurations end-to-end.
You manage alerting in Axiom end-to-end: notifiers for routing and monitors for detection.
Base URL: https://api.axiom.co/v2/ with Bearer token auth from .axiom.toml (project root or ~/.axiom.toml).
/v2/monitors)| Operation | Method | Path |
|---|---|---|
| List | GET | /v2/monitors |
| Get | GET | /v2/monitors/{id} |
| History | GET | /v2/monitors/{id}/history |
| Create | POST | /v2/monitors |
| Update | PUT | /v2/monitors/{id} |
| Delete | DELETE | /v2/monitors/{id} |
/v2/notifiers)| Operation | Method | Path |
|---|---|---|
| List | GET | /v2/notifiers |
| Get | GET | /v2/notifiers/{id} |
| Create | POST | /v2/notifiers |
| Update | PUT | /v2/notifiers/{id} |
| Delete | DELETE | /v2/notifiers/{id} |
scripts/setup.axiom.toml has a deployment:Core:
scripts/axiom-api <deploy> <method> <path> [body]Monitor scripts:
scripts/monitor-list <deployment> [--json]scripts/monitor-get <deployment> <id>scripts/monitor-history <deployment> <id> <startTime> <endTime>scripts/monitor-create <deployment> <json-file>scripts/monitor-update <deployment> <id> <json-file>scripts/monitor-delete <deployment> <id>Notifier scripts:
scripts/notifier-list <deployment> [--json]scripts/notifier-get <deployment> <id>scripts/notifier-create <deployment> <json-file>scripts/notifier-update <deployment> <id> <json-file>scripts/notifier-delete <deployment> <id>notifierIds.monitor-history.scripts/setup.scripts/notifier-list <deployment> and reuse one if appropriate.scripts/notifier-create.notifierIds attached.scripts/monitor-history <deployment> <id> <startTime> <endTime>.threshold, rangeMinutes, intervalMinutes, and N-of-M trigger fields.emails (not recipients) for email notifier payloads.triggerAfterNPositiveResults/triggerFromNRuns for noisy signals.bin() in monitor queries; avoid bin_auto() for alert logic.mplQuery for definitions; API responses may include both aplQuery and mplQuery.Monitor types:
ThresholdMatchEventAnomalyDetectionOperators:
AboveBelowAboveOrEqualBelowOrEqualAboveOrBelowCore fields:
name: Human-readable monitor name.type: Threshold, MatchEvent, or AnomalyDetection.aplQuery / mplQuery: Query evaluated by the monitor.notifierIds: Array of notifier IDs to notify.disabled: Whether monitor is disabled.disabledUntil: Optional timestamp for temporary disable/snooze.description: Optional monitor description.Threshold and evaluation fields:
operator: Threshold comparison operator.threshold: Numeric threshold value.rangeMinutes: Query evaluation window in minutes.intervalMinutes: Evaluation cadence in minutes.alertOnNoData: Whether no-data should trigger alerting.triggerAfterNPositiveResults: Positive evaluations required before firing.triggerFromNRuns: Total evaluation runs considered for N-of-M logic.Advanced behavior fields:
resolvable: Whether alerts can resolve automatically.notifyByGroup: Notify per group key/value result.notifyEveryRun: Notify on every positive evaluation.skipResolved: Skip sending resolved notifications.secondDelay: Delay (seconds) to tolerate late-arriving data.Type-specific fields:
columnName: Field used by some anomaly/value-anomaly monitors.Threshold:
MatchEvent:
AnomalyDetection:
Email:
Slack:
Custom webhook:
401 Unauthorized:
~/.axiom.toml.scripts/setup and retry:
scripts/notifier-list <deployment>403 Forbidden:
scripts/monitor-list <deployment>404 Not Found on get/update/delete:
.axiom.toml.scripts/monitor-list <deployment> --jsonscripts/notifier-list <deployment> --json400 Bad Request on notifier create/update:
properties.emails (not recipients).scripts/notifier-create <deployment> <json-file>400 Bad Request on monitor create/update:
name, type, query field, schedule, and notifierIds.operator matches monitor type and threshold logic.scripts/monitor-create <deployment> <json-file>scripts/monitor-update <deployment> <id> <json-file>Monitor created but never alerts:
scripts/monitor-history <deployment> <id> <startTime> <endTime>rangeMinutes.triggerAfterNPositiveResults/triggerFromNRuns.Too many alerts (noisy monitor):
triggerAfterNPositiveResults and/or triggerFromNRuns.intervalMinutes or narrow match conditions.Notifier exists but no delivery:
scripts/notifier-get <deployment> <id>scripts/notifier-update <deployment> <id> <json-file>{
"name": "Error Event Match",
"type": "MatchEvent",
"aplQuery": "['logs'] | where level == 'error'",
"rangeMinutes": 5,
"intervalMinutes": 5,
"notifierIds": ["notifier-id"],
"disabled": false
}{
"name": "CPU Anomaly",
"type": "AnomalyDetection",
"aplQuery": "['metrics'] | summarize avg(cpu_usage)",
"columnName": "cpu_usage",
"operator": "AboveOrBelow",
"rangeMinutes": 5,
"intervalMinutes": 5,
"notifierIds": ["notifier-id"],
"disabled": false
}{
"name": "Oncall Email",
"properties": {
"email": {
"emails": ["oncall@example.com"]
}
}
}{
"name": "Oncall Slack",
"properties": {
"slack": {
"slackUrl": "https://hooks.slack.com/services/T.../B.../XXX"
}
}
}{
"name": "Oncall Custom Webhook",
"properties": {
"customWebhook": {
"url": "https://api.example.com/alerts",
"body": "{\"action\":\"{{.Action}}\",\"monitorID\":\"{{.MonitorID}}\"}"
}
}
}