Getting Data In

How to delete sourcetype or source ?

vita86
Explorer

Hello, 

I added a file csv in splunk but the name is not correct for sourcetype. And i want to restart. 

now : 

source="test.csv" sourcetype="csv"

I will want : 

source="test.csv" sourcetype="test"

If i do this query, it's correct ? 

source="test.csv" sourcetype="csv" | delete 

it will delete test.csv file please ? 

thanks in advance. 

Regards,

Viat

 

Labels (1)
0 Karma

vita86
Explorer

Thanks for your reply. 

I have this error message : 

Error in 'delete' command: You have insufficient privileges to delete events.

How can I do please ? 

Thanks in advance

0 Karma

inventsekar
SplunkTrust
SplunkTrust

Yes, you have to contact your splunk admin and get your user updated with more privileges /  capabilities . 

as your query is resolved, please accept @to4kawa 's answer as solution. thanks. karma points appreciated!

thanks and best regards,
Sekar

PS - If this or any post helped you in any way, pls consider upvoting, thanks for reading !
0 Karma

isoutamo
SplunkTrust
SplunkTrust
Actually there is no need to delete those events. Just load those again with correct source and sourcetype and then always use those in queries.
r. Ismo
0 Karma

to4kawa
Ultra Champion

Please ask your administrator for help.

0 Karma

to4kawa
Ultra Champion
source="test.csv" sourcetype="csv" | delete 

That's correct. 

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 ...