- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
aferone
Builder
11-05-2020
09:31 AM
I have a lookup table with certain Windows Event Codes. I am searching our Windows index for all Windows Event Codes. I would like a count of all Windows Event Codes, per Event Code, and a column that says whether that Event Code is in my lookup table. This is what I am attempting partly with what I found on Answers, but it isn't working:
| inputlookup MyWinEvCodes
| fields EventCode
| append
[ search index=winsevlog
| stats count as Count by EventCode
]
| eval Found = if(Count > 1,"Yes","No")
| stats count by EventCode, Found
| sort + count
Thank you in advance!
1 Solution
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

richgalloway

SplunkTrust
11-05-2020
10:46 AM
Try this query.
index=winsevlog
| stats count as Count by EventCode
| fields - count
| lookup MyWinEvCodes EventCode OUTPUT EventCode
| eval Found = if(isnotnull(EventCode),"Yes","No")
| table EventCode, Found
---
If this reply helps you, Karma would be appreciated.
If this reply helps you, Karma would be appreciated.
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
aferone
Builder
11-05-2020
01:14 PM
Thanks!
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

richgalloway

SplunkTrust
11-05-2020
10:46 AM
Try this query.
index=winsevlog
| stats count as Count by EventCode
| fields - count
| lookup MyWinEvCodes EventCode OUTPUT EventCode
| eval Found = if(isnotnull(EventCode),"Yes","No")
| table EventCode, Found
---
If this reply helps you, Karma would be appreciated.
If this reply helps you, Karma would be appreciated.
