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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...