<?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: multiple searches in multiple sourcetypes resulting in a single chart in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/multiple-searches-in-multiple-sourcetypes-resulting-in-a-single/m-p/202454#M176273</link>
    <description>&lt;P&gt;I am not sure how befitting it is in your scenario but if Idea is just to avoid writing OR(s) between 50 patterns to search then can you try this:&lt;/P&gt;

&lt;P&gt;1) Make a csv file of all your pattern and upload it as a lookup say &lt;CODE&gt;patterns.csv&lt;/CODE&gt; which has fieldname (say) &lt;CODE&gt;PatternField&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;PatternField
Login status is
Account details flow for Apple Phone for user Id
Payment status and
Account details flow for Android Phone for user Id
finger print status of User id
Transfer account status
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;After that use the below query to complete your search by replacing your sourcetype names for "A", "B", "C" and so on:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;sourcetype=A OR sourcetype=B OR sourcetype=C ([|inputlookup patterns.csv | fields PatternField | return 50 $PatternField ] )&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
    <pubDate>Mon, 07 Nov 2016 08:22:02 GMT</pubDate>
    <dc:creator>gokadroid</dc:creator>
    <dc:date>2016-11-07T08:22:02Z</dc:date>
    <item>
      <title>multiple searches in multiple sourcetypes resulting in a single chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/multiple-searches-in-multiple-sourcetypes-resulting-in-a-single/m-p/202453#M176272</link>
      <description>&lt;P&gt;Below are the few patterns that I wanted to search from multiple sourcetypes and get the count. I have around 50 patterns. &lt;BR /&gt;
Is the only way to write OR in between each search and get the counts in a single chart or is there any other better way.&lt;/P&gt;

&lt;P&gt;Login status is&lt;BR /&gt;
Account details flow for Apple Phone for user Id XXXXXX&lt;BR /&gt;
Payment status and XXXXX YYYYYYY &lt;BR /&gt;
Account details flow for Android Phone for user Id XXXXXX&lt;BR /&gt;
finger print status of User id YYYYY&lt;BR /&gt;
Transfer account status ZZZZZZ AAAAAA&lt;/P&gt;</description>
      <pubDate>Wed, 02 Nov 2016 04:24:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/multiple-searches-in-multiple-sourcetypes-resulting-in-a-single/m-p/202453#M176272</guid>
      <dc:creator>sailey</dc:creator>
      <dc:date>2016-11-02T04:24:15Z</dc:date>
    </item>
    <item>
      <title>Re: multiple searches in multiple sourcetypes resulting in a single chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/multiple-searches-in-multiple-sourcetypes-resulting-in-a-single/m-p/202454#M176273</link>
      <description>&lt;P&gt;I am not sure how befitting it is in your scenario but if Idea is just to avoid writing OR(s) between 50 patterns to search then can you try this:&lt;/P&gt;

&lt;P&gt;1) Make a csv file of all your pattern and upload it as a lookup say &lt;CODE&gt;patterns.csv&lt;/CODE&gt; which has fieldname (say) &lt;CODE&gt;PatternField&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;PatternField
Login status is
Account details flow for Apple Phone for user Id
Payment status and
Account details flow for Android Phone for user Id
finger print status of User id
Transfer account status
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;After that use the below query to complete your search by replacing your sourcetype names for "A", "B", "C" and so on:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;sourcetype=A OR sourcetype=B OR sourcetype=C ([|inputlookup patterns.csv | fields PatternField | return 50 $PatternField ] )&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Nov 2016 08:22:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/multiple-searches-in-multiple-sourcetypes-resulting-in-a-single/m-p/202454#M176273</guid>
      <dc:creator>gokadroid</dc:creator>
      <dc:date>2016-11-07T08:22:02Z</dc:date>
    </item>
  </channel>
</rss>

