Dashboards & Visualizations

Issue with Field other than _time to represent in x-axis

k_harini
Communicator

Hi,

I have to represent a different time field in the time chart. I have tried couple of options and it is not working
index="myindex" | eval Due_Time = strptime('Due By',"%d.%m.%Y")|bin Due_Time span=1mon |chart count over Due_Time by "Priority"
Here i get results in string and not date

  1. index="myindex" | eval Due_Time = strftime(strptime('Due By',"%d.%m.%Y"),"%d.%m.%Y")|bin Due_Time span=1mon |chart count over Due_Time by “Priority” - Here it displays date but span is not working.

Please help

Tags (1)
0 Karma
1 Solution

gcusello
SplunkTrust
SplunkTrust

I don't understand field 'Due By' in strfptime function.
Every way try to invert eval and bin commands:

index="myindex" | eval Due_Time = strptime('Due By',"%d.%m.%Y") |bin Due_Time span=1mon | eval Due_Time = strftime(Due_Time,"%d.%m.%Y") |chart count over Due_Time by “Priority” 

Bye.
Giuseppe

View solution in original post

gcusello
SplunkTrust
SplunkTrust

I don't understand field 'Due By' in strfptime function.
Every way try to invert eval and bin commands:

index="myindex" | eval Due_Time = strptime('Due By',"%d.%m.%Y") |bin Due_Time span=1mon | eval Due_Time = strftime(Due_Time,"%d.%m.%Y") |chart count over Due_Time by “Priority” 

Bye.
Giuseppe

k_harini
Communicator

Thank you! Worked the way i wanted 🙂

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...