<?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 generate a output bases on a common value from two different events in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-generate-a-output-bases-on-a-common-value-from-two/m-p/632780#M219817</link>
    <description>&lt;P&gt;Rename the fields so that they have the same name, you can then do stats using the by clause to gather values from the two events together.&lt;/P&gt;</description>
    <pubDate>Wed, 01 Mar 2023 14:35:08 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2023-03-01T14:35:08Z</dc:date>
    <item>
      <title>How to generate a output bases on a common value from two different events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-generate-a-output-bases-on-a-common-value-from-two/m-p/632773#M219814</link>
      <description>&lt;P&gt;we have two separate events which have a common field x-provider-api-correlation-id .&lt;BR /&gt;&lt;BR /&gt;In 1st event it is coming as part of HTTP response header and in second api it is coming as part of Http Request Header.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;My requirement is to extract&amp;nbsp; start time (_time-(time_to_serve_request/1000), endtime which is _time from these two separate events&amp;nbsp; based of x-provider-api-correlation-id which is having same value .&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2023 20:27:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-generate-a-output-bases-on-a-common-value-from-two/m-p/632773#M219814</guid>
      <dc:creator>xp001975</dc:creator>
      <dc:date>2023-03-08T20:27:24Z</dc:date>
    </item>
    <item>
      <title>Re: how to generate a output bases on a common value from two different events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-generate-a-output-bases-on-a-common-value-from-two/m-p/632780#M219817</link>
      <description>&lt;P&gt;Rename the fields so that they have the same name, you can then do stats using the by clause to gather values from the two events together.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2023 14:35:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-generate-a-output-bases-on-a-common-value-from-two/m-p/632780#M219817</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-03-01T14:35:08Z</dc:date>
    </item>
    <item>
      <title>Re: how to generate a output bases on a common value from two different events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-generate-a-output-bases-on-a-common-value-from-two/m-p/633475#M220049</link>
      <description>&lt;P&gt;Not clearly able to understand "&lt;SPAN&gt;&lt;STRONG&gt;Rename the fields so that they have the same name&lt;/STRONG&gt;" in particular&lt;/SPAN&gt;. Is my Splunk query&amp;nbsp;looks correct like you&amp;nbsp; suggested in previous response.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2023 19:58:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-generate-a-output-bases-on-a-common-value-from-two/m-p/633475#M220049</guid>
      <dc:creator>xp001975</dc:creator>
      <dc:date>2023-03-06T19:58:20Z</dc:date>
    </item>
    <item>
      <title>Re: how to generate a output bases on a common value from two different events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-generate-a-output-bases-on-a-common-value-from-two/m-p/633513#M220056</link>
      <description>&lt;P&gt;Note that field names are case-sensitive and it is best to avoid special characters in field names.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rename response_http_headers{}.x-provider-api-correlation-id as x_provider_api_correlation_id
| rename request_http_headers{}.X-Provider-API-Correlation-Id as  x_provider_api_correlation_id
| stats values(*) as * by x_provider_api_correlation_id&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 06 Mar 2023 23:52:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-generate-a-output-bases-on-a-common-value-from-two/m-p/633513#M220056</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-03-06T23:52:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate a output bases on a common value from two different events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-generate-a-output-bases-on-a-common-value-from-two/m-p/633614#M220072</link>
      <description>&lt;P&gt;deleted the message&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2023 22:25:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-generate-a-output-bases-on-a-common-value-from-two/m-p/633614#M220072</guid>
      <dc:creator>xp001975</dc:creator>
      <dc:date>2023-03-07T22:25:24Z</dc:date>
    </item>
    <item>
      <title>Re: how to generate a output bases on a common value from two different events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-generate-a-output-bases-on-a-common-value-from-two/m-p/633621#M220075</link>
      <description>&lt;P&gt;All data looks good&amp;nbsp; except&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;rename _time as EToAvaTime | fieldformat EToAvaTime=strftime(EToAvaTime, "%F %T.%Q")&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;is not giving&amp;nbsp;YYYY-MM-DD HH:MM:SS.MilliSec format .&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;coming as&amp;nbsp;&lt;FONT color="#800000"&gt;1677704096.378&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="xp001975_0-1678211868698.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/24232iAA09CF292BA44E83/image-size/medium?v=v2&amp;amp;px=400" role="button" title="xp001975_0-1678211868698.png" alt="xp001975_0-1678211868698.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2023 22:26:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-generate-a-output-bases-on-a-common-value-from-two/m-p/633621#M220075</guid>
      <dc:creator>xp001975</dc:creator>
      <dc:date>2023-03-07T22:26:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate a output bases on a common value from two different events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-generate-a-output-bases-on-a-common-value-from-two/m-p/633622#M220076</link>
      <description>&lt;P&gt;Fieldformat does not apply to the subsearch - try this way&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=apic* app_name=Inter
| eval Starttime=strftime(_time-(time_to_serve_request/1000), "%F %T.%Q")
| table Starttime _time response_http_headers{}.x-provider-api-correlation-id time_to_serve_request status_code
| rename _time as ESLToInterTime | fieldformat ESLToInterTime=strftime(ESLToInterTime, "%F %T.%Q")
| rename Starttime as InterToESLTime
| join X-Provider-API-Correlation-Id [ search index=apic* app_name=Ava
| eval Starttime=strftime(_time-(time_to_serve_request/1000), "%F %T.%Q")
| table Starttime _time request_http_headers{}.X-Provider-API-Correlation-Id time_to_serve_request status_code
| rename _time as ESLToAvaTime 
| rename Starttime as AvaTOESLTime ]
| fieldformat ESLToAvaTime=strftime(ESLToAvaTime, "%F %T.%Q")&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 07 Mar 2023 18:06:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-generate-a-output-bases-on-a-common-value-from-two/m-p/633622#M220076</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-03-07T18:06:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate a output bases on a common value from two different events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-generate-a-output-bases-on-a-common-value-from-two/m-p/633651#M220091</link>
      <description>&lt;P&gt;Thanks ITWhisperer ! That works .&lt;BR /&gt;&lt;BR /&gt;Is there a way we can join two different indexes , earlier&amp;nbsp; case is same index .&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2023 22:29:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-generate-a-output-bases-on-a-common-value-from-two/m-p/633651#M220091</guid>
      <dc:creator>xp001975</dc:creator>
      <dc:date>2023-03-07T22:29:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate a output bases on a common value from two different events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-generate-a-output-bases-on-a-common-value-from-two/m-p/633677#M220101</link>
      <description>&lt;P&gt;A join will join the current events in the pipeline (from the first search) with the events from the subsearch. These searches are independent of each other and can be resolved using different indexes.&lt;/P&gt;&lt;P&gt;Similarly, you can use stats to gather events which can from different indexes in the same initial search.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(index=a sourcetype=b) OR (index=x sourcetype=y)
| rename fieldA as commonfieldname
| rename fieldX as commonfieldname
| stats values(*) as * by commonfieldname&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2023 07:04:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-generate-a-output-bases-on-a-common-value-from-two/m-p/633677#M220101</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-03-08T07:04:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate a output bases on a common value from two different events?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-generate-a-output-bases-on-a-common-value-from-two/m-p/634625#M220477</link>
      <description>&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;eip-microservice-metric&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;{"path":"/request","method":"POST","status":"200 OK","consCorrId":null,"apiTransId":"139efc926411fa1536b2488f","appName":null,"&lt;STRONG&gt;start&lt;/STRONG&gt;":"2023-03-15T13:02:13.596-0400","&lt;STRONG&gt;end&lt;/STRONG&gt;":"2023-03-15T13:02:13.992-0400","tTime":396,"aTime":1,"fTime":395,"e":null,"addl":{"X-Correlation-Id":"d7-7c455c12ac15","X-Provider-Correlation-Id":"586752.393268","X-Provider-API-Correlation-Id":"9176536b2488f"},"pMetrics":[{"provider":"API","function":"invokeXXXX","time":395,"e":null}],}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;How to extract&amp;nbsp;start and end from this&amp;nbsp;&lt;SPAN class=""&gt;&lt;U&gt;&lt;STRONG&gt;eip-microservice-metric&lt;/STRONG&gt;&lt;/U&gt;&amp;nbsp;?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2023 17:10:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-generate-a-output-bases-on-a-common-value-from-two/m-p/634625#M220477</guid>
      <dc:creator>xp001975</dc:creator>
      <dc:date>2023-03-15T17:10:59Z</dc:date>
    </item>
  </channel>
</rss>

