Getting Data In

Splunk remote windows data collection

aaronkorn
Splunk Employee
Splunk Employee

Hello,

We are looking at using the universal forwarder to collect remote windows data from event logs from approx 11,000 clients. Is this recommended and is there any documentation out there on how to set this up if we have all client machine names?

Thanks!

0 Karma

bmacias84
Champion

If you are worried about in flight data loss there is easy way to guaranty reciept of the data from the remove client as wmi is based on interval. I would recommend installing the UF locally on each 11,000 servers as the UF will have check points on the event logs and you can enable indexer acknowledgement.

0 Karma

jkat54
SplunkTrust
SplunkTrust

If you're using WMI this wont work. WMI causes issues once you get over about 60 WMI inputs.

You need to use universal forwarders installed locally on each server. If you're looking to script the install see these resources:

http://docs.splunk.com/Documentation/Splunk/5.0.2/Deploy/DeployaWindowsdfviathecommandline
http://docs.splunk.com/Documentation/Splunk/5.0.2/Installation/InstallonWindowsviathecommandline

I've tried to powershell this using winrm but havent had luck with msiexec running in a remote shell:

function Deploy-Splunk 
{
param (
[string] $ServerList = $(Read-Host -prompt "Path to server list (b:\splunk\qa\serverlist.txt)"),
[string] $MSI = $(Read-Host -prompt "Path to MSI (b:\splunkforwarder\forwarder.msi)"),
[string] $Indexer = $(Read-Host -prompt "Indexer Hostname or IP (serverhostname.com)"),
[string] $Port = $(Read-Host -prompt "Port Number (9999, 9997)"),
[string] $Options = $(Read-Host -prompt "Options (WINEVENTLOG_APP_ENABLE=1 WINEVENTLOG_SYS_ENABLE=1 WINEVENTLOG_SET_ENABLE=1 PERFMON=cpu,memory,network,diskspace SERVICESTARTTYPE=auto LAUNCHSPLUNK=1 AGREETOLICENSE=Yes /quiet)")
)

begin {
$error.Clear()
}

process {
$Cred=get-credential 
$Indexer='RECEIVING_INDEXER="' + $Indexer + ':' + $Port + '"'
$InstallCommand=msiexec.exe /i $MSI $Indexer $Options

foreach ($Server in (gc $ServerList)) {
$S = new-pssession -computername $Server -credential $Cred
invoke-command -session $S -Argumentlist @($InstallCommand) -ScriptBlock {
$error.Clear()
$InstallCommand

if ($error -ne '$null') {
$msg='SplunkUniversalForwarder Failed to Install.'  + '`n`r' + 'Installation Command: ' + $InstallCommand + '`n`r' + 'Calling Stack...' + '`n`r' + $error
Write-EventLog Splunk -Source Splunk -entrytype error -eventID 999 -message "$msg"
$error.Clear()
} #end if error

if ($error -eq '$null') {
$msg='SplunkUniversalForwarder Installed Successfully.'  + '`n`r' + 'Installation Command: ' + $InstallCommand
Write-EventLog Splunk -Source Splunk -entrytype error -eventID 999 -message "$msg"
} #end if error

} #end invoke-command / scriptblock

} #end foreach loop

} #end process

} #end function Deploy-Splunk

aaronkorn
Splunk Employee
Splunk Employee

This is an option that we could do with SCCM and yes we are with in flight data loss.

bmacias84
Champion

Why not install a UF on the clients? 11,00 client for one UF seems a bit hefty. Also how concerned are you with in flight data losss?

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Fuel Your Journey: What’s Waiting for You at the .conf26 Acceleration Station

Navigating the show floor at .conf26 isn't just about keynotes and technical breakout sessions; it's also ...

Join the Final Session of the Data Management & Federation Bootcamp Series

Over the past three sessions of the Data Management & Federation Bootcamp Series, we've explored how to build ...

From Data to Insight: Announcing the Winners of the Splunk Dashboard Contest

Hi Splunkers, First off, thank you to everyone who participated in our very first From Data to Insight: The ...