<?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 Combine Events with matching data in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-Combine-Events-with-matching-data/m-p/669236#M229544</link>
    <description>&lt;LI-CODE lang="markup"&gt;message=* OR city=*
| eval Field2=coalesce(Field2, FieldA)
| stats values(*) as * by Field2
| where isnotnul(Field1)&lt;/LI-CODE&gt;</description>
    <pubDate>Mon, 20 Nov 2023 18:08:39 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2023-11-20T18:08:39Z</dc:date>
    <item>
      <title>How to Combine Events with matching data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-Combine-Events-with-matching-data/m-p/669229#M229542</link>
      <description>&lt;P&gt;Hi, I have a union'ed search where I am wanting to link different events based on fields that have matching values.&lt;BR /&gt;My search looks like this:&lt;BR /&gt;| union&lt;BR /&gt;[search message=*&lt;BR /&gt;| spath Field1&lt;BR /&gt;| spath Field2]&lt;BR /&gt;[search city=*&lt;BR /&gt;| spath FieldA&amp;nbsp;&lt;BR /&gt;| spath FieldB]&lt;BR /&gt;| table Field1 Field2 FieldA FieldB&lt;/P&gt;&lt;P&gt;My current output looks like this:&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="25%"&gt;Field1&lt;/TD&gt;&lt;TD width="25%"&gt;Field2&lt;/TD&gt;&lt;TD width="25%"&gt;FieldA&lt;/TD&gt;&lt;TD width="25%"&gt;FieldB&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%"&gt;John&lt;/TD&gt;&lt;TD width="25%"&gt;Blue&lt;/TD&gt;&lt;TD width="25%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="25%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="25%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="25%"&gt;Blue&lt;/TD&gt;&lt;TD width="25%"&gt;Ohio&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="25%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="25%"&gt;Yellow&lt;/TD&gt;&lt;TD width="25%"&gt;Wyoming&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However I need a way to link Field1 to FieldB if Field2=FieldA, where the output would look something like this:&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="25%"&gt;Field1&lt;/TD&gt;&lt;TD width="25%"&gt;Field2&lt;/TD&gt;&lt;TD width="25%"&gt;FieldA&lt;/TD&gt;&lt;TD width="25%"&gt;FieldB&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%"&gt;John&lt;/TD&gt;&lt;TD width="25%"&gt;Blue&lt;/TD&gt;&lt;TD width="25%"&gt;Blue&lt;/TD&gt;&lt;TD width="25%"&gt;Ohio&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="25%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="25%"&gt;Yellow&lt;/TD&gt;&lt;TD width="25%"&gt;Wyoming&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;If there is a way to do something like this, please let me know, even if I need to create new fields. The excess FieldA and FieldB are unimportant if there is not a matching Field2.&amp;nbsp;&lt;/P&gt;&lt;P&gt;please help, please&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2023 17:36:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-Combine-Events-with-matching-data/m-p/669229#M229542</guid>
      <dc:creator>BlueWombat45</dc:creator>
      <dc:date>2023-11-20T17:36:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to Combine Events with matching data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-Combine-Events-with-matching-data/m-p/669236#M229544</link>
      <description>&lt;LI-CODE lang="markup"&gt;message=* OR city=*
| eval Field2=coalesce(Field2, FieldA)
| stats values(*) as * by Field2
| where isnotnul(Field1)&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 20 Nov 2023 18:08:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-Combine-Events-with-matching-data/m-p/669236#M229544</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-11-20T18:08:39Z</dc:date>
    </item>
  </channel>
</rss>

