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!

Unlock Database Monitoring with Splunk Observability Cloud

  In today’s fast-paced digital landscape, even minor database slowdowns can disrupt user experiences and ...

Purpose in Action: How Splunk Is Helping Power an Inclusive Future for All

At Cisco, purpose isn’t a tagline—it’s a commitment. Cisco’s FY25 Purpose Report outlines how the company is ...

[Upcoming Webinar] Demo Day: Transforming IT Operations with Splunk

Join us for a live Demo Day at the Cisco Store on January 21st 10:00am - 11:00am PST In the fast-paced world ...