Alerting

Bulk Update alerts: add to triggered alerts

ramamohangaddam
New Member

We have around 400+  alerts configured in Splunk. Is there a easy way to add alert action "Add to Triggered Alerts"

Labels (1)
0 Karma

tscroggins
Influencer

@ramamohangaddam 

You can use the REST API to update saved searches.

POST parameters are documented here: https://docs.splunk.com/Documentation/Splunk/8.1.2/RESTREF/RESTsearch#saved.2Fsearches.2F.7Bname.7D

The parameters of interest are alert.track and alert.severity.

To enable "Add to Triggered Alerts," set alert.track to 1.

The default severity is Medium (3). To change the severity, set alert.severity to the numeric severity value:

Info => 1
Low => 2
Medium => 3
High => 4
Critical => 5

E.g.

$ curl -k -s -u admin:password 'https://localhost:8089/services/saved/searches/{name}' -d alert.track=1 -d alert.severity=5

Replace {name} with the name of the search.

You can enumerate searches in different ways, e.g.:

$ curl -k -s -u admin:password 'https://localhost:8089/services/saved/searches?count=0&f=title'

$ $SPLUNK_HOME/bin/splunk cmd btool savedsearches list | grep '^\[' | sed -e 's/[][]//g'

However, you probably don't want to modify every search on your instance.

Generate a list of curl commands using whatever method is easiest for you.

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...