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.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...