Getting Data In

How do I input data event and fields?

ichesla1111
Path Finder

Hello,

I am inputting a file into Splunk showing the computers system information extracted from the command prompt. The data file I am inputting input Splunk looks like the first photo below, where I want the fields to be set as the values in the first column (circled in red) and their field values equal to their corresponding output value.

ichesla1111_3-1671134845877.png

 

YETTT, when adding it to Splunk, it breaks down the system information file into three events (instead of 1), see image below.

How do I merge these three events into one (match the text file uploaded) and set the fields equal to the systems characteristics seen in the first column (circled in blue)?

ichesla1111_0-1671134493024.png

 

Labels (2)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

Welcome to the fun world of GDI (Getting Data In)!

If you're getting three events when you should be getting one then your line breaking needs to be adjusted.  Try

LINE_BREAKER = ([\r\n])Host Name:

Extracting fields from the input is fairly simple with a series of EXTRACT statements.  Don't try to do the whole thing in one go because that will drive you mad and will break too easily. (Clever people with a transform that will do the extractions are welcome to chime in!)

EXTRACT-hostname = Host Name:\s+(?<HostName>\S+)
EXTRACT-osname = OS Name:\s+(?<OSName>.*$)
<<and so on>>

And to fix that warning about timestamp extraction, put this in props.conf

DATETIME_CONFIG = CURRENT
---
If this reply helps you, Karma would be appreciated.
0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Persistent Queue at TcpOut — One of Splunk's Most Practical Features

Splunk introduced persistent queueing at the tcpout layer as one of the most practical resilience features in ...

Catalog Is Now Generally Available on Splunk Cloud Platform

A Unified View of Your Data  Security logs, application events, business data, and historical telemetry often ...

Your Path to AgenticOps: AI Experiences for Every Splunk Practitioner

Your Path to AgenticOps: AI Experiences for Every Splunk Practitioner   Watch on demand us for a demo-driven ...