Index of every page on this site: llms.txt
All skills
axiomhq avatar

/axiom-alerting

@5b11222 official
by Axiom, Inc.axiomhq/skills18 stars
2
Run it yourself

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.

Use this Skill: https://skilld.dev/gh/axiomhq/skills/axiom-alerting

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈54 tokens for metadata: the name and description. ≈3.4k when used: this file. ≈532 more on demand in 1 file.

Description uses 2.7% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈215 characters, or 2.7%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Axiom Alerting

You manage alerting in Axiom end-to-end: notifiers for routing and monitors for detection.

API Overview

Base URL: https://api.axiom.co/v2/ with Bearer token auth from .axiom.toml (project root or ~/.axiom.toml).

Monitors (/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}

Notifiers (/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}

Prerequisites

  1. Run scripts/setup
  2. Ensure .axiom.toml has a deployment:
[deployments.prod]
url = "https://api.axiom.co"
token = "xaat-your-token"
org_id = "your-org-id"

Scripts

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>

Recommended Workflow

  1. Create notifier first.
  2. Create monitor and set notifierIds.
  3. Validate monitor behavior with monitor-history.
  4. Iterate monitor thresholds and schedule.

Workflow: End-To-End Alerting

  1. Run scripts/setup.
  2. List existing notifiers with scripts/notifier-list <deployment> and reuse one if appropriate.
  3. If no suitable notifier exists, create one with scripts/notifier-create.
  4. Create or update the monitor with notifierIds attached.
  5. Validate with scripts/monitor-history <deployment> <id> <startTime> <endTime>.
  6. If behavior is noisy or silent, tune threshold, rangeMinutes, intervalMinutes, and N-of-M trigger fields. For MatchEvent and NewValues monitors, tune the query instead: they have no threshold or trigger fields.
  7. Re-check history after each change.

Best Practices

  • Configure one channel per notifier.
  • Use emails (not recipients) for email notifier payloads.
  • Prefer triggerAfterNPositiveResults/triggerFromNRuns for noisy signals.
  • Use explicit bin() in monitor queries; avoid bin_auto() for alert logic.
  • For metrics-backed monitors, prefer mplQuery for definitions; API responses may include both aplQuery and mplQuery.

Monitor Types And Operators

Choose the type by what should alert:

  • Threshold: an aggregated value crosses a fixed number. Good for error counts, latency percentiles, and queue depth.
  • MatchEvent: every event that matches a filter. Good for events that each need attention, such as a failed deploy, a panic, or a change to a production secret.
  • NewValues: a column of the query results holds a value it has not held recently. Good for first appearances. Without an aggregation, any first sighting: a new error message, host, or AWS API call. With an aggregation, a new value that passes a bar: a new API client that sends at least 200 requests in an hour.
  • AnomalyDetection: a time series moves away from its own recent behavior. Good for values with no obvious fixed limit, such as traffic or ingest volume that suddenly drops or spikes.

Query rules:

  • Threshold: an APL query must aggregate (summarize). mplQuery is supported.
  • MatchEvent: APL only. The query cannot aggregate, and it can use only where, project (and project-away, project-keep, project-rename, project-reorder), extend, extend-valid, parse, parse-kv, union, lookup, and redact.
  • NewValues: APL only. The query can filter, project, and aggregate.
  • AnomalyDetection: the query must return a time series (summarize ... by bin(_time, ...)) with at least 11 points per group. mplQuery is supported.

Operators:

  • Threshold: Above, AboveOrEqual, Below, or BelowOrEqual.
  • AnomalyDetection: Above, Below, or AboveOrBelow.
  • MatchEvent and NewValues: none. Do not set operator on a NewValues monitor.

Alerting:

  • Threshold and AnomalyDetection open an alert on a breach and close it on the first run without one. Notifiers hear about both.
  • MatchEvent and NewValues have no alert to open or close. Each matching event or new value sends its own notification, at most 9 per run, and nothing is sent when it stops appearing.

Monitor Field Reference

Core fields:

  • name: Human-readable monitor name.
  • type: Threshold, MatchEvent, NewValues, 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.

Schedule fields:

  • intervalMinutes: Evaluation cadence in minutes.
  • rangeMinutes: Query evaluation window in minutes. MatchEvent monitors always run every minute over the last minute: send 1 for both fields, because other values are ignored. On a NewValues monitor, rangeMinutes cannot be less than intervalMinutes.
  • secondDelay: Seconds to move the whole window into the past, so that late-arriving data is included.

