<?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 TimeChart from 2 datasource. in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/TimeChart-from-2-datasource/m-p/152693#M42777</link>
    <description>&lt;P&gt;Hi&lt;BR /&gt;
I have 2 data source say DS1 and DS2.&lt;BR /&gt;
There is a common field called EMPID for this two data source.&lt;BR /&gt;
I want to generate a report based on below conditions.&lt;BR /&gt;
Want to get the time chart with average for all EMPID’s on Y axis and _time on X axis.&lt;BR /&gt;
average in my case is calculated based on below conditions.&lt;BR /&gt;
Average=sum(field1) from  DS1( dataource1)/sum(field2)from DS2(dataource2).&lt;BR /&gt;
I tried and generated up to below. But I don’t know how to get the desired result from this,&lt;BR /&gt;
Can anybody help me pls.&lt;/P&gt;

&lt;P&gt;host= DS1 |join EMPID [search host= DS2| eval " EMPID "=employer_id]| stats sum(field1) as TotalVisit, count(field2) as Count |eval Average=TotalVisit/Count| table field TotalVisit,Count,Average &lt;/P&gt;</description>
    <pubDate>Mon, 17 Feb 2014 07:03:35 GMT</pubDate>
    <dc:creator>SplunkBaby</dc:creator>
    <dc:date>2014-02-17T07:03:35Z</dc:date>
    <item>
      <title>TimeChart from 2 datasource.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/TimeChart-from-2-datasource/m-p/152693#M42777</link>
      <description>&lt;P&gt;Hi&lt;BR /&gt;
I have 2 data source say DS1 and DS2.&lt;BR /&gt;
There is a common field called EMPID for this two data source.&lt;BR /&gt;
I want to generate a report based on below conditions.&lt;BR /&gt;
Want to get the time chart with average for all EMPID’s on Y axis and _time on X axis.&lt;BR /&gt;
average in my case is calculated based on below conditions.&lt;BR /&gt;
Average=sum(field1) from  DS1( dataource1)/sum(field2)from DS2(dataource2).&lt;BR /&gt;
I tried and generated up to below. But I don’t know how to get the desired result from this,&lt;BR /&gt;
Can anybody help me pls.&lt;/P&gt;

&lt;P&gt;host= DS1 |join EMPID [search host= DS2| eval " EMPID "=employer_id]| stats sum(field1) as TotalVisit, count(field2) as Count |eval Average=TotalVisit/Count| table field TotalVisit,Count,Average &lt;/P&gt;</description>
      <pubDate>Mon, 17 Feb 2014 07:03:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/TimeChart-from-2-datasource/m-p/152693#M42777</guid>
      <dc:creator>SplunkBaby</dc:creator>
      <dc:date>2014-02-17T07:03:35Z</dc:date>
    </item>
    <item>
      <title>Re: TimeChart from 2 datasource.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/TimeChart-from-2-datasource/m-p/152694#M42778</link>
      <description>&lt;P&gt;At the moment your search does not really deal with the &lt;CODE&gt;_time&lt;/CODE&gt; element. And it also has a &lt;CODE&gt;join&lt;/CODE&gt;, which seems a bit unecessary. &lt;/P&gt;

&lt;P&gt;Have you considered making a &lt;CODE&gt;timechart&lt;/CODE&gt; without the join? &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your search for events | timechart span=1h sum(field1) as sum_1 sum(field_2) as sum_2 | eval ratio = sum_1/sum_2 | fields + ratio, _time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then select the "visualization" tab in the search results.&lt;/P&gt;

&lt;P&gt;/K&lt;/P&gt;</description>
      <pubDate>Mon, 17 Feb 2014 07:36:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/TimeChart-from-2-datasource/m-p/152694#M42778</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2014-02-17T07:36:54Z</dc:date>
    </item>
    <item>
      <title>Re: TimeChart from 2 datasource.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/TimeChart-from-2-datasource/m-p/152695#M42779</link>
      <description>&lt;P&gt;The purpose of join is to get the group of employee id's.&lt;BR /&gt;
Ex:&lt;BR /&gt;
for consider empid=10 present in both data source.&lt;BR /&gt;
In DS1 sum(field1) will be 20 and in DS2 sum(field2) is 10.&lt;BR /&gt;
I want to get the average for empid 10.&lt;BR /&gt;
Likewise I want to get the result for all employee Ids present in both DataSourcec in a single search.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Feb 2014 08:02:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/TimeChart-from-2-datasource/m-p/152695#M42779</guid>
      <dc:creator>SplunkBaby</dc:creator>
      <dc:date>2014-02-17T08:02:29Z</dc:date>
    </item>
  </channel>
</rss>

