Dashboards & Visualizations

Count of Dashboards?

sheltomt
Path Finder

I have a request from Execs to get an overview. I’m looking to get a total count of dashboards. I’m using:

| rest /servicesNS/-/-/data/ui/views|search isDashboard=1|stats count(isDashboard)

The isDashboard field does indeed say 1 on all of these, but the count seems really high

Is there a better way of doing this?

Tags (1)
0 Karma
1 Solution

somesoni2
Revered Legend

Assuming you want to user created dashboards, give this try:

 | rest /servicesNS/-/-/data/ui/views splunk_server=local | search eai:acl.can_share_user=1 | stats count

View solution in original post

somesoni2
Revered Legend

Assuming you want to user created dashboards, give this try:

 | rest /servicesNS/-/-/data/ui/views splunk_server=local | search eai:acl.can_share_user=1 | stats count

sheltomt
Path Finder

search eai:acl.can_share_user=1 is what does it for me. Exactly what I need, thank you!

0 Karma

vasanthmss
Motivator

Hi sheltomt,

Below search will gives you all dashboards across applications in your environment

| rest /servicesNS/-/-/data/ui/views  |search isDashboard=1 | table isDashboard eai:acl.owner, label, title, author, id eai:acl.app disabled

Use the below search to identify dashboard counts by application name,

| rest /servicesNS/-/-/data/ui/views  |search isDashboard=1 | table isDashboard eai:acl.owner, label, title, author, id eai:acl.app disabled | stats dc(id) as count by  eai:acl.app | addcoltotals

you can filter the required applications along with the isDashboard=1.

Hope this will helps you.

V

bhatganapatik
Loves-to-Learn

Hello, 

 

I need to know the usage of each dashboards with in the Splunk. 
Can you please help me with the query. 

Intension is to know most used dashboards and plan is to remove which are not been used. 

Thank you in advance.

0 Karma

sheltomt
Path Finder

I get what you're doing with the breakout.

However, is this the ACTUAL count of dashboards? Or are there items in the system that identify as isDashboard=1 that aren't really full Dashboards? Like, do panels count? Reports?

0 Karma

rutdesanti
New Member

Thank you so much

0 Karma

vasanthmss
Motivator

yes. that's the actual dashboards. isDashboard=1 will gives you the forms & dashboards. forms - dashboards with inputs (filters like timefilter or other custom inputs). other than that isDashboard=0 will gives you the System level views like search and reports, dashboard view (list of dashboards) etc.

"eai:data" will gives you the xml. you can validate based on your apps.
| rest /servicesNS/-/-/data/ui/views |search isDashboard=1 | table isDashboard eai:acl.owner, label, title, author, id eai:acl.app disabled eai:data

V
0 Karma

niketn
Legend

You should search specific to your Splunk App Name

| rest /servicesNS/-/-/data/ui/views
| search eai:appName="<YourSplunkAppName>" eai:type="view" disabled=0 isDashboard=1 
| stats count by title
| addcoltotals labelfield=title
| reverse

Go through a list of existing Dashboard Names listed under title column to ensure unwanted dashboard like Clone, or any other duplicate/unused/work in progress dashboards are not listed. Also validate to ensure that existing dashboard is not missing from the list or else search filter in second pipe would need to be adjusted.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

sheltomt
Path Finder

I can't do it by app like that, I need a full total across all apps.

0 Karma

niketn
Legend

Ok then take out eai:appName filter. However, this will not include panels or searches, there are separate rest calls for them.

You can also check out rootNode which should be dashboard and form for these.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

adonio
Ultra Champion

seems accurate,
try this split and then look for a sample app and verify the amount of dashboards if you'd like:
| rest /servicesNS/-/-/data/ui/views|search isDashboard=1 | stats count by eai:acl.app | addcoltotals
hope it helpl

0 Karma
Get Updates on the Splunk Community!

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...