Deployment Architecture

Bucket against field other than _time

jacqu3sy
Path Finder

Can I use the bucket command to group fields by time/date when extracted against a field other than _time?

I have a field called pub date in this format; 2017-10-04 09:00:27

and was hoping the following would group the events into buckets of 6 hours;

index=* | bucket pubdate span=6h | stats count by pub date

Dosent seem to work, just lists all the individual events.

0 Karma
1 Solution

kyaparla
Path Finder

Thats is possible, but you need to convert pubdate from string to time field like below.

| eval pubdate_time=strptime(pubdate, "%Y-%m-%d %H:%M:%S") | bin span=6h pubdate_time

View solution in original post

0 Karma

kyaparla
Path Finder

Thats is possible, but you need to convert pubdate from string to time field like below.

| eval pubdate_time=strptime(pubdate, "%Y-%m-%d %H:%M:%S") | bin span=6h pubdate_time

0 Karma

jacqu3sy
Path Finder

that makes sense. thanks.

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...