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?
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
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
search eai:acl.can_share_user=1 is what does it for me. Exactly what I need, thank you!
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.
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.
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?
Thank you so much
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
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.
I can't do it by app like that, I need a full total across all apps.
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.
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