<?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 map an matching result from 1 query to another in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-map-an-matching-result-from-1-query-to-another/m-p/203521#M187633</link>
    <description>&lt;P&gt;Please help me in this query.&lt;BR /&gt;
--I have a query which produces result like&lt;BR /&gt;
uid  user   ip&lt;BR /&gt;
1001 xyz  1.1.1.1&lt;BR /&gt;
1002  abc  1.1.1.1&lt;BR /&gt;
--another query which returns&lt;BR /&gt;
ip              logintime   loginLength&lt;BR /&gt;
xyz        10:00           180&lt;BR /&gt;
abc        15:00           280&lt;/P&gt;

&lt;P&gt;=&amp;gt;how can i combine the result like&lt;BR /&gt;
 uid loginlength&lt;BR /&gt;
1001 180&lt;BR /&gt;
1002 280&lt;/P&gt;

&lt;P&gt;Thanks !&lt;/P&gt;</description>
    <pubDate>Mon, 15 Feb 2016 06:16:25 GMT</pubDate>
    <dc:creator>saimack</dc:creator>
    <dc:date>2016-02-15T06:16:25Z</dc:date>
    <item>
      <title>How to map an matching result from 1 query to another</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-map-an-matching-result-from-1-query-to-another/m-p/203521#M187633</link>
      <description>&lt;P&gt;Please help me in this query.&lt;BR /&gt;
--I have a query which produces result like&lt;BR /&gt;
uid  user   ip&lt;BR /&gt;
1001 xyz  1.1.1.1&lt;BR /&gt;
1002  abc  1.1.1.1&lt;BR /&gt;
--another query which returns&lt;BR /&gt;
ip              logintime   loginLength&lt;BR /&gt;
xyz        10:00           180&lt;BR /&gt;
abc        15:00           280&lt;/P&gt;

&lt;P&gt;=&amp;gt;how can i combine the result like&lt;BR /&gt;
 uid loginlength&lt;BR /&gt;
1001 180&lt;BR /&gt;
1002 280&lt;/P&gt;

&lt;P&gt;Thanks !&lt;/P&gt;</description>
      <pubDate>Mon, 15 Feb 2016 06:16:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-map-an-matching-result-from-1-query-to-another/m-p/203521#M187633</guid>
      <dc:creator>saimack</dc:creator>
      <dc:date>2016-02-15T06:16:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to map an matching result from 1 query to another</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-map-an-matching-result-from-1-query-to-another/m-p/203522#M187634</link>
      <description>&lt;P&gt;Without knowing your searches, the suggestion would be this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your first search giving uid, user, ip | append [ your second search  giving ip logintime loginLength ]  | stats values(loginLength) as loginLenght by uid
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;There may be an option to avoid subsearch, but we can see unless we see your actual searches.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Feb 2016 17:02:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-map-an-matching-result-from-1-query-to-another/m-p/203522#M187634</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-02-15T17:02:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to map an matching result from 1 query to another</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-map-an-matching-result-from-1-query-to-another/m-p/203523#M187635</link>
      <description>&lt;P&gt;It would be a great help if you posted your searches.  Also check out  this handy guide on event correlation:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.3.2/Search/Abouteventcorrelation"&gt;http://docs.splunk.com/Documentation/Splunk/6.3.2/Search/Abouteventcorrelation&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Feb 2016 17:49:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-map-an-matching-result-from-1-query-to-another/m-p/203523#M187635</guid>
      <dc:creator>jplumsdaine22</dc:creator>
      <dc:date>2016-02-15T17:49:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to map an matching result from 1 query to another</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-map-an-matching-result-from-1-query-to-another/m-p/203524#M187636</link>
      <description>&lt;P&gt;first get the first query data i.e &lt;STRONG&gt;uid and user&lt;/STRONG&gt; as &lt;STRONG&gt;index=your_index_name  | stats count by uid user&lt;/STRONG&gt;&lt;BR /&gt;
 then map it with second query as &lt;STRONG&gt;| map search="search index=your_index_name &lt;BR /&gt;
ip=$user$&lt;/STRONG&gt; and then display as &lt;STRONG&gt;| stats first(loginLength) as $uid$&lt;/STRONG&gt; &lt;/P&gt;

&lt;P&gt;final query is&lt;BR /&gt;
*&lt;EM&gt;**index=your_index_name  | stats count by uid user&lt;BR /&gt;
| map search="search index=your_index_name &lt;BR /&gt;
ip=$user$ | stats first(loginLength) as $uid$&lt;/EM&gt;* | transpose"**&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 09:14:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-map-an-matching-result-from-1-query-to-another/m-p/203524#M187636</guid>
      <dc:creator>raghu_vedic</dc:creator>
      <dc:date>2020-09-29T09:14:42Z</dc:date>
    </item>
  </channel>
</rss>

