<?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 do I rename a file  after extraction? in Splunk Enterprise</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise/How-do-I-rename-a-file-after-extraction/m-p/322754#M6755</link>
    <description>&lt;P&gt;1) When posting code on the forum, please be sure to mark it as code, so that things in &amp;lt; &amp;gt; are not deleted by the interface.  I've updated your question to mark the code, but there apparently were no items marked to be extracted in the rex. &lt;/P&gt;

&lt;P&gt;2) The first part of your search says to check records with sourcetype=kaa, and look for events with the word &lt;CODE&gt;temperature&lt;/CODE&gt; in them. Best practices are to always specify the index name for a search.  &lt;/P&gt;

&lt;P&gt;3)  Renaming _time as Time doesn't accomplish anything except losing the auto-formatting on the field, so it's probably not the reason you are not getting results.  Try this, to see if there are any records there to be extracted at all...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;temperature sourcetype=kaa | head 1 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If there are no records, then add the correct index and fix the criteria as needecd.  If there is one, then check to see if it has fields &lt;CODE&gt;_time&lt;/CODE&gt;, &lt;CODE&gt;_raw&lt;/CODE&gt;, and &lt;CODE&gt;mydata&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;If &lt;CODE&gt;mydata&lt;/CODE&gt; is not there, then that is your reason for no return records.  Correct the &lt;CODE&gt;input=&lt;/CODE&gt; parameter on the &lt;CODE&gt;spath&lt;/CODE&gt; command to be the correct field name.&lt;/P&gt;</description>
    <pubDate>Wed, 31 May 2017 04:30:00 GMT</pubDate>
    <dc:creator>DalJeanis</dc:creator>
    <dc:date>2017-05-31T04:30:00Z</dc:date>
    <item>
      <title>How do I rename a file  after extraction?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-do-I-rename-a-file-after-extraction/m-p/322753#M6754</link>
      <description>&lt;P&gt;Hi, how do I rename _time AS Time in m example below? I'm getting no results with the example below.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;temperature sourcetype=kaa | rex field=_raw "\"endpointKeyHash\":\{\"string\":\"(?[^\"]*)\".*\"Event\": (?\{.*\})\}$"| spath input=mydata | rename _time AS Time| table Time, endpoint, temperature
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 31 May 2017 03:49:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-do-I-rename-a-file-after-extraction/m-p/322753#M6754</guid>
      <dc:creator>wuming79</dc:creator>
      <dc:date>2017-05-31T03:49:14Z</dc:date>
    </item>
    <item>
      <title>Re: How do I rename a file  after extraction?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-do-I-rename-a-file-after-extraction/m-p/322754#M6755</link>
      <description>&lt;P&gt;1) When posting code on the forum, please be sure to mark it as code, so that things in &amp;lt; &amp;gt; are not deleted by the interface.  I've updated your question to mark the code, but there apparently were no items marked to be extracted in the rex. &lt;/P&gt;

&lt;P&gt;2) The first part of your search says to check records with sourcetype=kaa, and look for events with the word &lt;CODE&gt;temperature&lt;/CODE&gt; in them. Best practices are to always specify the index name for a search.  &lt;/P&gt;

&lt;P&gt;3)  Renaming _time as Time doesn't accomplish anything except losing the auto-formatting on the field, so it's probably not the reason you are not getting results.  Try this, to see if there are any records there to be extracted at all...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;temperature sourcetype=kaa | head 1 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If there are no records, then add the correct index and fix the criteria as needecd.  If there is one, then check to see if it has fields &lt;CODE&gt;_time&lt;/CODE&gt;, &lt;CODE&gt;_raw&lt;/CODE&gt;, and &lt;CODE&gt;mydata&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;If &lt;CODE&gt;mydata&lt;/CODE&gt; is not there, then that is your reason for no return records.  Correct the &lt;CODE&gt;input=&lt;/CODE&gt; parameter on the &lt;CODE&gt;spath&lt;/CODE&gt; command to be the correct field name.&lt;/P&gt;</description>
      <pubDate>Wed, 31 May 2017 04:30:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-do-I-rename-a-file-after-extraction/m-p/322754#M6755</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-05-31T04:30:00Z</dc:date>
    </item>
  </channel>
</rss>