Threshold and anomaly fields (Threshold and AnomalyDetection only):

  • operator: Comparison operator.
  • threshold: Numeric threshold value (Threshold).
  • tolerance: Required for AnomalyDetection. The last point breaches when it is more than this many standard deviations from the mean of the earlier points. Above 0, usually 2 to 5; lower values alert more often.
  • compareDays: Optional for AnomalyDetection. First subtracts, point by point, the same window this many days earlier.
  • 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.

New values fields (NewValues only):

  • trackedValue: Required. The name of the column of the query results to watch. It cannot be the result of an aggregation, such as count().
  • lookbackDays: Required, at least 1. A value is new when the column has not held it for this many days.
  • backfillDays: Optional, 0 to lookbackDays. Records the values the query returns over this many previous days as already seen before the first run. With 0, the first run that returns values records them and does not alert. Use 0 when the query aggregates: the backfill runs the query once over the whole period, not once per rangeMinutes, so a bar such as where requests >= 200 is applied to totals for the whole period.
  • Changing aplQuery, trackedValue, intervalMinutes, rangeMinutes, or secondDelay on an existing monitor clears the values it has recorded, and it learns again. Changes to lookbackDays keep them.
  • Limits: fewer than 50,000 distinct values in the column within lookbackDays, and at most 1,000 new values in one run. A monitor that exceeds a limit fails its runs.

Minimal Valid Monitor Examples

Threshold:

{
  "name": "High Error Count",
  "type": "Threshold",
  "aplQuery": "['logs'] | where status >= 500 | summarize count()",
  "operator": "Above",
  "threshold": 100,
  "rangeMinutes": 5,
  "intervalMinutes": 5,
  "notifierIds": ["notifier-id"],
  "triggerAfterNPositiveResults": 2,
  "triggerFromNRuns": 3,
  "disabled": false
}

MatchEvent:

{
  "name": "Error Event Match",
  "type": "MatchEvent",
  "aplQuery": "['logs'] | where level == 'error'",
  "rangeMinutes": 1,
  "intervalMinutes": 1,
  "notifierIds": ["notifier-id"],
  "disabled": false
}

NewValues, any first sighting:

{
  "name": "New Error Message",
  "type": "NewValues",
  "aplQuery": "['logs'] | where level == 'error' | project message",
  "trackedValue": "message",
  "lookbackDays": 30,
  "backfillDays": 7,
  "rangeMinutes": 5,
  "intervalMinutes": 5,
  "notifierIds": ["notifier-id"],
  "disabled": false
}

NewValues with an aggregation, a new value that passes a bar. This one checks the last hour every 5 minutes:

{
  "name": "New API Client",
  "type": "NewValues",
  "aplQuery": "['http-logs'] | summarize requests = count() by client | where requests >= 200",
  "trackedValue": "client",
  "lookbackDays": 90,
  "backfillDays": 0,
  "rangeMinutes": 60,
  "intervalMinutes": 5,
  "notifierIds": ["notifier-id"],
  "disabled": false
}

AnomalyDetection:

{
  "name": "Request Volume Anomaly",
  "type": "AnomalyDetection",
  "aplQuery": "['http-logs'] | summarize count() by bin(_time, 5m)",
  "operator": "AboveOrBelow",
  "tolerance": 3,
  "rangeMinutes": 120,
  "intervalMinutes": 5,
  "notifierIds": ["notifier-id"],
  "disabled": false
}

Minimal Valid Notifier Examples

Email:

{
  "name": "Oncall Email",
  "properties": {
    "email": {
      "emails": ["oncall@example.com"]
    }
  }
}

Slack:

{
  "name": "Oncall Slack",
  "properties": {
    "slack": {
      "slackUrl": "https://hooks.slack.com/services/T.../B.../XXX"
    }
  }
}

Custom webhook:

{
  "name": "Oncall Custom Webhook",
  "properties": {
    "customWebhook": {
      "url": "https://api.example.com/alerts",
      "body": "{\"action\":\"{{.Action}}\",\"monitorID\":\"{{.MonitorID}}\"}"
    }
  }
}

Troubleshooting

401 Unauthorized:

  • Cause: invalid or expired token.
  • Fix:
    • Verify token in ~/.axiom.toml.
    • Re-run scripts/setup and retry:
      • scripts/notifier-list <deployment>

403 Forbidden:

  • Cause: token lacks required permissions.
  • Fix:
    • Create/assign token scopes for monitor/notifier management and dataset query access.
    • Retry:
      • scripts/monitor-list <deployment>

404 Not Found on get/update/delete:

  • Cause: wrong monitor/notifier ID or wrong deployment/org.
  • Fix:
    • Confirm deployment in .axiom.toml.
    • Re-list objects and use exact IDs:
      • scripts/monitor-list <deployment> --json
      • scripts/notifier-list <deployment> --json

