<?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 NiFi GetSplunk import events in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/NiFi-GetSplunk-import-events/m-p/698752#M115817</link>
    <description>&lt;P&gt;I'm trying to import a csv file generated by the NiFi GetSplunk component. It retrieves events from a Splunk Instance SPL-01 and store them in a CSV file with the following header:&lt;/P&gt;
&lt;P&gt;_serial,_time,source,sourcetype,host,index,splunk_server,_raw&lt;/P&gt;
&lt;P&gt;I do an indexed_extraction=CSV when I import the csv files on another spunk instance SPL-02.&lt;/P&gt;
&lt;P&gt;If I just import the file, the host will be the instance SPL-02 and I want the host to be SPL-01 I got past this by having a transform as follows:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;[mysethost]

INGEST_EVAL = host=$field:host$&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Question 1:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;That gives me correct host name set to SPL-01, but I still have a EXTRACTED_HOST field, when I look at events in Splunk.. I found the article below where I got the idea to use $field:host$, but it also has ":=" for assignment, that did not work for me, so I used the "=" and then it worked. I also tried setting the "$field:host$=null()" but that had no effect..&lt;/P&gt;
&lt;P&gt;I found this article&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.splunk.com/t5/Getting-Data-In/How-to-get-the-host-value-from-INDEXED-EXTRACTIONS-json/m-p/577392" target="_blank" rel="noopener"&gt;https://community.splunk.com/t5/Getting-Data-In/How-to-get-the-host-value-from-INDEXED-EXTRACTIONS-json/m-p/577392&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Question 2:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;I have problem getting the data from time field in. I tried using the&lt;/P&gt;
&lt;P&gt;TIMESTAMP_FIELDS in props.conf for this import. I tried the following.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;TIMESTAMP_FIELDS=_time (Did not work)&lt;/LI&gt;
&lt;LI&gt;TIMESTAMP_FIELDS=$field:_time$ ( Did not work)&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;I then renamed the header line so time was named: "xtime" instead and then I could use the props.conf and set the&lt;/P&gt;
&lt;P&gt;TIMESTAMP_FIELDS=xtime&lt;/P&gt;
&lt;P&gt;How can I use the _time field directly?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 11 Sep 2024 17:17:58 GMT</pubDate>
    <dc:creator>hanseMand</dc:creator>
    <dc:date>2024-09-11T17:17:58Z</dc:date>
    <item>
      <title>NiFi GetSplunk import events</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/NiFi-GetSplunk-import-events/m-p/698752#M115817</link>
      <description>&lt;P&gt;I'm trying to import a csv file generated by the NiFi GetSplunk component. It retrieves events from a Splunk Instance SPL-01 and store them in a CSV file with the following header:&lt;/P&gt;
&lt;P&gt;_serial,_time,source,sourcetype,host,index,splunk_server,_raw&lt;/P&gt;
&lt;P&gt;I do an indexed_extraction=CSV when I import the csv files on another spunk instance SPL-02.&lt;/P&gt;
&lt;P&gt;If I just import the file, the host will be the instance SPL-02 and I want the host to be SPL-01 I got past this by having a transform as follows:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;[mysethost]

INGEST_EVAL = host=$field:host$&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Question 1:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;That gives me correct host name set to SPL-01, but I still have a EXTRACTED_HOST field, when I look at events in Splunk.. I found the article below where I got the idea to use $field:host$, but it also has ":=" for assignment, that did not work for me, so I used the "=" and then it worked. I also tried setting the "$field:host$=null()" but that had no effect..&lt;/P&gt;
&lt;P&gt;I found this article&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.splunk.com/t5/Getting-Data-In/How-to-get-the-host-value-from-INDEXED-EXTRACTIONS-json/m-p/577392" target="_blank" rel="noopener"&gt;https://community.splunk.com/t5/Getting-Data-In/How-to-get-the-host-value-from-INDEXED-EXTRACTIONS-json/m-p/577392&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Question 2:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;I have problem getting the data from time field in. I tried using the&lt;/P&gt;
&lt;P&gt;TIMESTAMP_FIELDS in props.conf for this import. I tried the following.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;TIMESTAMP_FIELDS=_time (Did not work)&lt;/LI&gt;
&lt;LI&gt;TIMESTAMP_FIELDS=$field:_time$ ( Did not work)&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;I then renamed the header line so time was named: "xtime" instead and then I could use the props.conf and set the&lt;/P&gt;
&lt;P&gt;TIMESTAMP_FIELDS=xtime&lt;/P&gt;
&lt;P&gt;How can I use the _time field directly?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Sep 2024 17:17:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/NiFi-GetSplunk-import-events/m-p/698752#M115817</guid>
      <dc:creator>hanseMand</dc:creator>
      <dc:date>2024-09-11T17:17:58Z</dc:date>
    </item>
  </channel>
</rss>

