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.
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Beyond Detection: How Splunk and Cisco Integrated Security Platforms Transform ...

Financial services organizations face an impossible equation: maintain 99.9% uptime for mission-critical ...

Customer success is front and center at .conf25

Hi Splunkers, If you are not able to be at .conf25 in person, you can still learn about all the latest news ...

.conf25 Global Broadcast: Don’t Miss a Moment

Hello Splunkers, .conf25 is only a click away.  Not able to make it to .conf25 in person? No worries, you can ...