400 Bad Request on notifier create/update:

  • Cause: invalid notifier payload shape.
  • Fix:
    • Use one notifier channel inside properties.
    • For email, use emails (not recipients).
    • Validate against a known-good example and retry:
      • scripts/notifier-create <deployment> <json-file>

400 Bad Request on monitor create/update:

  • Cause: invalid monitor schema, operator/type mismatch, or invalid query fields.
  • Fix:
    • Validate required fields: name, type, query field, schedule, and notifierIds.
    • Confirm operator matches monitor type and threshold logic.
    • must set Tolerance: an AnomalyDetection monitor needs tolerance.
    • must set NewValuesLookbackDays: a NewValues monitor needs lookbackDays.
    • RangeMinutes must not be less than IntervalMinutes: raise rangeMinutes on the NewValues monitor.
    • cannot set [Operator Tolerance CompareDays]: remove those fields from the NewValues monitor.
    • Retry:
      • scripts/monitor-create <deployment> <json-file>
      • scripts/monitor-update <deployment> <id> <json-file>

Monitor created but never alerts:

  • Cause: threshold too strict, wrong query window, or not enough positive runs.
  • Fix:
    • Inspect history over a known active period:
      • scripts/monitor-history <deployment> <id> <startTime> <endTime>
    • Reduce threshold or widen rangeMinutes.
    • Tune triggerAfterNPositiveResults/triggerFromNRuns.

Too many alerts (noisy monitor):

  • Cause: threshold too low or interval too short.
  • Fix:
    • Increase threshold.
    • Increase triggerAfterNPositiveResults and/or triggerFromNRuns.
    • Increase intervalMinutes or narrow match conditions.

NewValues monitor sends too many notifications or its runs fail:

  • Cause: the watched column holds too many distinct values, such as messages that contain IDs, timestamps, or numbers.
  • Fix:
    • Watch a column with fewer distinct values, or strip the variable parts in the query before trackedValue reads it.
    • Filter the query, or aggregate and keep only the values that pass a bar.
    • Shorten lookbackDays if the column holds 50,000 or more distinct values within it.

NewValues monitor misses a value:

  • Cause: the event arrived after every run that covers its _time, or the monitor had already recorded the value within lookbackDays.
  • Fix:
    • For late data, set secondDelay, or set rangeMinutes longer than intervalMinutes.
    • Remember that a value alerts once, then not again until lookbackDays pass without it.

Notifier exists but no delivery:

  • Cause: destination config invalid (URL/key/channel/email list), or destination-side rejection.
  • Fix:
    • Fetch notifier and verify destination fields:
      • scripts/notifier-get <deployment> <id>
    • Recreate/update notifier with corrected properties:
      • scripts/notifier-update <deployment> <id> <json-file>
    • Confirm monitor references correct notifier IDs.

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 warning4d3 checks · Risk SAFE
  • Gen Agent Trust Hub4d

    The skill provides a set of tools to manage Axiom monitors and notifiers using the official Axiom v2 API. It follows standard practices for credential management via a configuration file and interacts only with authorized vendor domains.

  • Socket4d

    No alerts

  • Snyk4d

    Risk: MEDIUM · 1 issue

Signed by skilld at 5b11222. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub just now.

Activeupdated last week
  • API
  • axiom
  • alerting
  • monitoring
  • threshold
  • anomaly-detection
  • notifications
  • webhook
  • slack
  • email

README badge

README badge for axiomhq/skills/axiom-alerting

Creates and manages Axiom monitors and notifiers using the v2 public API for end-to-end alerting and notification routing. Use this skill to define threshold, match-event, and anomaly-detection monitors; configure email, Slack, and webhook notifiers; and tune alert behavior with N-of-M triggering logic and query windows.

Generated from the current SKILL.md.

Does this skill work with all Axiom deployment types?
Yes, if you configure the deployment URL, token, and org_id in `.axiom.toml`. The skill uses the v2 public API and supports any Axiom instance reachable via HTTPS.
What monitor types are supported?
Three types: Threshold (numeric comparison), MatchEvent (log pattern matching), and AnomalyDetection (statistical deviation). Each has different required fields and operators.
Can I notify multiple channels from a single monitor?
Yes. Create multiple notifiers (email, Slack, webhook) and pass their IDs in the monitor's `notifierIds` array.
How do I prevent a monitor from firing too frequently?
Use `triggerAfterNPositiveResults` and `triggerFromNRuns` to require N-of-M positive evaluations before alerting, and increase `intervalMinutes` to space evaluations further apart.
What happens if I use APL queries with bin_auto() in a monitor?
The skill documentation recommends against it for alert logic; use explicit `bin()` instead to avoid unpredictable binning behavior during evaluation.

Generated from the current SKILL.md. These answers refresh after source changes.