Splunk Search

Dedup all redundant data in a column...having an issue

infra2sec
Path Finder

I am new and learning Splunk.

I created a search where multiple time stamps are revealed in a column. I'd just like that time stamp to show up once in my search results.

I tried using Dedup, but it takes all of the date time stamps away.

The search listed below works the way I want it to with that exception.

index=xyz sourcetype="xyz:xyz:xyz" | table_time | eval Date =strftime(_time, "%Y%m%d") | table Date | rename Date as "Date that something happened" | dedup Date

Thanks!

Tags (1)
0 Karma

infra2sec
Path Finder

You all are awesome. Starting to get the results that I need. Wanted to report back, but I could only post 2 times per day.

0 Karma

woodcock
Esteemed Legend

Like this:

index=xyz sourcetype="xyz:xyz:xyz" | bucket span=1d _time | dedup _time | rename _time AS "Date that something happened"
0 Karma

Stevelim
Communicator

Hey, to list out unique values, you should look into stats command as well

Base search to filter out the correct events | table_time | eval Date =strftime(_time, "%Y%m%d") | stats list(Date)

Here's an example:

index=* Value>60 | eval Date = strftime(_time, "%Y%m%d") | stats values(Date) as Date | mvexpand Date

alt text

0 Karma

sundareshr
Legend

Try this

index=xyz sourcetype="xyz:xyz:xyz" | timechart span=1d count | eval "Date that something happened"=strftime(_time, "%Y%m%d") | table "Date that something happened"
0 Karma

infra2sec
Path Finder

Thank you very much. Is there a way to do that myself? I searched and didn't find a way.

Thanks

0 Karma

gcusello
SplunkTrust
SplunkTrust

you could do something like this
index=xyz sourcetype="xyz:xyz:xyz" | eval Date =strftime(_time, "%Y%m%d") | dedup Date | table Date | rename Date as "Date that something happened"
OR
index=xyz sourcetype="xyz:xyz:xyz" | eval Date =strftime(_time, "%Y%m%d") | stats count by Date | rename Date as "Date that something happened"
repeting table two times is more slow and not mandatory.
Bye.
Giuseppe

0 Karma

javiergn
Super Champion

I have edit your title as per the comment above

0 Karma

infra2sec
Path Finder

Title should have read "........Dedup all redundant data in a column...having an issue"

0 Karma

infra2sec
Path Finder

Title should have read "........Dedup all redundant data in a column...having an issue"

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