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!

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!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...