Create Alert
create_alertSet up Splunk alerts by scheduling saved searches with trigger conditions, multiple actions, thresholds, and severity levels.
Instructions
Create a Splunk alert (a scheduled saved search with trigger conditions). Actions can be any installed alert action, including custom ones, and more than one action is allowed. Call list_alert_actions first for custom action names and param keys.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| app | No | App context (default: search) | |
| name | Yes | Unique alert name (required) | |
| search | Yes | SPL query (required) | |
| actions | No | [{name, params, enabled}]. Empty means track-only. Custom action params use keys from list_alert_actions. | |
| sharing | No | user|app|global (default: user) | user |
| alert_type | No | always|number of events|number of hosts|number of sources|custom (default: number of events) | number of events |
| is_visible | No | ||
| alert_track | No | Show in Triggered Alerts (default: true) | |
| description | No | Description | |
| latest_time | No | Dispatch latest time, e.g. 'now' | now |
| cron_schedule | Yes | Cron schedule, e.g. '*/5 * * * *' (required) | |
| earliest_time | No | Dispatch earliest time, e.g. '-15m' | -15m |
| alert_severity | No | 1-5 (default: 3) | |
| alert_condition | No | Required when alert_type is custom | |
| alert_threshold | No | Threshold value (default: 0) | 0 |
| alert_comparator | No | greater than|less than|equal to|not equal to (default: greater than) | greater than |
| alert_digest_mode | No |