You need to install the Splunk Add-on for Unix and Linux
https://docs.splunk.com/Documentation/AddOns/released/UnixLinux/About
With this you can ollect *nix data from *nix hosts.
Then you enable the input version.sh on the hosts that you want the information from and that gives you the OS version details.
From here you can create a SPL search and or report for each host.