Comments and answers for "Date column has some bad data. I just want to remove the row if the date is doubled up in a row. How do I discard a row based on character count or other logic?"https://answers.splunk.com/answers/448561/date-column-has-some-bad-data-i-just-want-to-remov.html
The latest comments and answers for the question "Date column has some bad data. I just want to remove the row if the date is doubled up in a row. How do I discard a row based on character count or other logic?"Comment by dmacgillivray on dmacgillivray's commenthttps://answers.splunk.com/comments/448868/view.html
Thanks Ssievert. I have my own delete user name and follow that logic. It was not a consideration for me to use the delete command so freely so I asked about admin but forgot it is not set up by default and would not be a good idea to add that to it.
I fully concur that without a clean command you are not deleting that data anyway. I have no intention of deleting just skipping by the data on the way to the DB from the upsert with the new DB connect..
Really good advice out here as usual. Best forum of any product on the net !Wed, 07 Sep 2016 19:25:17 GMTdmacgillivrayComment by ssievert_splunk on ssievert_splunk's commenthttps://answers.splunk.com/comments/448861/view.html
To clarify two things:
1) Even admin doesn't have the can_delete capability by default. I consider it best practice to create a separate user with that capability, so bad things don't happen as easily... ;)
2) | delete only marks events such that they are no longer returned when searching. It will not get removed from disk until it ages out. Just saying.Wed, 07 Sep 2016 18:52:28 GMTssievert_splunkComment by dmacgillivray on dmacgillivray's commenthttps://answers.splunk.com/comments/448570/view.html
Understood, glad you said that for other folks to be aware of.Wed, 07 Sep 2016 13:15:19 GMTdmacgillivrayComment by inventsekar on inventsekar's commenthttps://answers.splunk.com/comments/447806/view.html
yes, this needs admin privilege or, user must have "can_delete" role.
https://docs.splunk.com/Documentation/Splunk/6.4.3/Admin/Aboutusersandroles
Please be aware - the delete command deletes the indexed data.Wed, 07 Sep 2016 13:13:53 GMTinventsekarComment by dmacgillivray on dmacgillivray's commenthttps://answers.splunk.com/comments/448568/view.html
Ahh, cool. Thanks, yeah, should have clarified, want to delete from search only. I would rather keep it around so we can talk to the data owners about it. Much appreciated !Wed, 07 Sep 2016 13:13:17 GMTdmacgillivrayComment by inventsekar on inventsekar's commenthttps://answers.splunk.com/comments/447804/view.html
sure, this will list out the lines which are less than 20 characters length.
when you said "I want to disgard a row", i thought to use the delete.Wed, 07 Sep 2016 13:09:52 GMTinventsekarComment by dmacgillivray on dmacgillivray's answerhttps://answers.splunk.com/comments/448565/view.html
Hello inventsekar,
Thank you so much, quick question though. Does this need admin to be run? I wonder as I see the delete and is the delete command in this case only deleting from the SPL output only? Either way, thanks !!Wed, 07 Sep 2016 13:09:43 GMTdmacgillivrayComment by dmacgillivrayhttps://answers.splunk.com/comments/448564/view.html
This was just done on site. I think we solved it anyway. It would be good to see what other folks find.
| eval length=len(Report_Generation_Start_Time) | where length<20Wed, 07 Sep 2016 13:06:22 GMTdmacgillivrayAnswer by inventsekarhttps://answers.splunk.com/answering/447801/view.html
Please check this one -
to list down the events that are more than 19 char long -
your search... | eval length=len(_raw) | where length > 19 | table _raw _time
to discard the events that are more than 19 char length, .....this will delete the indexed data (Caution: Removing data is irreversible. )
your search... | eval length=len(_raw) | where length > 19 | deleteWed, 07 Sep 2016 13:05:58 GMTinventsekar