Splunk Search

No results found, I want to show other message!!!

caiyundong
Engager

Search :

index=server1 | table processName porcessCount

result A : search has a results.

processName   processCount

java 14

vi   2

result B : search has no results.

No results found, inspector...

How can i display it below...

processName   processCount

 No Process

Thanks.

Tags (1)
1 Solution

jonuwz
Influencer

Like this :

index=server1 | table processName processCount | appendpipe [ stats count | eval processName="No Process" | eval processCount=0 | where count==0 | fields - count ]

View solution in original post

jonuwz
Influencer

Like this :

index=server1 | table processName processCount | appendpipe [ stats count | eval processName="No Process" | eval processCount=0 | where count==0 | fields - count ]

smolcj
Builder
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...