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!

Aligning Observability Costs with Business Value: Practical Strategies

 Join us for an engaging Tech Talk on Aligning Observability Costs with Business Value: Practical ...

Mastering Data Pipelines: Unlocking Value with Splunk

 In today's AI-driven world, organizations must balance the challenges of managing the explosion of data with ...

Splunk Up Your Game: Why It's Time to Embrace Python 3.9+ and OpenSSL 3.0

Did you know that for Splunk Enterprise 9.4, Python 3.9 is the default interpreter? This shift is not just a ...