<?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 compare two events in one search to highlight what's changed in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/how-to-compare-two-events-in-one-search-to-highlight-what-s/m-p/564247#M196551</link>
    <description>it helps, no the exact what I want, but it does work. thank you so much.</description>
    <pubDate>Mon, 23 Aug 2021 01:24:36 GMT</pubDate>
    <dc:creator>sx</dc:creator>
    <dc:date>2021-08-23T01:24:36Z</dc:date>
    <item>
      <title>how to compare two events in one search to highlight what's changed</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-compare-two-events-in-one-search-to-highlight-what-s/m-p/563770#M196392</link>
      <description>&lt;P&gt;Hi, I am trying to compare the between two events (json format), say, I can pipe with "head 2" to output only two events and then compare them and hight light what's changed, something like this:&lt;/P&gt;&lt;P&gt;&amp;lt;search syntax&amp;gt; | head 2&lt;/P&gt;&lt;P&gt;event 1&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; value: &amp;nbsp;20&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;status: high&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;category: A&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;}&lt;/P&gt;&lt;P&gt;event 2&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;value: 25&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;status: low&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;category: A&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;}&lt;/P&gt;&lt;P&gt;Output after compare looks like this or anything that can highlight the changes:&lt;/P&gt;&lt;P&gt;&amp;nbsp;changed &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; origin &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;new&lt;/P&gt;&lt;P&gt;value &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;25 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 20&lt;/P&gt;&lt;P&gt;status &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; low &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; high&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;category is unchanged, so won't have to be highlighted. any help is appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Aug 2021 12:44:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-compare-two-events-in-one-search-to-highlight-what-s/m-p/563770#M196392</guid>
      <dc:creator>sx</dc:creator>
      <dc:date>2021-08-18T12:44:14Z</dc:date>
    </item>
    <item>
      <title>Re: how to compare two events in one search to highlight what's changed</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-compare-two-events-in-one-search-to-highlight-what-s/m-p/563772#M196394</link>
      <description>&lt;P&gt;To be more clear, the fields could be changed by adding more KV pares, for example, the second event should have a child KV pares like this:&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;value: 25&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;status: low&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;category: A&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;one_more_field: {&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; key: value&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;And I want this extra KV pare to be highlighted as well.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Aug 2021 12:51:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-compare-two-events-in-one-search-to-highlight-what-s/m-p/563772#M196394</guid>
      <dc:creator>sx</dc:creator>
      <dc:date>2021-08-18T12:51:53Z</dc:date>
    </item>
    <item>
      <title>Re: how to compare two events in one search to highlight what's changed</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-compare-two-events-in-one-search-to-highlight-what-s/m-p/564007#M196465</link>
      <description>I think it's a common requirement in our daily operation, no body ever encounter such scenario?</description>
      <pubDate>Fri, 20 Aug 2021 00:23:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-compare-two-events-in-one-search-to-highlight-what-s/m-p/564007#M196465</guid>
      <dc:creator>sx</dc:creator>
      <dc:date>2021-08-20T00:23:08Z</dc:date>
    </item>
    <item>
      <title>Re: how to compare two events in one search to highlight what's changed</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-compare-two-events-in-one-search-to-highlight-what-s/m-p/564044#M196478</link>
      <description>&lt;P&gt;Try something like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;search syntax&amp;gt; | head 2
| spath
| fillnull value="missing or some other random string"
| table list of fields you are interested in
| stats values(*) as *
| foreach *
    [| eval mvc_&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;=mvcount(&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;)]
| eval max_mvc=0
| foreach mvc_*
    [| eval max_mvc=max(max_mvc,&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;)]
| where max_mvc &amp;gt; 1&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 20 Aug 2021 07:51:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-compare-two-events-in-one-search-to-highlight-what-s/m-p/564044#M196478</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-08-20T07:51:01Z</dc:date>
    </item>
    <item>
      <title>Re: how to compare two events in one search to highlight what's changed</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-compare-two-events-in-one-search-to-highlight-what-s/m-p/564247#M196551</link>
      <description>it helps, no the exact what I want, but it does work. thank you so much.</description>
      <pubDate>Mon, 23 Aug 2021 01:24:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-compare-two-events-in-one-search-to-highlight-what-s/m-p/564247#M196551</guid>
      <dc:creator>sx</dc:creator>
      <dc:date>2021-08-23T01:24:36Z</dc:date>
    </item>
  </channel>
</rss>

