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
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

From Data to Insight: Announcing the Winners of the Splunk Dashboard Contest

Hi Splunkers, First off, thank you to everyone who participated in our very first From Data to Insight: The ...

Splunk Developers: Construct Your Future at the .conf26 Builder Bar

Calling all Splunk architects, platform admins, and app developers: the site is open, and the blueprints are ...

Quick connection discovery mode for forwarders

When a Splunk forwarder loses connectivity to its indexers, it does not always reconnect immediately. In many ...