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!

Updated Team Landing Page in Splunk Observability

We’re making some changes to the team landing page in Splunk Observability, based on your feedback. The ...

New! Splunk Observability Search Enhancements for Splunk APM Services/Traces and ...

Regardless of where you are in Splunk Observability, you can search for relevant APM targets including service ...

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...