VMware ESXi and vSphere Cluster Management

Add Data to Splunk

Learn how to upload files to Splunk Enterprise and choose between Upload, Monitor, and Forward for machine-data ingestion.

Splunk Enterprise indexes incoming machine data so that you can search, investigate, and analyze it. The data might come from application logs, operating-system files, network sources, scripts, or other machine-generated inputs.

This lesson focuses on the three main ingestion paths—Upload, Monitor, and Forward—with emphasis on uploading a file through the Splunk web interface.

How Splunk Ingests Data

Indexing is the process of processing incoming data and storing it in a form Splunk can search. During ingestion, Splunk assigns metadata such as the source type, host, source, and index, and separates the raw input into individual events.

An event is a discrete unit of machine data represented in Splunk search results. For example, one web-server request or one application error may be represented as one event.

MethodData sourceCollection behaviorTypical use case
UploadOne local file or archiveOne-time consumptionTesting, demonstrations, and ad hoc imports
MonitorFiles, directories, streams, scripts, and other supported machine-data inputsContinuous collectionProduction or ongoing local inputs
ForwardData sent by Splunk forwardersContinuous delivery from source systemsDistributed or remote machines

Choosing the right method

<
  • Use Upload for a static file that you need to import once.
  • Use Monitor for a log file that continues to grow on a system Splunk can access and watch.
  • Use Forward when data is on another machine and should be collected and transmitted to your Splunk deployment.

Upload Data

Upload imports one file or an archive containing files through Splunk Enterprise. Splunk consumes the uploaded input as a one-time source. It does not continue watching the file for changes after the upload.

Upload is the simplest ingestion method for demonstrations, testing, temporary analysis, and initial learning. If the original file is updated later, the new content is not automatically indexed. Use a monitoring input instead when continued collection is required.

Upload workflow

  1. Open Add Data in Splunk Enterprise.
  2. Choose Upload.
  3. Select a local file. If several files must be imported together, select a supported archive instead.
  4. Wait while Splunk prepares the file and displays the data preview.
  5. Configure parsing and input settings.
  6. Review the source, source type, host, index, and other settings.
  7. Submit the input to start indexing.
  8. Open Search and verify that the events are present and parsed correctly.

Select the File Source

On the Upload input screen, choose the local file that contains the machine data. Confirm that the selected path and filename are correct before continuing. An archive can be useful when multiple related files need to be imported as one upload operation.

Upload is intended for data available to the browser or Splunk upload workflow at the time you submit it. Selecting a file does not create a continuously watched source.

Source Type and Parsing Interpretation

A source type is the classification Splunk uses to interpret and format a particular data format during indexing. It helps Splunk determine how to recognize timestamps, separate events, and process records.

Splunk attempts to detect a suitable predefined source type from the file format. Use the preview to inspect how the raw file will become events before you submit the data.

  • Retain the detected source type when event boundaries, timestamps, and field structure look correct.
  • Select a different predefined source type when the automatic choice does not match the data.
  • Use parsing adjustments when the available source type does not produce correct events.

Event breaks

An event break is the rule or detection behavior Splunk uses to separate raw input into individual events. If several records are merged into one event, or one record is split into several events, the event-break configuration needs attention.

Timestamps

A timestamp is the date and time associated with an event. Check the preview to ensure Splunk identifies the correct timestamp field and format. Correct event times are important because time-range searches depend on them.

Advanced parsing settings

Advanced parsing settings are available when automatic detection and standard choices do not correctly represent the data. Adjust these settings only after inspecting the preview and comparing it with the original file. Validate the result in the preview before indexing.

SettingPurposeWhat to validate
Source typeClassifies the data format and supplies parsing behaviorThe selected type matches the file and produces sensible events
Event breaksDetermines where one event ends and the next beginsEach record is represented as one event
TimestampIdentifies the date and time for each eventDates, times, time zones, and formats are interpreted correctly
HostIdentifies the originating systemThe value is the intended hostname or IP address
IndexChooses the named data store for the eventsThe destination index exists and is the intended search location
Advanced parsing settingsProvides additional control when standard parsing is insufficientThe preview matches the original data before submission

