Splunk Search

When using the timechart command, how do you show multiple Max Values?

luckyman80
Path Finder

Hi Splunk Community! Quick one for all you experts!

I'm trying to timechart the following 4 separate metrics (representing a threading model and latency in nanoseconds). I don't get any results back when performing the below, but when i search for just for Max1 and search Thread:1(obviously just using timechart for Max1, it plots fine

FullRunLatency sourcetype="my-logs"  source="/var/tmp/mylogs.log*" 
| rex field=source "prototype(?.*?)_"| search Thread:1 
|rex "Latency.* Max: (?.*?)ns"   
| rex field=source "prototype(?.*?)_"| search Thread:2 
|rex "Latency.* Max: (?.*?)ns"   
| rex field=source "prototype(?.*?)_"| search Thread:3 
|rex "Latency.* Max: (?.*?)ns"   
| rex field=source "prototype(?.*?)_"| search Thread:4
|rex "Latency.* Max: (?.*?)ns"   
| timechart  max(Max1), max(Max2), max(Max3), max(Max4) by instance span=1m

Any ideas? Thanks in advance

0 Karma
1 Solution

sduff_splunk
Splunk Employee
Splunk Employee

The issue you are having is because you have a | search Thread:1, all other threads are being discarded after that point.

You probably need to incorporate the Thread:1 etc... into your rex statement. Can you provide some log samples.

View solution in original post

0 Karma

sduff_splunk
Splunk Employee
Splunk Employee

The issue you are having is because you have a | search Thread:1, all other threads are being discarded after that point.

You probably need to incorporate the Thread:1 etc... into your rex statement. Can you provide some log samples.

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Character substitutions with Regular Expressions

This challenge was first posted on Slack #puzzles channelFor BORE at .conf23, we had a puzzle question which ...

Splunk Community Badges!

  Hey everyone! Ready to earn some serious bragging rights in the community? Along with our existing badges ...

[Puzzles] Solve, Learn, Repeat: Matching cron expressions

This puzzle (first published here) is based on matching timestamps to cron expressions.All the timestamps ...