<?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 How to search multiple sources within my search? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-multiple-sources-within-my-search/m-p/276623#M83440</link>
    <description>&lt;P&gt;How do I search multiple source files within my search? I want to do something like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source="/foo/bar/2016/09/{08,15}/*.avro"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source="/foo/bar/2016/09/[08-30]/*.avro"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;but neither syntax returns results.&lt;/P&gt;</description>
    <pubDate>Tue, 13 Sep 2016 22:12:15 GMT</pubDate>
    <dc:creator>andreacorrie</dc:creator>
    <dc:date>2016-09-13T22:12:15Z</dc:date>
    <item>
      <title>How to search multiple sources within my search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-multiple-sources-within-my-search/m-p/276623#M83440</link>
      <description>&lt;P&gt;How do I search multiple source files within my search? I want to do something like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source="/foo/bar/2016/09/{08,15}/*.avro"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source="/foo/bar/2016/09/[08-30]/*.avro"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;but neither syntax returns results.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2016 22:12:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-multiple-sources-within-my-search/m-p/276623#M83440</guid>
      <dc:creator>andreacorrie</dc:creator>
      <dc:date>2016-09-13T22:12:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to search multiple sources within my search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-multiple-sources-within-my-search/m-p/276624#M83441</link>
      <description>&lt;P&gt;You could do &lt;CODE&gt;source=*&lt;/CODE&gt; or you could do &lt;CODE&gt;source="/foo/bar/2016/09/{08,09}/*.avro" OR  source="/foo/bar/2016/09/[08-09]/*.avro"&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2016 22:15:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-multiple-sources-within-my-search/m-p/276624#M83441</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2016-09-13T22:15:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to search multiple sources within my search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-multiple-sources-within-my-search/m-p/276625#M83442</link>
      <description>&lt;P&gt;In my example, I want to search the 8th or the 9th. I'm using syntax you would use in Apache Pig to specify multiple days. Yes, I could use &lt;CODE&gt;source = source="/foo/bar/2016/09/08/*.avro OR source="/foo/bar/2016/09/09/*.avro&lt;/CODE&gt; but this doesn't scale if you want to search more than a couple days.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2016 22:19:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-multiple-sources-within-my-search/m-p/276625#M83442</guid>
      <dc:creator>andreacorrie</dc:creator>
      <dc:date>2016-09-13T22:19:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to search multiple sources within my search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-multiple-sources-within-my-search/m-p/276626#M83443</link>
      <description>&lt;P&gt;Ahh I see.. You want to have the ability to scale your searches relative to the date which is a dynamic value. Are the days in your source offset from the current day or do they match up to the current date? &lt;/P&gt;

&lt;P&gt;I'm assuming with this, you want to search the data from that source that is from Sept 8 and Spet 9th?&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;source="/foo/bar/2016/09/{08,09}/*.avro"&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2016 22:28:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-multiple-sources-within-my-search/m-p/276626#M83443</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2016-09-13T22:28:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to search multiple sources within my search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-multiple-sources-within-my-search/m-p/276627#M83444</link>
      <description>&lt;P&gt;In the example you are using, I would suggest extracting the _time variable from your path, and then restricting your query by time (e.g. using the graphical time range picker). There is more information here:&lt;BR /&gt;
&lt;A href="https://docs.splunk.com/Documentation/Hunk/6.4.3/Hunk/Virtualindexconfigurationvariables"&gt;https://docs.splunk.com/Documentation/Hunk/6.4.3/Hunk/Virtualindexconfigurationvariables&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;In particular, look at these properties:&lt;/P&gt;

&lt;P&gt;vix.input.[N].et.regex&lt;BR /&gt;
vix.input.[N].et.format&lt;BR /&gt;
vix.input.[N].lt.regex&lt;BR /&gt;
vix.input.[N].lt.format&lt;/P&gt;

&lt;P&gt;If you want to query on something other than time, you can extract additional variables from the path as well, using the property "vix.input.1.path". You can see some examples here:&lt;BR /&gt;
&lt;A href="https://docs.splunk.com/Documentation/Hunk/6.4.3/Hunk/Setupavirtualindex"&gt;https://docs.splunk.com/Documentation/Hunk/6.4.3/Hunk/Setupavirtualindex&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;That should simplify your queries somewhat, since you won't have to simultaneously specify the values you're looking for, and where to find them in the path.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2016 22:57:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-multiple-sources-within-my-search/m-p/276627#M83444</guid>
      <dc:creator>kschon_splunk</dc:creator>
      <dc:date>2016-09-13T22:57:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to search multiple sources within my search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-multiple-sources-within-my-search/m-p/276628#M83445</link>
      <description>&lt;P&gt;try this..&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/1832iCF8CCF35D9782128/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2016 06:30:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-multiple-sources-within-my-search/m-p/276628#M83445</guid>
      <dc:creator>pasokkum</dc:creator>
      <dc:date>2016-09-19T06:30:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to search multiple sources within my search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-multiple-sources-within-my-search/m-p/276629#M83446</link>
      <description>&lt;P&gt;This will work but again, it doesn't scale for more than a few days. I'm looking for a solution that I can search 30 days, for example. &lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2016 20:26:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-multiple-sources-within-my-search/m-p/276629#M83446</guid>
      <dc:creator>andreacorrie</dc:creator>
      <dc:date>2016-09-19T20:26:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to search multiple sources within my search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-multiple-sources-within-my-search/m-p/276630#M83447</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;base search | regex source="\/\d{2}\/(0[8-9]|1[0-5])\/"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 19 Sep 2016 20:58:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-multiple-sources-within-my-search/m-p/276630#M83447</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-09-19T20:58:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to search multiple sources within my search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-multiple-sources-within-my-search/m-p/276631#M83448</link>
      <description>&lt;P&gt;This should work&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=foo sourcetype=bar [| gentimes start=-1 | eval t=mvrange(8,30+1) | table t | mvexpand t | eval source="/foo/bar/2016/09/".substr("0".t,-2) | table source] | .... rest of the search
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The subsearch is generating a series of sources from "/foo/bar/2016/09/08" to "/foo/bar/2016/09/30" in a giant OR statement ( source="/foo/bar/2016/09/08" OR source="/foo/bar/2016/09/09"...OR  "/foo/bar/2016/09/30")&lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2016 21:08:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-multiple-sources-within-my-search/m-p/276631#M83448</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-09-19T21:08:48Z</dc:date>
    </item>
  </channel>
</rss>

