<?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 edit my search to match indexes ending with a set of values? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-match-indexes-ending-with-a-set-of/m-p/371160#M109233</link>
    <description>&lt;P&gt;create a macro maybe?&lt;BR /&gt;
(index = stuff-xxx OR index = stuff-yyy OR index = stuff-zzz OR index = stuff-xyz)&lt;BR /&gt;
save it and name it as you please.&lt;BR /&gt;
now search myMacro ... rest of search&lt;BR /&gt;
docs article here:&lt;BR /&gt;
&lt;A href="https://docs.splunk.com/Documentation/SplunkCloud/6.6.0/Knowledge/Definesearchmacros"&gt;https://docs.splunk.com/Documentation/SplunkCloud/6.6.0/Knowledge/Definesearchmacros&lt;/A&gt;&lt;BR /&gt;
hope it helps&lt;/P&gt;</description>
    <pubDate>Mon, 26 Jun 2017 20:07:34 GMT</pubDate>
    <dc:creator>adonio</dc:creator>
    <dc:date>2017-06-26T20:07:34Z</dc:date>
    <item>
      <title>How to edit my search to match indexes ending with a set of values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-match-indexes-ending-with-a-set-of/m-p/371159#M109232</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;I have a search that needs to search in several indexes ending with several words, ex:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=stuff-xxx or index=stuff-yyy or index=stuff-zzz ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;but these xxx, yyy and zzz 'words' are more than 20 and counting, so is there a way to do something like this?:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=stuff-(xxx|yyy|zzz)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Note: do not suggest a star/asterisk wildcard, I need to ignore everything else, I don't need indexes like stuff-aaa.&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2017 19:29:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-match-indexes-ending-with-a-set-of/m-p/371159#M109232</guid>
      <dc:creator>ribeiror</dc:creator>
      <dc:date>2017-06-26T19:29:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to match indexes ending with a set of values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-match-indexes-ending-with-a-set-of/m-p/371160#M109233</link>
      <description>&lt;P&gt;create a macro maybe?&lt;BR /&gt;
(index = stuff-xxx OR index = stuff-yyy OR index = stuff-zzz OR index = stuff-xyz)&lt;BR /&gt;
save it and name it as you please.&lt;BR /&gt;
now search myMacro ... rest of search&lt;BR /&gt;
docs article here:&lt;BR /&gt;
&lt;A href="https://docs.splunk.com/Documentation/SplunkCloud/6.6.0/Knowledge/Definesearchmacros"&gt;https://docs.splunk.com/Documentation/SplunkCloud/6.6.0/Knowledge/Definesearchmacros&lt;/A&gt;&lt;BR /&gt;
hope it helps&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2017 20:07:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-match-indexes-ending-with-a-set-of/m-p/371160#M109233</guid>
      <dc:creator>adonio</dc:creator>
      <dc:date>2017-06-26T20:07:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to match indexes ending with a set of values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-match-indexes-ending-with-a-set-of/m-p/371161#M109234</link>
      <description>&lt;P&gt;Try like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[| gentimes start=-1 | eval index="xxx yyy zzz ppp qqq...all other separated by space" | table index | makemv index | mxpand index | eval index="stuff-".index ] ...rest of the search
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The subsearch will dynamically generate that OR list for you, so you just need to add the keyword in the &lt;CODE&gt;eval index="xxx...&lt;/CODE&gt; part.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2017 20:08:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-match-indexes-ending-with-a-set-of/m-p/371161#M109234</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-06-26T20:08:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to match indexes ending with a set of values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-match-indexes-ending-with-a-set-of/m-p/371162#M109235</link>
      <description>&lt;P&gt;Yes, this way i can use the macro in several reports and stuff..&lt;BR /&gt;
Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jun 2017 16:37:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-match-indexes-ending-with-a-set-of/m-p/371162#M109235</guid>
      <dc:creator>ribeiror</dc:creator>
      <dc:date>2017-06-30T16:37:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to match indexes ending with a set of values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-match-indexes-ending-with-a-set-of/m-p/371163#M109236</link>
      <description>&lt;P&gt;Try this &lt;/P&gt;

&lt;P&gt;eventtypes.conf&lt;/P&gt;

&lt;P&gt;[stuff_index]&lt;BR /&gt;
search = index=stuff-xxx OR index=stuff-yyy ...&lt;/P&gt;

&lt;P&gt;Search query :&lt;BR /&gt;
eventtype="stuff_index"  .....&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jun 2017 16:47:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-match-indexes-ending-with-a-set-of/m-p/371163#M109236</guid>
      <dc:creator>sbbadri</dc:creator>
      <dc:date>2017-06-30T16:47:38Z</dc:date>
    </item>
  </channel>
</rss>

