Dashboards & Visualizations

Display date on X axis

clementros
Path Finder

Hi all,

I'm trying to generate a timechart wich expose execution duration of a file. I almost succeed but i'm not able to generate an X axis with tiimestamp visible. Is it possible ?

index="saplogs" sourcetype=SAPCARBOOKING source="CARBOOKING.*.log" 
| stats min(_time) as start max(_time) as end by source 
| eval duration=end-start 
| eval start=strftime(start, "%Y-%m-%d %H:%M:%S") 
| eval end=strftime(end, "%Y-%m-%d %H:%M:%S") 
| stats avg(duration) as Duration by end, source 
| rename end as "End of processing date"

In stats line i sort by end date and source. Because i want to see the source concerned by the duration field.

Thank you for your help.

Tags (1)
0 Karma
1 Solution

arjunpkishore5
Motivator

Use end as the time field and then use a timechart.

index="saplogs" sourcetype=SAPCARBOOKING source="CARBOOKING.*.log" 
 | stats min(_time) as start max(_time) as end by source 
 | eval duration=end-start 
 | eval _time=end
 | timechart avg(duration) as Duration by  source 

View solution in original post

arjunpkishore5
Motivator

Use end as the time field and then use a timechart.

index="saplogs" sourcetype=SAPCARBOOKING source="CARBOOKING.*.log" 
 | stats min(_time) as start max(_time) as end by source 
 | eval duration=end-start 
 | eval _time=end
 | timechart avg(duration) as Duration by  source 
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...