<?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: Track Changes to a field in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Track-Changes-to-a-field/m-p/672766#M230397</link>
    <description>&lt;P&gt;So if you just want to narrow down on the IncidentIds that this occurred on, I thing doing a stats aggregation would be more efficient. Something like this.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;base_search&amp;gt;
    | fields + _time, IncidentId, Description, Status, Severity
    | sort 0 +_time
    | stats
        values(Description) as Description,
        latest(Status) as Status,
        dc(Severity) as dc_severity,
        list(Severity) as Sequence_Severity,
        earliest(Severity) as Old_Severity,
        latest(Severity) as New_Severity
            by IncidentId
    | where 'dc_severity'&amp;gt;1
    | fields - dc_severity&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;If you want to retain all of the original events apart of any IncidentId that this occurred on then you could use some sort of combo of streamstats and eventstats (less efficient but more detailed)&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;base_search&amp;gt;
    | fields + _time, IncidentId, Description, Status, Severity
    | sort 0 +IncidentId, -_time
    | streamstats window=2
        earliest(Severity) as Old_Severity,
        latest(Severity) as New_Severity
            by IncidentId
    | eventstats
        max(eval(if(NOT 'Old_Severity'=='New_Severity', 1, 0))) as status_change
            by IncidentId
    | where 'status_change'&amp;gt;0
    | fields - status_change&lt;/LI-CODE&gt;</description>
    <pubDate>Wed, 27 Dec 2023 16:36:20 GMT</pubDate>
    <dc:creator>dtburrows3</dc:creator>
    <dc:date>2023-12-27T16:36:20Z</dc:date>
    <item>
      <title>Track Changes to a field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Track-Changes-to-a-field/m-p/672755#M230391</link>
      <description>&lt;P&gt;Hello guys&lt;BR /&gt;&lt;BR /&gt;I need some help with making a table/dashboard that shows me changes to incidents in our Defender platform.&lt;BR /&gt;The underlying issue that we see is that Defender sometimes, when an incident is handled by automation, de-escalate the severity of a particular incident.&lt;BR /&gt;&lt;BR /&gt;So in my index of incidents i want to track for each specific incident that is handled by automation to show me when the severity field changes.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;The table should look something link this.&lt;BR /&gt;&lt;BR /&gt;IncidentId&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Description&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Status&amp;nbsp; &amp;nbsp; Old_Severity&amp;nbsp; &amp;nbsp; &amp;nbsp;New_Severity&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I don't know whether to use the streamstats or the dedup command. I've been fiddling abit with both but can't seem to get the right output.&lt;BR /&gt;&lt;BR /&gt;Anyways, hope you can help me out here. If theres something unclear about my question, let me know so i can clarify.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Dec 2023 15:35:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Track-Changes-to-a-field/m-p/672755#M230391</guid>
      <dc:creator>akselsoeb</dc:creator>
      <dc:date>2023-12-27T15:35:19Z</dc:date>
    </item>
    <item>
      <title>Re: Track Changes to a field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Track-Changes-to-a-field/m-p/672766#M230397</link>
      <description>&lt;P&gt;So if you just want to narrow down on the IncidentIds that this occurred on, I thing doing a stats aggregation would be more efficient. Something like this.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;base_search&amp;gt;
    | fields + _time, IncidentId, Description, Status, Severity
    | sort 0 +_time
    | stats
        values(Description) as Description,
        latest(Status) as Status,
        dc(Severity) as dc_severity,
        list(Severity) as Sequence_Severity,
        earliest(Severity) as Old_Severity,
        latest(Severity) as New_Severity
            by IncidentId
    | where 'dc_severity'&amp;gt;1
    | fields - dc_severity&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;If you want to retain all of the original events apart of any IncidentId that this occurred on then you could use some sort of combo of streamstats and eventstats (less efficient but more detailed)&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;base_search&amp;gt;
    | fields + _time, IncidentId, Description, Status, Severity
    | sort 0 +IncidentId, -_time
    | streamstats window=2
        earliest(Severity) as Old_Severity,
        latest(Severity) as New_Severity
            by IncidentId
    | eventstats
        max(eval(if(NOT 'Old_Severity'=='New_Severity', 1, 0))) as status_change
            by IncidentId
    | where 'status_change'&amp;gt;0
    | fields - status_change&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 27 Dec 2023 16:36:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Track-Changes-to-a-field/m-p/672766#M230397</guid>
      <dc:creator>dtburrows3</dc:creator>
      <dc:date>2023-12-27T16:36:20Z</dc:date>
    </item>
    <item>
      <title>Re: Track Changes to a field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Track-Changes-to-a-field/m-p/672825#M230427</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/263242"&gt;@dtburrows3&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;This was exactly what i was looking for.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Dec 2023 09:44:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Track-Changes-to-a-field/m-p/672825#M230427</guid>
      <dc:creator>akselsoeb</dc:creator>
      <dc:date>2023-12-28T09:44:52Z</dc:date>
    </item>
  </channel>
</rss>

