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!

Fueling your curiosity with new Splunk ILT and eLearning courses

At Splunk Education, we’re driven by curiosity—both ours and yours! That’s why we’re committed to delivering ...

Splunk AI Assistant for SPL 1.1.0 | Now Personalized to Your Environment for Greater ...

Splunk AI Assistant for SPL has transformed how users interact with Splunk, making it easier than ever to ...

Unleash Unified Security and Observability with Splunk Cloud Platform

     Now Available on Microsoft AzureOn Demand Now Step boldly into the AI revolution with enhanced security ...