<?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 search for multiple fields in a source files? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-search-for-multiple-fields-in-a-source-files/m-p/154060#M31325</link>
    <description>&lt;P&gt;Hi thanks for the response, what I'm trying to do is look through a lot of source files so I can't exactly type in all of the names of the file, it there a way to scan all source files in the index?&lt;/P&gt;</description>
    <pubDate>Wed, 22 Apr 2015 16:40:10 GMT</pubDate>
    <dc:creator>npestana88</dc:creator>
    <dc:date>2015-04-22T16:40:10Z</dc:date>
    <item>
      <title>How to search for multiple fields in a source files?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-search-for-multiple-fields-in-a-source-files/m-p/154058#M31323</link>
      <description>&lt;P&gt;So I have a set of source files that list different fields as separate events and I would like to search for source files that have the specified field values. However when I search for multiple fields (eg. diameter=30 AND temp=77) it doesn't return any results since the fields are contained in different events. Is there a way around it? All I need are the names of the source files.&lt;BR /&gt;
Sorry if this is an obvious question, I'm still new at this&lt;/P&gt;</description>
      <pubDate>Wed, 22 Apr 2015 16:01:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-search-for-multiple-fields-in-a-source-files/m-p/154058#M31323</guid>
      <dc:creator>npestana88</dc:creator>
      <dc:date>2015-04-22T16:01:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to search for multiple fields in a source files?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-search-for-multiple-fields-in-a-source-files/m-p/154059#M31324</link>
      <description>&lt;P&gt;Hello! Try.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;.....source=firstsourcefile OR source=secondsourcefile (diameter=30 AND temp=77)|......
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 22 Apr 2015 16:18:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-search-for-multiple-fields-in-a-source-files/m-p/154059#M31324</guid>
      <dc:creator>stephanefotso</dc:creator>
      <dc:date>2015-04-22T16:18:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to search for multiple fields in a source files?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-search-for-multiple-fields-in-a-source-files/m-p/154060#M31325</link>
      <description>&lt;P&gt;Hi thanks for the response, what I'm trying to do is look through a lot of source files so I can't exactly type in all of the names of the file, it there a way to scan all source files in the index?&lt;/P&gt;</description>
      <pubDate>Wed, 22 Apr 2015 16:40:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-search-for-multiple-fields-in-a-source-files/m-p/154060#M31325</guid>
      <dc:creator>npestana88</dc:creator>
      <dc:date>2015-04-22T16:40:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to search for multiple fields in a source files?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-search-for-multiple-fields-in-a-source-files/m-p/154061#M31326</link>
      <description>&lt;P&gt;ok let suppose that your souce name is &lt;STRONG&gt;mysource/poooo/jjjjjjj/yyyyyyy/............./&lt;/STRONG&gt; or &lt;STRONG&gt;yyyyyyyyyy/second/........&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;you can use the star(*) symbol to match any caracter in your source field. Something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source=mysource* OR source=*second* (diameter=30 AND temp=77)|...
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 22 Apr 2015 17:10:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-search-for-multiple-fields-in-a-source-files/m-p/154061#M31326</guid>
      <dc:creator>stephanefotso</dc:creator>
      <dc:date>2015-04-22T17:10:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to search for multiple fields in a source files?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-search-for-multiple-fields-in-a-source-files/m-p/154062#M31327</link>
      <description>&lt;P&gt;To paraphrase, it sounds like you're trying to search for particular events to generate a list of sources. From this curated list, search for a different type of events, right?&lt;/P&gt;

&lt;P&gt;If so, make yourself familiar with sub-searches:&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Search/Aboutsubsearches"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Search/Aboutsubsearches&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Also, what precisely are you trying to look for that should belong to the first group of sources vs. what should be found from the other?&lt;/P&gt;

&lt;P&gt;Your structure would basically look like this:&lt;/P&gt;

&lt;P&gt;Subsearch query for the events:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;source= diameter=X&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;Filter this to specifically the sources:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;source= diameter=X | fields&lt;BR /&gt;
source&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;Insert into a different search, which includes the other field:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;( [search source= diameter=X&lt;BR /&gt;
| fields source ]) temp=Y&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;Now you have all events that fit &lt;EM&gt;temp=Y&lt;/EM&gt; but only if that source has events that match &lt;EM&gt;diameter=X&lt;/EM&gt;. Let me know if that works!&lt;/P&gt;</description>
      <pubDate>Wed, 22 Apr 2015 22:37:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-search-for-multiple-fields-in-a-source-files/m-p/154062#M31327</guid>
      <dc:creator>hcbomb</dc:creator>
      <dc:date>2015-04-22T22:37:25Z</dc:date>
    </item>
  </channel>
</rss>

