Splunk Search

How to write a search to pull the OS distribution of all hosts in an AWS environment, along with their versions?

cotekyle
Explorer

I'm looking for a search to pull the OS distribution of all hosts in an AWS environment, along with their version. Purpose is to get a snapshot from across an environment with 400+ hosts with what is within.

Even though I know I would need to edit, I started off using a base search of:

 index=_internal fwdType="*" | dedup hostname | stats count by os, version

But that doesn't get to what I'm looking for which would be a count to say
Linux CentOS 5.5 10 hosts
Linux Ubuntu 6 8 hosts
etc.

Any ideas?

0 Karma

MuS
Legend

Hi cotekyle,

the field version in index=_internal is related to the Splunk version and not related to the OS version. You would need to use the Windows App https://splunkbase.splunk.com/app/1680/ or the *unix App https://splunkbase.splunk.com/app/273/ or any other script / WMI to get the OS version.

cheers, MuS

0 Karma

cotekyle
Explorer

I have the Unix app for Splunk installed. any additional guidance on where in the app to look or what search to run? Sorry, I'm very new to this.

Thanks, Kyle

MuS
Legend

search on index=os you should find the information in there

0 Karma
Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

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