<?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: Need splunk query to get alerts/saved searches/dashboards created by each index in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Need-splunk-query-to-get-alerts-saved-searches-dashboards/m-p/362633#M160575</link>
    <description>&lt;P&gt;Its not giving expected results.&lt;/P&gt;

&lt;P&gt;Would like to search for one index and for this index would like to know alerts, saved searches configured by using this index.&lt;/P&gt;</description>
    <pubDate>Fri, 23 Jun 2017 14:31:29 GMT</pubDate>
    <dc:creator>srinivasup</dc:creator>
    <dc:date>2017-06-23T14:31:29Z</dc:date>
    <item>
      <title>Need splunk query to get alerts/saved searches/dashboards created by each index</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-splunk-query-to-get-alerts-saved-searches-dashboards/m-p/362631#M160573</link>
      <description>&lt;P&gt;Can anyone help me to get all saved searches/alerts configured using particular index .&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jun 2017 13:15:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-splunk-query-to-get-alerts-saved-searches-dashboards/m-p/362631#M160573</guid>
      <dc:creator>srinivasup</dc:creator>
      <dc:date>2017-06-23T13:15:56Z</dc:date>
    </item>
    <item>
      <title>Re: Need splunk query to get alerts/saved searches/dashboards created by each index</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-splunk-query-to-get-alerts-saved-searches-dashboards/m-p/362632#M160574</link>
      <description>&lt;P&gt;This will do it BUT there is a problem:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rest /servicesNS/-/-/saved/searches 
| table search title
| rex max_match=0 field=search "(?&amp;lt;=^|\s|\[)index\s*=\s*(?&amp;lt;index&amp;gt;(?:\"[^\"]+\")|\S+)" 
| rex field=index mode=sed "s/\"//g"
| fillnull value="N/A" index
| stats values(title) BY index
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The problem is that it does not handle any cases where &lt;CODE&gt;index&lt;/CODE&gt; is not specified literally inside the search string.  These cases include: &lt;CODE&gt;|savedsearch&lt;/CODE&gt;, &lt;CODE&gt;|loadjob&lt;/CODE&gt;, &lt;CODE&gt;eventtypes&lt;/CODE&gt;, &lt;CODE&gt;macros&lt;/CODE&gt; &lt;CODE&gt;tags&lt;/CODE&gt;, the use of &lt;CODE&gt;Indexes searched by default&lt;/CODE&gt; (which may vary depending on &lt;CODE&gt;user&lt;/CODE&gt; and &lt;CODE&gt;role&lt;/CODE&gt;) and probably other things that I am missing.  Also note that &lt;CODE&gt;values&lt;/CODE&gt; (and &lt;CODE&gt;limit&lt;/CODE&gt;) are limited to a maximum of 1000 values.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jun 2017 13:52:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-splunk-query-to-get-alerts-saved-searches-dashboards/m-p/362632#M160574</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-06-23T13:52:14Z</dc:date>
    </item>
    <item>
      <title>Re: Need splunk query to get alerts/saved searches/dashboards created by each index</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-splunk-query-to-get-alerts-saved-searches-dashboards/m-p/362633#M160575</link>
      <description>&lt;P&gt;Its not giving expected results.&lt;/P&gt;

&lt;P&gt;Would like to search for one index and for this index would like to know alerts, saved searches configured by using this index.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jun 2017 14:31:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-splunk-query-to-get-alerts-saved-searches-dashboards/m-p/362633#M160575</guid>
      <dc:creator>srinivasup</dc:creator>
      <dc:date>2017-06-23T14:31:29Z</dc:date>
    </item>
    <item>
      <title>Re: Need splunk query to get alerts/saved searches/dashboards created by each index</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-splunk-query-to-get-alerts-saved-searches-dashboards/m-p/362634#M160576</link>
      <description>&lt;P&gt;You are right; I only did half the work; see the updated answer.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jun 2017 16:34:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-splunk-query-to-get-alerts-saved-searches-dashboards/m-p/362634#M160576</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-06-23T16:34:43Z</dc:date>
    </item>
  </channel>
</rss>

