<?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: issue with &amp;quot;_time&amp;quot; after using fit command in DLTK in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/issue-with-quot-time-quot-after-using-fit-command-in-DLTK/m-p/673634#M230660</link>
    <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/154523"&gt;@pdrieger_splunk&lt;/a&gt;any idea?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 09 Jan 2024 12:42:13 GMT</pubDate>
    <dc:creator>indeed_2000</dc:creator>
    <dc:date>2024-01-09T12:42:13Z</dc:date>
    <item>
      <title>issue with "_time" after using fit command in DLTK</title>
      <link>https://community.splunk.com/t5/Splunk-Search/issue-with-quot-time-quot-after-using-fit-command-in-DLTK/m-p/673629#M230658</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;here is the default spl of &lt;STRONG&gt;App: Splunk App for Data Science and Deep Learning (Time Series Anomalies with STUMPY -Time Series Anomaly Detection with Matrix Profiles&lt;/STRONG&gt;)&lt;/P&gt;&lt;P&gt;| inputlookup cyclical_business_process.csv&lt;BR /&gt;| eval _time=strptime(_time, "%Y-%m-%dT%H:%M:%S")&lt;BR /&gt;| timechart span=15m avg(logons) as logons&lt;BR /&gt;| fit MLTKContainer algo=stumpy m=96 logons from _time into app:stumpy_anomalies&lt;BR /&gt;| table _time logons matrix_profile&lt;BR /&gt;| eventstats p95(matrix_profile) as p95_matrix_profile&lt;BR /&gt;| eval anomaly=if(matrix_profile&amp;gt;p95_matrix_profile,1,0)&lt;BR /&gt;| fields - p95_matrix_profile&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;now want to run this command for my data, here is the sample log:&lt;/P&gt;&lt;P&gt;2022-11-30 23:59:00,122,124&lt;BR /&gt;2022-11-30 23:58:00,113,112&lt;BR /&gt;2022-11-30 23:57:00,144,143&lt;BR /&gt;2022-11-30 23:56:00,137,138&lt;BR /&gt;2022-11-30 23:55:00,119,120&lt;BR /&gt;2022-11-30 23:54:00,103,102&lt;BR /&gt;2022-11-30 23:53:00,104,105&lt;BR /&gt;2022-11-30 23:52:00,143,142&lt;BR /&gt;2022-11-30 23:51:00,138,139&lt;BR /&gt;2022-11-30 23:50:00,155,153&lt;BR /&gt;2022-11-30 23:49:00,100,102&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;timestamp: 2022-11-30 23:59:00&lt;/P&gt;&lt;P&gt;logons: 122&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;here is the spl that i run:&lt;BR /&gt;| rex field=_raw "(?&amp;lt;time&amp;gt;\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}),(?&amp;lt;logons&amp;gt;\d+)"&lt;BR /&gt;| eval _time=strptime(time, "%Y-%m-%d %H:%M:%S")&lt;BR /&gt;| timechart span=15m avg(logons) as logons&lt;BR /&gt;&lt;STRONG&gt;| fit MLTKContainer algo=stumpy m=96 logons from _time into app:stumpy_anomalies&lt;/STRONG&gt;&lt;BR /&gt;| table _time logons matrix_profile&lt;BR /&gt;| eventstats p95(matrix_profile) as p95_matrix_profile&lt;BR /&gt;| eval anomaly=if(matrix_profile&amp;gt;p95_matrix_profile,1,0)&lt;BR /&gt;| fields - p95_matrix_profile&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;before fit command _time show correctly, but after fit command it's empty!&lt;/P&gt;&lt;P&gt;FYI: logon, matrix_profile, anomaly return correctly but _time is empty!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any&amp;nbsp; idea?&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jan 2024 12:43:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/issue-with-quot-time-quot-after-using-fit-command-in-DLTK/m-p/673629#M230658</guid>
      <dc:creator>indeed_2000</dc:creator>
      <dc:date>2024-01-09T12:43:54Z</dc:date>
    </item>
    <item>
      <title>Re: issue with "_time" after using fit command in DLTK</title>
      <link>https://community.splunk.com/t5/Splunk-Search/issue-with-quot-time-quot-after-using-fit-command-in-DLTK/m-p/673634#M230660</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/154523"&gt;@pdrieger_splunk&lt;/a&gt;any idea?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jan 2024 12:42:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/issue-with-quot-time-quot-after-using-fit-command-in-DLTK/m-p/673634#M230660</guid>
      <dc:creator>indeed_2000</dc:creator>
      <dc:date>2024-01-09T12:42:13Z</dc:date>
    </item>
    <item>
      <title>Re: issue with "_time" after using fit command in DLTK</title>
      <link>https://community.splunk.com/t5/Splunk-Search/issue-with-quot-time-quot-after-using-fit-command-in-DLTK/m-p/692599#M235727</link>
      <description>&lt;P&gt;Hey there,&lt;/P&gt;&lt;P&gt;Results of the &lt;EM&gt;| fit&lt;/EM&gt; command are affected by the time range picker.&amp;nbsp; Once you set the time range to all time, _time is displayed normally.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Edit: I looked into the interaction between &lt;EM&gt;inputlookup + fit + time range picker&lt;/EM&gt;. As documented &lt;A href="https://docs.splunk.com/Documentation/MLApp/5.4.1/User/Understandfitandapply#Apply_the_model_to_the_prepared_data_and_produce_new_columns_that_display_the_prediction" target="_self"&gt;here&lt;/A&gt;, the result of the fit command are appended to the initial dataset. In this case, the expected outcome would be that the resulting table includes only rows that are covered by the time range picker. However, the following happens:&lt;/P&gt;&lt;P&gt;Time range picker: All time&lt;BR /&gt;Resulting table: Initial dataset + output of fit command&lt;BR /&gt;Result: &lt;FONT color="#339966"&gt;&lt;STRONG&gt;OK, expected result&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Time range picker: Some time before the first observation - now&lt;BR /&gt;Resulting table: Initial dataset + output of fit command&lt;BR /&gt;Result: &lt;FONT color="#339966"&gt;&lt;STRONG&gt;OK, expected result&lt;/STRONG&gt;&lt;/FONT&gt;&amp;nbsp;(Warning: &lt;SPAN&gt;The specified span would result in too many (&amp;gt;50000) rows.&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;Time range picker: About halfway through the dataset timestamps - now&lt;BR /&gt;Resulting table: Initial dataset + output of fit command&lt;BR /&gt;Result: &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;OK, unexpected result&lt;/STRONG&gt;&lt;/FONT&gt; (Warning: &lt;SPAN&gt;The specified span would result in too many (&amp;gt;50000) rows.&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;Time range picker: After some time of the last observation - now&lt;BR /&gt;Resulting table: Initial dataset + output of fit command&lt;BR /&gt;Result: &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;OK, unexpected result&lt;/STRONG&gt;&lt;/FONT&gt; (Warning: &lt;SPAN&gt;The specified span would result in too many (&amp;gt;50000) rows.&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;Time range picker: Some time before the first observation - some time stamp after the last observation&lt;BR /&gt;Resulting table: output of fit command&lt;BR /&gt;Result: &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;NOT OK, unexpected result&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;I checked the sources that were available to me (search.log, .py files) but sadly this did not suffice to reverse engineer how the initial dataset and the output of the fit command are merged and filtered. &lt;STRONG&gt;It seems that &lt;EM&gt;earliest&lt;/EM&gt; has no effect, but once &lt;EM&gt;latest&lt;/EM&gt; is set to a timestamp, the behavior becomes unexpected&lt;/STRONG&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jul 2024 09:29:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/issue-with-quot-time-quot-after-using-fit-command-in-DLTK/m-p/692599#M235727</guid>
      <dc:creator>Gabriel</dc:creator>
      <dc:date>2024-07-08T09:29:06Z</dc:date>
    </item>
  </channel>
</rss>

