Splunk Search

list eventccode and host

Huss54
Engager

Hello,

I hope someone could help me out figuring out this one out. The core of what I am trying to do is get a list of all event codes in an index and source sorted on source to understand what is sending information if I am missing anything. 

index=acg_eis_auth EventCode=* | dedup EventCode | fields EventCode
| stats count by EventCode

Labels (4)
0 Karma
1 Solution

scelikok
SplunkTrust
SplunkTrust

Hi @Huss54,

Please try below;

index=acg_eis_auth EventCode=* 
| stats count by EventCode source host
| sort - count

 

If this reply helps you an upvote and "Accept as Solution" is appreciated.

View solution in original post

richgalloway
SplunkTrust
SplunkTrust

Remove the dedup command.  Deduplicating a field before counting that field means every value will have a count of 1.

---
If this reply helps you, Karma would be appreciated.

scelikok
SplunkTrust
SplunkTrust

Hi @Huss54,

Please try below;

index=acg_eis_auth EventCode=* 
| stats count by EventCode source host
| sort - count

 

If this reply helps you an upvote and "Accept as Solution" is appreciated.

Huss54
Engager

Thank you so much that was exactly what i was looking 🙂

0 Karma
Get Updates on the Splunk Community!

Splunk MCP & Agentic AI: Machine Data Without Limits

  Discover how the Splunk Model Context Protocol (MCP) Server can revolutionize the way your organization ...

Finding Based Detections General Availability

Overview  We’ve come a long way, folks, but here in Enterprise Security 8.4 I’m happy to announce Finding ...

Get Your Hands Dirty (and Your Shoes Comfy): The Splunk Experience

Hands-On Learning and Technical Seminars  Sometimes, you just need to see the code. For those looking for a ...