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
Get Updates on the Splunk Community!

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...