Splunk Search

extracted date as x-axis range

athorat
Communicator

got a date extracted from a file name and got the count of files received on for that extracted date.

date-2016-03-28 extracted from the files received at a specific location.

 /ubidata/axway/JourneyData/AAA_NA_70_2016-03-28-00-47-08_353466071286872_1HGCR2F5XDA159398_0_0.zip

Now we want a time chart to show the count of extracted date(2016-03-28) on that date.
The default timechart shows values by system time. Want to use the extracted date as the xaxis date and showing the timechart trend for those counts.

Thanks.

Tags (3)
0 Karma

Jeremiah
Motivator

Convert your date to an epoch timestamp, and eval it to _time:

... | eval _time = strptime(file_date, "%F") | timechart dc(source)

0 Karma

athorat
Communicator

Hi @Jeremiah

Thanks for the update, we see an notification under the job tab :
Some events were removed by Timeliner because they were missing _time[p01apl385.ent.com] Some events were removed by Timeliner because they were missing _time

is there something which needs to be modified.

Thanks.

0 Karma

woodcock
Esteemed Legend

Your regex to create file_date is probably buggy. Try this to find broken events and enhance your field extraction:

... | where isnull(file_date)
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 ...