Splunk Search

How can I display only 1 value in a timechart that uses a by

Splunked_Kid
Explorer

Hello
how can I display only 1 value of these 3 "maxCapacitMachine" results (which are the same in all 3 cases) in a BY timechart?

Splunked_Kid_0-1729802172670.png

 

Labels (1)
0 Karma
1 Solution

MuS
SplunkTrust
SplunkTrust

Please add this 

 | eval foo=0 | foreach max* [ eval foo='<<FIELD>>'] | fields - max* | rename foo AS max

at the end of your SPL 🙂 

View solution in original post

Splunked_Kid
Explorer

ok but max is a value that I get from the index and not a value that I attribute.  My problem is that the value I get from the index is the same for all 3 LPARs, I only want to display it 1 time.

 

0 Karma

Splunked_Kid
Explorer

Splunked_Kid_0-1729807359663.png

 

0 Karma

MuS
SplunkTrust
SplunkTrust

Please add this 

 | eval foo=0 | foreach max* [ eval foo='<<FIELD>>'] | fields - max* | rename foo AS max

at the end of your SPL 🙂 

Splunked_Kid
Explorer

It works! Thank you very much MuS!

0 Karma

MuS
SplunkTrust
SplunkTrust

Hi there,

if your max value is static, you could do something like this:

index=_internal sourcetype=* | timechart span=1h count by sourcetype | eval max=10000000

and this will produce 1 max line on the graph like this:

MuS_0-1729806614411.png

 

Hope this helps ...

cheers, MuS

0 Karma
Get Updates on the Splunk Community!

Data Management Digest – December 2025

Welcome to the December edition of Data Management Digest! As we continue our journey of data innovation, the ...

Index This | What is broken 80% of the time by February?

December 2025 Edition   Hayyy Splunk Education Enthusiasts and the Eternally Curious!    We’re back with this ...

Unlock Faster Time-to-Value on Edge and Ingest Processor with New SPL2 Pipeline ...

Hello Splunk Community,   We're thrilled to share an exciting update that will help you manage your data more ...