<?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 Is there any way to track deleted lookup files? in Splunk Enterprise</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise/Is-there-any-way-to-track-deleted-lookup-files/m-p/626610#M15045</link>
    <description>&lt;P&gt;I'm trying to identify all the dashboards broken from lookup files being deleted. But since there's way too many dashboards, is there any not-so-manual way to find out all the inconsistencies regarding lookup files without running the dashboards one by one?&lt;/P&gt;</description>
    <pubDate>Tue, 10 Jan 2023 15:23:03 GMT</pubDate>
    <dc:creator>buttsurfer</dc:creator>
    <dc:date>2023-01-10T15:23:03Z</dc:date>
    <item>
      <title>Is there any way to track deleted lookup files?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Is-there-any-way-to-track-deleted-lookup-files/m-p/626610#M15045</link>
      <description>&lt;P&gt;I'm trying to identify all the dashboards broken from lookup files being deleted. But since there's way too many dashboards, is there any not-so-manual way to find out all the inconsistencies regarding lookup files without running the dashboards one by one?&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jan 2023 15:23:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Is-there-any-way-to-track-deleted-lookup-files/m-p/626610#M15045</guid>
      <dc:creator>buttsurfer</dc:creator>
      <dc:date>2023-01-10T15:23:03Z</dc:date>
    </item>
    <item>
      <title>Re: Is there any way to track deleted lookup files?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Is-there-any-way-to-track-deleted-lookup-files/m-p/626658#M15054</link>
      <description>&lt;P&gt;Here is a query that fetches all of the lookups referenced by dashboards and compares that to the lookups defined on the system.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rest /servicesNS/-/-/data/ui/views splunk_server=local 
| search * 
| rename eai:data as data title as dashboard
```Look for 'lookup' and 'inputlookup' commands in the dashboard ("view")```
| regex data="\|\s*(?:lookup|inputlookup)\s+" 
```Get the first 2 arguments to the command```
| rex max_match=0 field=data "\|\s*(?:lookup|inputlookup)\s+(?&amp;lt;kw1&amp;gt;[^\s\]]+)\s+(?&amp;lt;kw2&amp;gt;[^\s\]]+)" 
```Zip the arguments together so we can retain the pairing during mxexpand```
| eval kws=mvzip(kw1,kw2)
| mvexpand kws
```Separate the args```
| eval kws=split(kws, ",")
| eval kw1=mvindex(kws,0), kw2=mvindex(kws,1)
```If the first argument is "append=&amp;lt;something&amp;gt;" then the lookup name is in the 2nd arg```
| eval lookup=if(match(kw1,"append=\w+"), kw2, kw1)
| dedup dashboard eai:acl.app eai:acl.owner lookup
| search NOT 
    ```Build a list of existing lookups to exclude from the results```
    [| rest /servicesNS/-/-/data/lookup-table-files 
    | fields title 
    | rename title as lookup 
    | append 
        [| rest /servicesNS/-/-/data/props/lookups 
        | fields transform 
        | rename transform as lookup ] 
    | dedup lookup 
    | format] 
| table dashboard eai:acl.app eai:acl.owner lookup&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 10 Jan 2023 20:29:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Is-there-any-way-to-track-deleted-lookup-files/m-p/626658#M15054</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2023-01-10T20:29:21Z</dc:date>
    </item>
  </channel>
</rss>

