Im using powershell to install universal forwarders on the new machines that im spinning up using the following command:
cmd /c "msiexec.exe /i splunkforwarder-6.2.1-245427-x64-release.msi AGREETOLICENSE=Yes RECEIVING_INDEXER='simdc01:9997' MONITOR_PATH='c:\logs' PERFMON=cpu,memory,network,diskspace /quiet"
But this does not create an outputs.conf file containing the tcp settings so im doing this in powershell to manually create the file needed
$outputsConfString = @"
[tcpout]
defaultGroup = indexers
[tcpout:indexers]
server = simdc01:9997
"@
New-Item "C:\Program Files\SplunkUniversalForwarder\etc\system\local\outputs.conf" -type file -force -value $outputsConfString
My question is, is there a way to do this via the CLI or am i stuck with this hack?
It feels wrong to have to hack files in this way when there is tooling provided to automate things.
... View more