<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to eliminate old reports and dashboards? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-eliminate-old-reports-and-dashboards/m-p/266408#M16798</link>
    <description>&lt;P&gt;Here's a possibility that may get you started.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal source=*web_access.log* | search "/app/" |rex "^(?:[^:\n]*:){5}\d+/\w+\-\w+/\w+/(?P&amp;lt;app&amp;gt;\w+)/(?P&amp;lt;view&amp;gt;\w+)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The above extracts the events and apps and what was viewed on them through the GUI. You can table it and throw it into a lookup possibly to give you a list of apps and views that people have used over the time range.&lt;/P&gt;

&lt;P&gt;Then you could use the '| rest ' command to find all dashboards, reports, etc.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rest /servicesNS/-/-/data/ui/views | search isVisible=1 isDashboard=1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;For instance the above shows the dashboards on your instance. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rest /services/saved/searches | search is_visible=1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The above shows your saved searches.&lt;/P&gt;</description>
    <pubDate>Thu, 10 Mar 2016 20:46:31 GMT</pubDate>
    <dc:creator>pgreer_splunk</dc:creator>
    <dc:date>2016-03-10T20:46:31Z</dc:date>
    <item>
      <title>How to eliminate old reports and dashboards?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-eliminate-old-reports-and-dashboards/m-p/266404#M16794</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;

&lt;P&gt;I would like to eliminate old reports and dashboard and I am new to using Splunk, Looking for old reports and dashboards which were not accessed in the last two months. If you have any solution regarding this, please reply. Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Feb 2016 06:01:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-eliminate-old-reports-and-dashboards/m-p/266404#M16794</guid>
      <dc:creator>taraksinha</dc:creator>
      <dc:date>2016-02-04T06:01:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to eliminate old reports and dashboards?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-eliminate-old-reports-and-dashboards/m-p/266405#M16795</link>
      <description>&lt;P&gt;Hi taraksinha,&lt;BR /&gt;
 it seems to be like answered question. see this link once it may useful for you&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/216934/where-do-i-editdelete-reports-in-splunk-app-for-wi.html"&gt;https://answers.splunk.com/answers/216934/where-do-i-editdelete-reports-in-splunk-app-for-wi.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Feb 2016 07:19:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-eliminate-old-reports-and-dashboards/m-p/266405#M16795</guid>
      <dc:creator>Umesh_Vedicsoft</dc:creator>
      <dc:date>2016-02-04T07:19:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to eliminate old reports and dashboards?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-eliminate-old-reports-and-dashboards/m-p/266406#M16796</link>
      <description>&lt;P&gt;Hi Umesh,&lt;/P&gt;

&lt;P&gt;I can see all the reports and dashboard in "Searches, reports, and alerts panel", But actually i want to filter all the reports and dashboard which haven't accessed since last 2 months. So i can delete or disable the reports and dashboard accordingly. if you have any idea so please let me know, Thanks umesh to reply me.&lt;/P&gt;

&lt;P&gt;Regards,&lt;BR /&gt;
Tarak&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2016 05:02:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-eliminate-old-reports-and-dashboards/m-p/266406#M16796</guid>
      <dc:creator>taraksinha</dc:creator>
      <dc:date>2016-02-05T05:02:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to eliminate old reports and dashboards?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-eliminate-old-reports-and-dashboards/m-p/266407#M16797</link>
      <description>&lt;P&gt;Any search query to find unused reports and dashboard? Kindly reply me&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Wed, 17 Feb 2016 11:51:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-eliminate-old-reports-and-dashboards/m-p/266407#M16797</guid>
      <dc:creator>taraksinha</dc:creator>
      <dc:date>2016-02-17T11:51:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to eliminate old reports and dashboards?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-eliminate-old-reports-and-dashboards/m-p/266408#M16798</link>
      <description>&lt;P&gt;Here's a possibility that may get you started.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal source=*web_access.log* | search "/app/" |rex "^(?:[^:\n]*:){5}\d+/\w+\-\w+/\w+/(?P&amp;lt;app&amp;gt;\w+)/(?P&amp;lt;view&amp;gt;\w+)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The above extracts the events and apps and what was viewed on them through the GUI. You can table it and throw it into a lookup possibly to give you a list of apps and views that people have used over the time range.&lt;/P&gt;

&lt;P&gt;Then you could use the '| rest ' command to find all dashboards, reports, etc.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rest /servicesNS/-/-/data/ui/views | search isVisible=1 isDashboard=1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;For instance the above shows the dashboards on your instance. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rest /services/saved/searches | search is_visible=1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The above shows your saved searches.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2016 20:46:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-eliminate-old-reports-and-dashboards/m-p/266408#M16798</guid>
      <dc:creator>pgreer_splunk</dc:creator>
      <dc:date>2016-03-10T20:46:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to eliminate old reports and dashboards?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-eliminate-old-reports-and-dashboards/m-p/266409#M16799</link>
      <description>&lt;P&gt;Hi Pgreer,&lt;/P&gt;

&lt;P&gt;Thanks to reply that above query, but I am looking for the reports which are not access/view from past 60 days and want to filter my result with Field  Title, Author (who created item), User (who access/view the item), Date (when it was access), similar like below example.&lt;/P&gt;

&lt;P&gt;AppName ViewName              Date                                   owner  user&lt;/P&gt;

