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!

Archived Metrics Now Available for APAC and EMEA realms

We’re excited to announce the launch of Archived Metrics in Splunk Infrastructure Monitoring for our customers ...

Detecting Remote Code Executions With the Splunk Threat Research Team

WATCH NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If exploited, ...

Enter the Dashboard Challenge and Watch the .conf24 Global Broadcast!

The Splunk Community Dashboard Challenge is still happening, and it's not too late to enter for the week of ...