Dashboards & Visualizations

Splunk query or rest API to list down the advanced xml dashboards

rahulbhatia
Path Finder

I want to create an alert to notify the users if they create a dashboard using advance xml or calling a script

0 Karma
1 Solution

traxxasbreaker
Communicator

I would start with this search:

| rest  /servicesNS/-/-/data/ui/views  

The eai:data field should have the dashboard XML, and with that you should be able to regex out what you are looking for.

I'd probably use evals and do something like this:

 | eval contains_adanced_xml=if(match(eai:data, ".*<module .*"), "1", "0")
 | eval contains_script=if(match(eai:data, "<dashboard script=.*>", "1", "0")

You'll likely need to refine those conditionals a little bit, but once those are good you'd be able to just grab the dashboards that meet either condition and setup an alert.

View solution in original post

0 Karma

traxxasbreaker
Communicator

I would start with this search:

| rest  /servicesNS/-/-/data/ui/views  

The eai:data field should have the dashboard XML, and with that you should be able to regex out what you are looking for.

I'd probably use evals and do something like this:

 | eval contains_adanced_xml=if(match(eai:data, ".*<module .*"), "1", "0")
 | eval contains_script=if(match(eai:data, "<dashboard script=.*>", "1", "0")

You'll likely need to refine those conditionals a little bit, but once those are good you'd be able to just grab the dashboards that meet either condition and setup an alert.

0 Karma

rahulbhatia
Path Finder

This is what i was looking for, thanks a lot

0 Karma
Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...