03 - Instalacion Splunk Universal Forwarder

Resultado real en este PC: instalado vía winget durante el proyecto. Servicio SplunkForwarder Running, UF Home = C:\Program Files\SplunkUniversalForwarder.

Opción A (recomendada): winget

Abre PowerShell como administrador y ejecuta:

winget install --exact --id Splunk.UniversalForwarder `
    --silent --accept-package-agreements --accept-source-agreements `
    --disable-interactivity

Después verifica:

Get-Service SplunkForwarder | Format-Table Name,Status,StartType
'C:\Program Files\SplunkUniversalForwarder\bin\splunk.exe' | Test-Path

Opción B: MSI manual

  1. Descargar splunkforwarder-<version>-windows-x64.msi desde https://www.splunk.com/en_us/download/universal-forwarder.html (requiere cuenta Splunk).
  2. Ejecutar como admin:
msiexec /i splunkforwarder-10.4.0-windows-x64.msi ^
    RECEIVING_INDEXER="127.0.0.1:9997" ^
    AGREET_TO_LICENSE=1 ^
    SET_ADMIN_USER=1 ^
    /L*v "%TEMP%\uf_install.log"

Sustituye 127.0.0.1:9997 por <ip_indexer>:9997 si el indexer está en otra máquina.

Post-instalación: prueba rápida de vía del CLI

& 'C:\Program Files\SplunkUniversalForwarder\bin\splunk.exe' status
& 'C:\Program Files\SplunkUniversalForwarder\bin\splunk.exe' set forward-server 127.0.0.1:9997
& 'C:\Program Files\SplunkUniversalForwarder\bin\splunk.exe' restart

En este proyecto usamos los archivos de configuración directamente (más reproducible): outputs.conf se copió al etc\system\local\ del UF. Ver Anexo B - outputs.conf.

Estado tras la instalación en este PC

  • MSI hash verificado por winget (output de transcript).
  • Servicio creado con tipo Automatic.
  • Carpeta de logs del UF: C:\Program Files\SplunkUniversalForwarder\var\log\splunk\splunkd.log.
  • mgmt port del UF: 8090 (NO 8089, distinto del indexer).
PS> Get-Service SplunkForwarder,Splunkd | Format-Table Name,Status,StartType

Name             Status StartType
----             ------ ---------
Splunkd          Running Automatic
SplunkForwarder  Running Automatic

Siguientes pasos

  1. Copiar/crear outputs.conf (ver 05 - Configuración Outputs y Anexo B - outputs.conf).
  2. Desplegar la app SOC-Windows-Local con inputs.conf (ver 04 - Configuración Inputs WinEventLog Sysmon Perfmon y Anexo A - inputs.conf).
  3. Habilitar receiving en el indexer (ver 06 - Habilitar Receiving 9997 en Indexer).
  4. Activar hardening de logging (ver 07 - Hardening Logging SOC).

Volver a: 00 - MOC Monitorización PC Local