<?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 run same search for different source files? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-run-same-search-for-different-source-files/m-p/117815#M31389</link>
    <description>&lt;P&gt;Hi Team,&lt;/P&gt;

&lt;P&gt;Again an urgent requirement. I have got a couple csv files with source name &lt;CODE&gt;c:\\budapest.csv&lt;/CODE&gt;, &lt;CODE&gt;c:\\singapore.csv&lt;/CODE&gt;, &lt;CODE&gt;c:\\germany.csv&lt;/CODE&gt; etc&lt;/P&gt;

&lt;P&gt;All I wantt is some stats sorted with country and run the same search on all other files.&lt;/P&gt;

&lt;P&gt;Right now I have a searcj where I am appending each and every source file with the same search which is becoming bigger as I add more subsearches:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source="C:\\Budapest Router1full.csv" host="SEZ00VVM-153"   sourcetype="csv" date_wday!=saturday AND date_wday!=sunday|  rex field=source "(?&amp;amp;lt;country&amp;amp;gt;.*?)$"| lookup datacentre.csv country OUTPUT start_hour end_hour receivebandwidth sitename |where date_hour&amp;amp;gt;=start_hour AND date_hour&amp;amp;lt;= end_hour|eval Intraffic=IN/1048576 |bin _time span=1mon| stats values(receivebandwidth) as maxin ,perc95(Intraffic) AS Percentile by _time   |eval total=Percentile/maxin*100|timechart span=1d values(total)   As Budapest(total%)|append[search source="C:\\Adelaide full.csv" date_wday!=saturday AND date_wday!=sunday|  rex field=source "(?&amp;amp;lt;country&amp;amp;gt;.*?)$"| lookup datacentre.csv country OUTPUT start_hour end_hour receivebandwidth sitename |where date_hour&amp;amp;gt;=start_hour AND date_hour&amp;amp;lt;= end_hour|eval Intraffic=IN/1048576 |bin _time span=1d| stats values(receivebandwidth) as maxin ,perc95(Intraffic) AS Percentile by _time   |eval total=Percentile/maxin*100|timechart span=1d values(total)   As Adelaide(total%)]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Please help&lt;/P&gt;

&lt;P&gt;Thanks ,&lt;BR /&gt;
Deepthi &lt;/P&gt;</description>
    <pubDate>Mon, 13 Jul 2015 11:43:39 GMT</pubDate>
    <dc:creator>deepthi5</dc:creator>
    <dc:date>2015-07-13T11:43:39Z</dc:date>
    <item>
      <title>How to run same search for different source files?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-run-same-search-for-different-source-files/m-p/117815#M31389</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;

&lt;P&gt;Again an urgent requirement. I have got a couple csv files with source name &lt;CODE&gt;c:\\budapest.csv&lt;/CODE&gt;, &lt;CODE&gt;c:\\singapore.csv&lt;/CODE&gt;, &lt;CODE&gt;c:\\germany.csv&lt;/CODE&gt; etc&lt;/P&gt;

&lt;P&gt;All I wantt is some stats sorted with country and run the same search on all other files.&lt;/P&gt;

&lt;P&gt;Right now I have a searcj where I am appending each and every source file with the same search which is becoming bigger as I add more subsearches:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source="C:\\Budapest Router1full.csv" host="SEZ00VVM-153"   sourcetype="csv" date_wday!=saturday AND date_wday!=sunday|  rex field=source "(?&amp;amp;lt;country&amp;amp;gt;.*?)$"| lookup datacentre.csv country OUTPUT start_hour end_hour receivebandwidth sitename |where date_hour&amp;amp;gt;=start_hour AND date_hour&amp;amp;lt;= end_hour|eval Intraffic=IN/1048576 |bin _time span=1mon| stats values(receivebandwidth) as maxin ,perc95(Intraffic) AS Percentile by _time   |eval total=Percentile/maxin*100|timechart span=1d values(total)   As Budapest(total%)|append[search source="C:\\Adelaide full.csv" date_wday!=saturday AND date_wday!=sunday|  rex field=source "(?&amp;amp;lt;country&amp;amp;gt;.*?)$"| lookup datacentre.csv country OUTPUT start_hour end_hour receivebandwidth sitename |where date_hour&amp;amp;gt;=start_hour AND date_hour&amp;amp;lt;= end_hour|eval Intraffic=IN/1048576 |bin _time span=1d| stats values(receivebandwidth) as maxin ,perc95(Intraffic) AS Percentile by _time   |eval total=Percentile/maxin*100|timechart span=1d values(total)   As Adelaide(total%)]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Please help&lt;/P&gt;

&lt;P&gt;Thanks ,&lt;BR /&gt;
Deepthi &lt;/P&gt;</description>
      <pubDate>Mon, 13 Jul 2015 11:43:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-run-same-search-for-different-source-files/m-p/117815#M31389</guid>
      <dc:creator>deepthi5</dc:creator>
      <dc:date>2015-07-13T11:43:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to run same search for different source files?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-run-same-search-for-different-source-files/m-p/117816#M31390</link>
      <description>&lt;P&gt;To use same query for different sources:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; source=budapest.csv OR source=singapore.csv OR source=germany.csv | *your search...*
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 13 Jul 2015 13:37:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-run-same-search-for-different-source-files/m-p/117816#M31390</guid>
      <dc:creator>HeinzWaescher</dc:creator>
      <dc:date>2015-07-13T13:37:13Z</dc:date>
    </item>
  </channel>
</rss>

