<?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: Exporting/Importing a CSV to new Splunk Enterprise instance in Other Usage</title>
    <link>https://community.splunk.com/t5/Other-Usage/Exporting-Importing-a-CSV-to-new-Splunk-Enterprise-instance/m-p/704765#M1878</link>
    <description>&lt;P&gt;You could make a transforms config which tells Splunk to extract the host field from the log:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;# props.conf
[yoursourcetype]
TRANSFORMS-anynameyouwant = arbitrarytransformname

# transforms.conf
[arbitrarytransformname]
DEST_KEY = MetaData:Host
REGEX = ^[^,]*,([^,]+)
FORMAT = host::$1&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Once this config is applied to your indexing tier, it will set the host based on the second column in your logs.&lt;/P&gt;&lt;P&gt;The default timestamp finder should also find the _time value from your logs in the first column, unless you are setting a sourcetype that bypasses the regular timestamp extraction. You might also try putting the logs to import into a file on the splunk machine using the cli and then making an inputs.conf to index it.&lt;/P&gt;&lt;P&gt;You should be able to set the sourcetype either from the inputs.conf stanza or in the webUI when uploading the logs.&lt;/P&gt;</description>
    <pubDate>Tue, 19 Nov 2024 20:08:51 GMT</pubDate>
    <dc:creator>marnall</dc:creator>
    <dc:date>2024-11-19T20:08:51Z</dc:date>
    <item>
      <title>Exporting/Importing a CSV to new Splunk Enterprise instance</title>
      <link>https://community.splunk.com/t5/Other-Usage/Exporting-Importing-a-CSV-to-new-Splunk-Enterprise-instance/m-p/704748#M1877</link>
      <description>&lt;P&gt;Hello. I cannot find a solution to this one here...&lt;/P&gt;&lt;P&gt;I have logs in one Splunk instance. I've exported them to CSV and want to perform a one-time ingest of that CSV into a new on-prem Splunk Enterprise instance.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the CSV and can import it. However, I can't figure out how to preserve each row/event's original 'host', timestamp, and 'sourcetype' entry. When I do the import, it records the 'host' as the Splunk indexer, and the timestamp as the date of the import, which makes sense but is not the desired behavior.&lt;/P&gt;&lt;P&gt;Here is a sample row of the CSV:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;_time,host,index,source,sourcetype
2024-11-19T11:36:05.000-0500,host1.example.com,test-index,/var/log/messages,syslog
2024-11-19T11:36:05.000-0500,host2.example.com,test-index,/var/log/messages,syslog&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I removed the _raw column, but I can include it if necessary.&lt;/P&gt;&lt;P&gt;How do I import these events while preserving the event time, host, and sourcetype fields? Is this even possible?&amp;nbsp;&lt;/P&gt;&lt;P&gt;I looked around here and can't find anyone with this scenario.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2024 17:01:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Other-Usage/Exporting-Importing-a-CSV-to-new-Splunk-Enterprise-instance/m-p/704748#M1877</guid>
      <dc:creator>Branden</dc:creator>
      <dc:date>2024-11-19T17:01:09Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting/Importing a CSV to new Splunk Enterprise instance</title>
      <link>https://community.splunk.com/t5/Other-Usage/Exporting-Importing-a-CSV-to-new-Splunk-Enterprise-instance/m-p/704765#M1878</link>
      <description>&lt;P&gt;You could make a transforms config which tells Splunk to extract the host field from the log:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;# props.conf
[yoursourcetype]
TRANSFORMS-anynameyouwant = arbitrarytransformname

# transforms.conf
[arbitrarytransformname]
DEST_KEY = MetaData:Host
REGEX = ^[^,]*,([^,]+)
FORMAT = host::$1&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Once this config is applied to your indexing tier, it will set the host based on the second column in your logs.&lt;/P&gt;&lt;P&gt;The default timestamp finder should also find the _time value from your logs in the first column, unless you are setting a sourcetype that bypasses the regular timestamp extraction. You might also try putting the logs to import into a file on the splunk machine using the cli and then making an inputs.conf to index it.&lt;/P&gt;&lt;P&gt;You should be able to set the sourcetype either from the inputs.conf stanza or in the webUI when uploading the logs.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2024 20:08:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Other-Usage/Exporting-Importing-a-CSV-to-new-Splunk-Enterprise-instance/m-p/704765#M1878</guid>
      <dc:creator>marnall</dc:creator>
      <dc:date>2024-11-19T20:08:51Z</dc:date>
    </item>
  </channel>
</rss>

