Splunk Search

I need help on Splunk query

thiruyadav17
Engager

I need help on the query:



Labels (3)
0 Karma
1 Solution

manjunathmeti
Champion

hi @thiruyadav17 ,
1. Use stats command with eval function.

 

| stats count(eval(EndUserUID="EMER001")) as count

 

2. Does your lookup contain EndUserUID? Lookup and index should have a common field to join both.

 

| lookup lookup_name EndUserUID OUTPUT Subsystem Platform

 

You can combine 1 and 2 as below:

 

index=index sourcetype=sourcetype | lookup lookup_name EndUserUID OUTPUT Subsystem Platform | stats count(eval(EndUserUID="EMER001")) as count

 

 

If this reply helps you, an upvote/like would be appreciated.

View solution in original post

manjunathmeti
Champion

hi @thiruyadav17 ,
1. Use stats command with eval function.

 

| stats count(eval(EndUserUID="EMER001")) as count

 

2. Does your lookup contain EndUserUID? Lookup and index should have a common field to join both.

 

| lookup lookup_name EndUserUID OUTPUT Subsystem Platform

 

You can combine 1 and 2 as below:

 

index=index sourcetype=sourcetype | lookup lookup_name EndUserUID OUTPUT Subsystem Platform | stats count(eval(EndUserUID="EMER001")) as count

 

 

If this reply helps you, an upvote/like would be appreciated.

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 ...