Splunk Search

How to find all alerts reports, and Dashboards using a specific search string

tdavison76
Path Finder

Hello, I've been asked to provide a list of all Alerts/Reports/Dashboards that contain the value "You Found a bug!"  in the underlying Search.

I have no idea how to do this :).

I manually found one Alert that is using a Search that would match:

source=bluefletch "details.package"="com.siteone.mobilepro" "details.message.environment"=PROD (event=ErrorEvent OR event=ExceptionEvent) "details.message.additionalInfo.content{}.Title"="You found a bug!"

I just need to find all of the other Alerts/Reports/Dashboards that also is using this.

Does anyone have any ideas how this can be done.  Thank you for any help on this.

Thanks,

Tom

 

 

 

 

 

0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

There are two REST endpoints you can use to get that information.

This one fetches saved searches (including reports and alerts)

 

| rest splunk_server=local /servicesNS/-/-/saved/searches
| search search="*You found a bug!*"

 

This one does the same for dashboards.

 

| rest splunk_server=local /services/-/-/data/ui/views
| search eai:data="*You found a bug!*"

 

---
If this reply helps you, Karma would be appreciated.

View solution in original post

richgalloway
SplunkTrust
SplunkTrust

There are two REST endpoints you can use to get that information.

This one fetches saved searches (including reports and alerts)

 

| rest splunk_server=local /servicesNS/-/-/saved/searches
| search search="*You found a bug!*"

 

This one does the same for dashboards.

 

| rest splunk_server=local /services/-/-/data/ui/views
| search eai:data="*You found a bug!*"

 

---
If this reply helps you, Karma would be appreciated.

tdavison76
Path Finder

Awesome, thanks for the help, much appreciated. This worked for me. 🙂

Thanks again,

Tom

 

PickleRick
SplunkTrust
SplunkTrust

Having said that - as with most of the questions starting with "how to find all" - it's possible to do it only for a specific subset of cases. There are ways of creating the searches so that you won't know what they're using effectively for searching (aliases, eventtypes, tags, subsearches, lookups...).

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...