Deployment Architecture

How to build search for associate event code of a user?

debjit_k
Path Finder

Hi 

Hope you are doing good..

I want to build one query where I will get user with associate event code or IP for example 

If I use stats count by user, event code

I will get 

User event code 

Abc  1

Abc  2

 

But I want output like 

User event code 

Abc  1, 2 

I.e. User name should not get repeat for different event code 

 

Can you please guide me here 

 

Thanks 

Labels (1)
0 Karma
1 Solution

gcusello
SplunkTrust
SplunkTrust

Hi @debjit_k,

you should use values in your stats command, something like this:

<your_search>
| stats values(EventCode) AS EventCode values(ip) AS ip BY user

Ciao.

Giuseppe

View solution in original post

0 Karma

debjit_k
Path Finder

Hi @gcusello ,

thank you for the support I actually use list function. 

Thanks 

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @debjit_k,

good for you, see next time!

Ciao and happy splunking

Giuseppe

P.S.: Karma Points are appreciated 😉

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @debjit_k,

you should use values in your stats command, something like this:

<your_search>
| stats values(EventCode) AS EventCode values(ip) AS ip BY user

Ciao.

Giuseppe

0 Karma
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, ...