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 is Nurturing Tomorrow’s Cybersecurity Leaders Today

Meet Carol Wright. She leads the Splunk Academic Alliance program at Splunk. The Splunk Academic Alliance ...

Part 2: A Guide to Maximizing Splunk IT Service Intelligence

Welcome to the second segment of our guide. In Part 1, we covered the essentials of getting started with ITSI ...

Part 1: A Guide to Maximizing Splunk IT Service Intelligence

As modern IT environments continue to grow in complexity and speed, the ability to efficiently manage and ...