Splunk Search

How to generate a search that will count the use of operating systems in our organization?

GenericSplunkUs
Path Finder

I'm trying to craft a search to count the use of operating systems in our organization. I don't want the duplicates.
The search I have right now isn't getting me the desired results.

index="LOGSIWANT" | stats count by OSVERSION | sort - count

This counts how many times the OS is in the logs, but doesn't account for 1 count per Host, It just counts it all.

I want to do this without counting everything. Host is the field that contains the computers name so how would I use this to parse my data down to 1 occurrence per host for a true count of what OS is most popular in our organization?

I've got several other searches that need this logic, but This example should be enough.

I'm headed out for the day and will answer this in the morning.

Thanks much ahead of time for the help Splunk Ninja Masters!

0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

How about this?

index="LOGSIWANT" | dedup host | stats count by OSVERSION | sort - count
---
If this reply helps you, Karma would be appreciated.

View solution in original post

richgalloway
SplunkTrust
SplunkTrust

How about this?

index="LOGSIWANT" | dedup host | stats count by OSVERSION | sort - count
---
If this reply helps you, Karma would be appreciated.
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...