&lt;P&gt;search  g2ars_os_distribution    28/01/2016                 christophs  alexanders2&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 09:02:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-eliminate-old-reports-and-dashboards/m-p/266409#M16799</guid>
      <dc:creator>vinodsinha</dc:creator>
      <dc:date>2020-09-29T09:02:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to eliminate old reports and dashboards?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-eliminate-old-reports-and-dashboards/m-p/266410#M16800</link>
      <description>&lt;P&gt;I dug around some more - wondering if this will provide you with what you're looking for as well.&lt;/P&gt;

&lt;P&gt;Create a lookup table of all saved searches:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|rest /servicesNS/-/-/data/ui/views splunk_server=local | rename eai:* as * |rename acl.* as * | search isVisible=1| fields title data| stats [| rest /servicesNS/-/-/saved/searches/ splunk_server=local | search is_scheduled=1 | dedup title | fields title | eval savedSearch="count(eval(like(data,\"%".title."%\"))) AS \"".title."\"" | stats values(savedSearch) AS savedSearch | nomv savedSearch| return $savedSearch]| transpose | rename column AS savedsearch_name "row 1" AS countOfTimesFoundInDashboards | fields savedsearch_name | sort savedsearch_name | outputlookup savedsearches.csv
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Create a lookup table of all searches that have occurred within a time period set (I tested with last 30 days)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_audit action=search savedsearch_name!="" | fields savedsearch_name | dedup savedsearch_name | table savedsearch_name | sort savedsearch_name | outputlookup last30_savedsearches.csv
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then compare the two tables to show searches that are in the saved search list that are not in the last30 days list:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|set diff [inputlookup last30_savedsearches.csv | fields savedsearch_name] [inputlookup savedsearches.csv| fields savedsearch_name] | sort savedsearch_name
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Using the lookup tables, I found, was just a little more simple than having a huge '|set diff [search1] [search2]' single statement. Plus it leaves you with a nice inventory of your saved searches and those run in the last 30 days for reference for other plausible purposes.&lt;/P&gt;

&lt;P&gt;The same approach could be used for dashboards, but you'd need to use different sources for finding all the saved dashboards (via the rest command), then use the web_access.log* entries in _internal to find those unique dashboards that had been accessed within the past 30 days.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Mar 2016 20:10:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-eliminate-old-reports-and-dashboards/m-p/266410#M16800</guid>
      <dc:creator>pgreer_splunk</dc:creator>
      <dc:date>2016-03-11T20:10:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to eliminate old reports and dashboards?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-eliminate-old-reports-and-dashboards/m-p/266411#M16801</link>
      <description>&lt;P&gt;I know this question is old but I had a similar question and wasn't able to find an answer. This search will find dashboards that haven't been accessed in more than 60 days. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rest /servicesNS/-/-/data/ui/views splunk_server=* 
| search eai:acl.app!="search" AND eai:acl.app!="splunk_management_console" AND eai:acl.app!="splunk_monitoring_console" AND isDashboard=1 
| rename eai:acl.app AS app 
| fields title app author 
| join type=left title 
    [| search index=_internal sourcetype=splunk_web_access host=* user=* 
    | rex field=uri_path ".*/(?&amp;lt;title&amp;gt;[^/]*)$" 
    | stats latest(_time) as Time latest(user) as user by title] 
| where isnotnull(Time) 
| eval Now=now() 
| eval days=round((Now-Time)/86400,2) 
| sort - days 
| convert ctime(Time) 
| table app title days Time user author 
| fields - Now 
| search days &amp;gt; 60 
| rename days AS "Days since last accessed"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Run it over the last 90 days.&lt;/P&gt;

&lt;P&gt;If your log retention is set at the default 30 days, look at pgreer's answer above.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2019 23:03:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-eliminate-old-reports-and-dashboards/m-p/266411#M16801</guid>
      <dc:creator>lweiss</dc:creator>
      <dc:date>2019-04-30T23:03:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to eliminate old reports and dashboards?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-eliminate-old-reports-and-dashboards/m-p/266412#M16802</link>
      <description>&lt;P&gt;This one has one down side; Splunk keeps the internal logs by default only for 30 days. One needs to change the retention first to be able to run this search over 90 days.&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Wed, 01 May 2019 02:58:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-eliminate-old-reports-and-dashboards/m-p/266412#M16802</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2019-05-01T02:58:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to eliminate old reports and dashboards?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-eliminate-old-reports-and-dashboards/m-p/266413#M16803</link>
      <description>&lt;P&gt;I completely forgot about this. Thanks for calling it out &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 01 May 2019 15:17:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-eliminate-old-reports-and-dashboards/m-p/266413#M16803</guid>
      <dc:creator>lweiss</dc:creator>
      <dc:date>2019-05-01T15:17:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to eliminate old reports and dashboards?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-eliminate-old-reports-and-dashboards/m-p/636166#M52156</link>
      <description>&lt;P&gt;This is very useful, thanks a lot!&lt;/P&gt;</description>
      <pubDate>Mon, 27 Mar 2023 15:24:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-eliminate-old-reports-and-dashboards/m-p/636166#M52156</guid>
      <dc:creator>splunkreal</dc:creator>
      <dc:date>2023-03-27T15:24:56Z</dc:date>
    </item>
  </channel>
</rss>

