How to enable/disable splunk alert settings from CLI

release date
2017-01-11
last updated
2023-06-02
version
Splunk Enterprise 9.0.4
Overview
How to enable/disable alert settings from CLI
Reference information
content

Alerts set in splunk can be enabled/disabled with the following CLI commands.

When disabling alerts

curl -ku <username>:<password>
https://<server_IP>:8089/servicesNS/<owner-name>/
<app-name>/saved/searches/<saved-search-name> -d "disabled=1"

When to enable alerts

curl -ku <username>:<password>
https://<server_IP>:8089/servicesNS/<owner-name>/
<app-name>/saved/searches/<saved-search-name> -d "disabled=0"

* For <owner-name>, <app-name>, and <saved-search-name>, enter the owner, app name, and alert name of the alert whose settings you want to disable. Please see the reference information for details.

that's all