Splunk Search

Adding data with oneshot on gemeric_single_line

nyp_kwyc
Explorer

Currently using oneshot to index data into splunk (bash)
Is there a way to add a option for data to be in gemeric_single_line when using oneshot

Tags (2)
0 Karma
1 Solution

esix_splunk
Splunk Employee
Splunk Employee

If you want to do this, you'll need to define your own sourcetype via props and transforms. And then specify this sourcetype when you oneshot the data.

View solution in original post

0 Karma

esix_splunk
Splunk Employee
Splunk Employee

If you want to do this, you'll need to define your own sourcetype via props and transforms. And then specify this sourcetype when you oneshot the data.

0 Karma

aakwah
Builder

Could you please provide more clarification?

Regards,
Ahmed

0 Karma

nyp_kwyc
Explorer

I created a bash script that include the oneshot command:
$SPLUNK add oneshot "$HOME/data.txt" -index myindex -hostname host1 -sourcetype datasource1

Then I realise my data log is all in one chunk - http://imgur.com/WD56m0y

Therefore I want to Event breaks at at every line when indexing the data via bash script command
Is there a augment for oneshot command to allow this option?

http://i.imgur.com/CAU3r5t.png

0 Karma
Get Updates on the Splunk Community!

Automatic Discovery Part 1: What is Automatic Discovery in Splunk Observability Cloud ...

If you’ve ever deployed a new database cluster, spun up a caching layer, or added a load balancer, you know it ...

Real-Time Fraud Detection: How Splunk Dashboards Protect Financial Institutions

Financial fraud isn't slowing down. If anything, it's getting more sophisticated. Account takeovers, credit ...

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

 Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...