Splunk Search

Truncate Timechart X Axis To Just Seconds

woody1
Observer

So I have a timechart that I'm using to plot latencies. I am trying to just capture the seconds and miliseconds. I do not need the Date, Hours and Minutes, nor the AM / PM values. How do I truncate the x axis labels to do such a thing?

woody1_0-1615836136261.png

 

 

 

index="test_index_3" | timechart values(value) as Messages span=1ms

 

 

 

 

Labels (1)
Tags (2)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Try renaming _time to a different name and formatting the field to the required time format (strftime). The chart visualisation is recognising that _time is being used and imposing format; by using a different name, you can specify the format yourself.

0 Karma

woody1
Observer

So the problem with that, is when you label it different with the strftime, it truncates the labels or does not space them out automatically similar to the way it does with a timechart. e.g. it treats each value no longer as a time, but as a string, so when you go to plot it, it doesn't know how to treat the values like it does with time where it goes: (in a 30 milisecond scan) well I'll just label each occurrence as 2 milliseconds rather than 1 millisecond because this timechart cant fit 30 labels, but it can fit 15. 

Tags (1)
0 Karma
Get Updates on the Splunk Community!

Splunk Classroom Chronicles: Training Tales and Testimonials

Welcome to the "Splunk Classroom Chronicles" series, created to help curious, career-minded learners get ...

Access Tokens Page - New & Improved

Splunk Observability Cloud recently launched an improved design for the access tokens page for better ...

Stay Connected: Your Guide to November Tech Talks, Office Hours, and Webinars!

🍂 Fall into November with a fresh lineup of Community Office Hours, Tech Talks, and Webinars we’ve ...