Configure Input Settings

Input settings assign metadata and a destination to the uploaded events.

Host

Host identifies the system from which an event originated. Assign a meaningful value, such as the originating hostname or IP address. Host metadata lets you group and filter events from a particular system later.

Index

An index is a named data store in Splunk that receives and organizes indexed events. Select the destination index according to your Splunk data organization and access rules. The selected index determines where you search for the uploaded data.

Source

Source identifies the specific input location or file from which data was collected. Splunk records source information so that you can distinguish files or input paths during searches.

Review, Submit, and Verify

Before committing the upload, review the selected source, source type, event parsing, timestamp behavior, host, and index. Compare the parsing preview with the original file, especially when the data contains multiline records or an unusual timestamp format.

Submitting the input starts indexing for the selected one-time file input. After submission, open Search and verify the results.

index=<target_index>

You can narrow the search with the assigned host or file source:

index=<target_index> host=<assigned_host>
index=<target_index> source=<file_source>
  • Search the index selected during input configuration.
  • Filter by the assigned host or source.
  • Expand the time range if the event timestamps are older than the default search window.
  • Confirm that event timestamps represent the original records.
  • Confirm that event boundaries are correct and that records are not merged or split unexpectedly.

Monitor Data

Monitor is a continuous input method that watches or collects from supported local sources. Eligible sources can include files, directories, network streams, scripts, and other machine-data inputs that Splunk can access or execute.

Monitoring is normally preferred for ongoing production log collection. As a monitored file or source receives new data, Splunk can collect the new data as it appears rather than requiring a new manual upload.

For example, an application log that continues to grow on a system accessible to Splunk is a monitoring candidate. Configure a monitor when the source must remain connected to Splunk over time.

Forward Data

Forward is an ingestion method in which a Splunk forwarder sends data to Splunk. A forwarder is a Splunk component that runs on or near a source system, collects data there, and transmits it to the Splunk deployment.

Forwarder-based collection differs from uploading a file manually and from monitoring a source directly on the Splunk instance. It is useful when logs reside on remote or distributed machines and should be delivered centrally.

Practical Example: Upload a Test Log

  1. Open Add Data and select Upload.
  2. Choose a local sample log file and confirm the selection.
  3. Inspect the parsing preview.
  4. Accept the detected source type if event boundaries and timestamps are correct.
  5. Select a host value and target index.
  6. Review the configuration and submit the upload.
  7. Search the target index and filter by host or source to confirm that events were indexed.

Troubleshooting

Uploaded data cannot be found in Search

  • Confirm that the upload was submitted successfully.
  • Search the index selected during input configuration.
  • Filter on the assigned host value or file source.
  • Expand the search time range if the event timestamps are outside the default window.

Events are merged or split incorrectly

  • Review the source type preview before submission.
  • Adjust event-break settings so each record becomes one event.
  • Choose a source type that better matches the data format.

Events show incorrect times

  • Inspect timestamp recognition in the parsing preview.
  • Adjust timestamp settings when Splunk selects the wrong date or time format.
  • Verify that the source data contains usable timestamps.

An updated file produces no additional events

Upload is a one-time import method. It does not watch the file after submission. Use Monitor when changes to a file must be collected continuously.

Events are in an unexpected index or have the wrong host

  • Verify the index selected in Input Settings.
  • Verify the host value assigned during ingestion.
  • Use index and host filters in Search to locate the data.

Key Points

  • Splunk indexes machine data so it can be searched and analyzed.
  • Upload is for one-time file or archive imports.
  • Monitor continuously collects from supported local sources.
  • Forward uses forwarders to send data from source systems to Splunk.
  • Always validate source type, event breaks, timestamps, host, and index in the preview and review screens.
  • After submission, verify ingestion by searching the selected index and checking host, source, timestamps, and event boundaries.