Getting Data In

RHL version on all the UF

deepakgaonkar
Explorer

HI All ,

Could you please help me in getting the query to get red hat linux version on the all UF , i have checked many splunk answers the query uses metrics logs and i got only the version of the splunk and os as Linux , but not the actual linux version on the host .

Tags (1)
0 Karma
1 Solution

gcusello
SplunkTrust
SplunkTrust

Hi @deepakgaonkar,
if you need only operative system of each target server, you can use a search like this on Deployment Server:

| rest splunk_server=local /services/deployment/server/clients | table instanceName ip utsname

If instead you want more infos about your servers, as the operative system version, you have to use a Technology Add-On (TA) to extract this info from the target.
I'm speaking of TA_Windows (for Windows Servers) and TA_nix (for Linux servers).
You have to take these TAs, enable the stanza to check the operative system version and deploy them to all the targets.

Then you can run a search like this:
for Windows servers:

index=windows sourcetype=WinHostMon Type=OperatingSystem 
            | eval host=upper(host)
            | dedup host 
            | sort host 
            | table OS Version ServicePack BuildNumber SerialNumber InstallDate LastBootUpTime
            | eval 
               InstallDate=strftime(strptime(InstallDate,"%Y%m%d%H%M%S"),"%d/%m/%Y %H.%M.%S"),
               LastBootUpTime=strftime(strptime(LastBootUpTime,"%Y%m%d%H%M%S"),"%d/%m/%Y %H.%M.%S")

For Linux servers:

index=os sourcetype=Unix:Version
            | table os_name os_release os_version machine_architecture_name
            | rename os_name AS "Operative System" os_release AS Release os_version AS Version machine_architecture_name AS Architecture

Ciao.
Giuseppe

View solution in original post

0 Karma

nickhills
Ultra Champion

Install the Splunk Addon for Unix to your forwarders, and configure version.sh
https://splunkbase.splunk.com/app/833/

This input collects detailed version information from your host (amongst many other useful things if you wish), and as a bonus will add it to the Inventory Data model.

If my comment helps, please give it a thumbs up!
0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @deepakgaonkar,
if you need only operative system of each target server, you can use a search like this on Deployment Server:

| rest splunk_server=local /services/deployment/server/clients | table instanceName ip utsname

If instead you want more infos about your servers, as the operative system version, you have to use a Technology Add-On (TA) to extract this info from the target.
I'm speaking of TA_Windows (for Windows Servers) and TA_nix (for Linux servers).
You have to take these TAs, enable the stanza to check the operative system version and deploy them to all the targets.

Then you can run a search like this:
for Windows servers:

index=windows sourcetype=WinHostMon Type=OperatingSystem 
            | eval host=upper(host)
            | dedup host 
            | sort host 
            | table OS Version ServicePack BuildNumber SerialNumber InstallDate LastBootUpTime
            | eval 
               InstallDate=strftime(strptime(InstallDate,"%Y%m%d%H%M%S"),"%d/%m/%Y %H.%M.%S"),
               LastBootUpTime=strftime(strptime(LastBootUpTime,"%Y%m%d%H%M%S"),"%d/%m/%Y %H.%M.%S")

For Linux servers:

index=os sourcetype=Unix:Version
            | table os_name os_release os_version machine_architecture_name
            | rename os_name AS "Operative System" os_release AS Release os_version AS Version machine_architecture_name AS Architecture

Ciao.
Giuseppe

0 Karma
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!

Introduction to Splunk AI

How are you using AI in Splunk? Whether you see AI as a threat or opportunity, AI is here to stay. Lucky for ...

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...

Maximizing the Value of Splunk ES 8.x

Splunk Enterprise Security (ES) continues to be a leader in the Gartner Magic Quadrant, reflecting its pivotal ...