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
Super Champion

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!

Enterprise Security Content Updates (ESCU) - New Releases

In the last month, the Splunk Threat Research Team (STRT) has had 3 releases of new content via the Enterprise ...

Thought Leaders are Validating Your Hard Work and Training Rigor

As a Splunk enthusiast and member of the Splunk Community, you are one of thousands who recognize the value of ...

.conf23 Registration is Now Open!

Time to toss the .conf-etti 🎉 —  .conf23 registration is open!   Join us in Las Vegas July 17-20 for ...