Splunk Search

Search rest command for a list of dashboards using saves searches and macros?

uagraw01
Builder

Hello Splunkers!!

 

I want a list of dashboards and those dashboards are using saved searches & macros. How I can achieve those details by using rest command. So far I have tried the below one but not getting the exact result.

 

|rest /servicesNS/-/-/data/ui/views splunk_server=local |table author eai:acl.app id eai:data title

 

Labels (1)
0 Karma
1 Solution

gcusello
SplunkTrust
SplunkTrust

Hi @uagraw01 ,

what's the problem wit your search? it's correct!

It extracts all views with the code, so you can make two additional field extractions to identify macros and savedsearches:

| rest /servicesNS/-/-/data/ui/views splunk_server=local 
| rex field="eai:data" max_match=0 "\`(?<macro>\w+)\`"
| rex field="eai:data" max_match=0 "savedsearch\s+(?<savedsearch>\w+)"
| table author eai:acl.app id eai:data  macro savedsearch title

Ciao.

Giuseppe

 

View solution in original post

gcusello
SplunkTrust
SplunkTrust

Hi @uagraw01 ,

what's the problem wit your search? it's correct!

It extracts all views with the code, so you can make two additional field extractions to identify macros and savedsearches:

| rest /servicesNS/-/-/data/ui/views splunk_server=local 
| rex field="eai:data" max_match=0 "\`(?<macro>\w+)\`"
| rex field="eai:data" max_match=0 "savedsearch\s+(?<savedsearch>\w+)"
| table author eai:acl.app id eai:data  macro savedsearch title

Ciao.

Giuseppe

 

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 ...