<?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 Dedup on data model aftet tstats shows the older event, not the newest in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Dedup-on-data-model-aftet-tstats-shows-the-older-event-not-the/m-p/572092#M199364</link>
    <description>&lt;P&gt;I have a tstats query that pulls its data from an accelerated data model. I need to grab only the most up to date host event with the latest IP value. I cannot dedup in the data model root search itself as I need to keep track of _time to get point-in-time results as well.&lt;/P&gt;&lt;P&gt;Anyways, for the most current point-in-time IP value (right now), dedup is not working as intended. It's showing me the older value.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Query without dedup:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats latest(_time) as _time  FROM datamodel="Host_Info" WHERE nodename="hostinfo" hostname=bobs by hostinfo.hostname hostinfo.ip&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Results (two values for ip)&lt;/P&gt;&lt;P&gt;hostninfo.hostname hostinfo.ip _time&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="127.9px"&gt;bobs&lt;/TD&gt;&lt;TD width="563.867px"&gt;10.10.10.10&lt;/TD&gt;&lt;TD width="98.7333px"&gt;2021-10-22 19:55:03&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="127.9px"&gt;bobs&lt;/TD&gt;&lt;TD width="563.867px"&gt;33.33.33.33&lt;/TD&gt;&lt;TD width="98.7333px"&gt;2021-10-22 21:23:06&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;STRONG&gt;Query with dedup:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats latest(_time) as _time  FROM datamodel="Host_Info" WHERE nodename="hostinfo" hostname=bobs by hostinfo.hostname hostinfo.ip | dedup hostname&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Results (&lt;EM&gt;older&lt;/EM&gt; value, not newer):&lt;/P&gt;&lt;P&gt;hostninfo.hostname hostinfo.ip _time&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="127.9px"&gt;bobs&lt;/TD&gt;&lt;TD width="563.867px"&gt;10.10.10.10&lt;/TD&gt;&lt;TD width="98.7333px"&gt;2021-10-22 19:55:03&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;Why isn't dedup working correctly? If I dedup the actual indexed data, before it hits the datamodel, it works fine and shows me the latest hostname and IP.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 22 Oct 2021 23:09:04 GMT</pubDate>
    <dc:creator>thisissplunk</dc:creator>
    <dc:date>2021-10-22T23:09:04Z</dc:date>
    <item>
      <title>Dedup on data model aftet tstats shows the older event, not the newest</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dedup-on-data-model-aftet-tstats-shows-the-older-event-not-the/m-p/572092#M199364</link>
      <description>&lt;P&gt;I have a tstats query that pulls its data from an accelerated data model. I need to grab only the most up to date host event with the latest IP value. I cannot dedup in the data model root search itself as I need to keep track of _time to get point-in-time results as well.&lt;/P&gt;&lt;P&gt;Anyways, for the most current point-in-time IP value (right now), dedup is not working as intended. It's showing me the older value.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Query without dedup:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats latest(_time) as _time  FROM datamodel="Host_Info" WHERE nodename="hostinfo" hostname=bobs by hostinfo.hostname hostinfo.ip&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Results (two values for ip)&lt;/P&gt;&lt;P&gt;hostninfo.hostname hostinfo.ip _time&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="127.9px"&gt;bobs&lt;/TD&gt;&lt;TD width="563.867px"&gt;10.10.10.10&lt;/TD&gt;&lt;TD width="98.7333px"&gt;2021-10-22 19:55:03&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="127.9px"&gt;bobs&lt;/TD&gt;&lt;TD width="563.867px"&gt;33.33.33.33&lt;/TD&gt;&lt;TD width="98.7333px"&gt;2021-10-22 21:23:06&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;STRONG&gt;Query with dedup:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats latest(_time) as _time  FROM datamodel="Host_Info" WHERE nodename="hostinfo" hostname=bobs by hostinfo.hostname hostinfo.ip | dedup hostname&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Results (&lt;EM&gt;older&lt;/EM&gt; value, not newer):&lt;/P&gt;&lt;P&gt;hostninfo.hostname hostinfo.ip _time&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="127.9px"&gt;bobs&lt;/TD&gt;&lt;TD width="563.867px"&gt;10.10.10.10&lt;/TD&gt;&lt;TD width="98.7333px"&gt;2021-10-22 19:55:03&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;Why isn't dedup working correctly? If I dedup the actual indexed data, before it hits the datamodel, it works fine and shows me the latest hostname and IP.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Oct 2021 23:09:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dedup-on-data-model-aftet-tstats-shows-the-older-event-not-the/m-p/572092#M199364</guid>
      <dc:creator>thisissplunk</dc:creator>
      <dc:date>2021-10-22T23:09:04Z</dc:date>
    </item>
    <item>
      <title>Re: Dedup on data model aftet tstats shows the older event, not the newest</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dedup-on-data-model-aftet-tstats-shows-the-older-event-not-the/m-p/572093#M199365</link>
      <description>&lt;P&gt;I haven't figured out why this is happening but the current workaround is to add a latest(hostname.ip) and removing hostname.ip from the by clause.&lt;/P&gt;&lt;P&gt;Not sure why latest() understands the timestamps but dedup doesn't. Maybe dedup works off of something else than _time?&lt;/P&gt;</description>
      <pubDate>Fri, 22 Oct 2021 23:16:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dedup-on-data-model-aftet-tstats-shows-the-older-event-not-the/m-p/572093#M199365</guid>
      <dc:creator>thisissplunk</dc:creator>
      <dc:date>2021-10-22T23:16:41Z</dc:date>
    </item>
    <item>
      <title>Re: Dedup on data model aftet tstats shows the older event, not the newest</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dedup-on-data-model-aftet-tstats-shows-the-older-event-not-the/m-p/572101#M199369</link>
      <description>&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/8.2.2/SearchReference/Dedup" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/8.2.2/SearchReference/Dedup&lt;/A&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt; Events returned by dedup are based on search order. &lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 23 Oct 2021 05:45:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dedup-on-data-model-aftet-tstats-shows-the-older-event-not-the/m-p/572101#M199369</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2021-10-23T05:45:05Z</dc:date>
    </item>
    <item>
      <title>Re: Dedup on data model aftet tstats shows the older event, not the newest</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dedup-on-data-model-aftet-tstats-shows-the-older-event-not-the/m-p/572102#M199370</link>
      <description>&lt;P&gt;Ok. So I'm left wondering why the data coming back from the accelerated data model is out of order.&lt;/P&gt;</description>
      <pubDate>Sat, 23 Oct 2021 07:57:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dedup-on-data-model-aftet-tstats-shows-the-older-event-not-the/m-p/572102#M199370</guid>
      <dc:creator>thisissplunk</dc:creator>
      <dc:date>2021-10-23T07:57:02Z</dc:date>
    </item>
  </channel>
</rss>

