Fuente Splunk HTTP Event Collector (HEC)
Este producto no es compatible con el
sitio Datadog seleccionado. (
).
Disponible para:
Registros
Descripción general
Utilice la fuente Splunk HTTP Event Collector (HEC) de Observability Pipelines para recibir registros de su Splunk HEC. Puede optar por almacenar el token HEC como metadatos del evento y:
- Enviar registros desde Observability Pipelines a Splunk HEC con el token original enviado con el evento.
- Utilice el procesador de tabla de enriquecimiento para agregar un campo de registro de su archivo de búsqueda basado en el token en los metadatos, y luego procese y dirija sus registros según el valor de ese campo.
Notas:
Requisitos previos
To use Observability Pipelines’ Splunk HTTP Event Collector (HEC) source, you have applications sending data to Splunk in the expected HEC format.
To use Observability Pipelines’ Splunk HEC destination, you have a Splunk Enterprise or Cloud instance configured with an HTTP Event Collector (HEC) input. You also have the following information available:
- The Splunk HEC token.
- The bind address that your Observability Pipelines Worker will listen on to receive logs from your applications. For example,
0.0.0.0:8080. Later on, you configure your applications to send logs to this address. - The base URL of the Splunk instance that the Worker will send processed logs to. This URL should include the port that is globally configured for Splunk HTTP Event Collectors on your Splunk instance. For example, for Splunk Cloud:
https://prd-p-0mupp.splunkcloud.com:8088. - If your HECs are globally configured to enable SSL, then you also need the appropriate TLS certificates and password you used to create your private key file.
See Configure HTTP Event Collector on Splunk Web for more information about setting up Splunk HEC.
Note: Observability Pipelines does not support HEC Indexer Acknowledgement.
Configuración
Para la gestión de secretos: solo ingrese los identificadores para la dirección de Splunk HEC y, si corresponde, las claves de la contraseña de la clave TLS y del token de autenticación. No ingrese los valores reales.
Configure esta fuente cuando configure una canalización. Puede configurar un pipeline en la UI, utilizando la API o con Terraform. Las instrucciones de esta sección son para configurar la fuente en la interfaz de usuario.
Después de seleccionar la fuente Splunk HEC en el pipeline UI:
- Ingrese el identificador para su dirección de Splunk HEC. Si lo deja en blanco, se utiliza el predeterminado.
- Solo habilite Store HEC token si desea realizar una de las siguientes acciones:
- Utilice un destino Splunk HEC con la estrategia de token From Source.
- Utilice un procesador de tabla de enriquecimiento para asignar tokens de Splunk HEC desde un archivo local.
If you enter secret identifiers and then choose to use environment variables, the environment variable is the identifier entered and prepended with DD_OP_. For example, if you entered PASSWORD_1 for a password identifier, the environment variable for that password is DD_OP_PASSWORD_1.
Configuración opcional
Habilitar TLS
Toggle the switch to Enable TLS.
- If you are using Secrets Management, enter the identifier for the key pass. See Secret defaults for the default used if the field is left blank.
- Enter the following certificate and key files:
Server Certificate Path: The path to the certificate file that has been signed by your Certificate Authority (CA) root file in DER, PEM, or CRT (X.509).- (Optional)
CA Certificate Path: The path to the certificate file that is your Certificate Authority (CA) root file in DER, PEM, or CRT (X.509). - (Optional)
Private Key Path: The path to the .key private key file that belongs to your Server Certificate Path in DER, PEM, or CRT (PKCS #8) format. - Notes:
- The configuration data directory
/var/lib/observability-pipelines-worker/config/ is automatically appended to the file paths. See Advanced Worker Configurations for more information. - The file must be readable by the
observability-pipelines-worker group and user.
- (Optional) Toggle Verify certificate to require connecting clients to present a valid client certificate. This enforces mutual TLS (mTLS), where the Worker verifies the identity of each connecting client.
Si almacena tokens de Splunk HEC en el encabezado de autorización de su solicitud HTTP, puede configurar Observability Pipelines para verificar si las solicitudes HTTP entrantes tienen un token válido. Los eventos de solicitud que no tienen un token válido se descartan.
Para configurar tokens de autenticación, habilite el interruptor Configure authentication tokens:
- Haga clic en Manage Tokens y luego en Add Token.
- Ingrese el identificador para su clave de token.
Nota: Si está utilizando variables de entorno, la variable de entorno para este token es el identificador que ingresó precedido por DD_OP_. - (Opcional) Ingrese un campo y un valor si desea agregar información adicional a los registros autenticados correctamente con este token específico.
Valores predeterminados de Secret
These are the defaults used for secret identifiers and environment variables.
- Identificador de dirección de Splunk HEC:
- Hace referencia a la dirección de enlace, como
0.0.0.0:8088, en la que su Observability Pipelines Worker escucha para recibir registros destinados originalmente al indexador de Splunk. - El identificador predeterminado es
SOURCE_SPLUNK_HEC_ADDRESS.
- Identificador de frase de contraseña de TLS de Splunk HEC (cuando TLS está habilitado):
- El identificador predeterminado es
SOURCE_SPLUNK_HEC_KEY_PASS.
- Splunk HEC address:
- The bind address that your Observability Pipelines Worker listens on to receive logs originally intended for the Splunk indexer. For example,
0.0.0.0:8088
Note: /services/collector/event is automatically appended to the endpoint. - The default environment variable is
DD_OP_SOURCE_SPLUNK_HEC_ADDRESS.
- Splunk HEC TLS passphrase (when enabled):
- The default environment variable is
DD_OP_SOURCE_SPLUNK_HEC_KEY_PASS.
Send logs to the Observability Pipelines Worker over Splunk HEC
After you install the Observability Pipelines Worker and deploy the configuration, the Worker exposes three HTTP endpoints that uses the Splunk HEC API:
/services/collector/event/services/collector/raw/services/collector/health
To send logs to your Splunk index, you must point your existing logs upstream to the Worker.
curl http://<OPW_HOST>:8088/services/collector/event \
-d '{"event": {"a": "value1", "b": ["value1_1", "value1_2"]}}'
<OPW_HOST> is the IP/URL of the host (or load balancer) associated with the Observability Pipelines Worker. For CloudFormation installs, the LoadBalancerDNS CloudFormation output has the correct URL to use. For Kubernetes installs, the internal DNS record of the Observability Pipelines Worker service can be used, for example opw-observability-pipelines-worker.default.svc.cluster.local.
At this point, your logs should be going to the Worker, processed by the pipeline, and delivered to the configured destination.
Enviar registros desde la distribución de Splunk del OpenTelemetry Collector a Observability Pipelines
Para enviar registros desde la distribución de Splunk del OpenTelemetry Collector:
- Instale el Splunk OpenTelemetry Collector según su entorno:
- Configure una pipeline con la fuente Splunk HEC.
- Configure el Splunk OpenTelemetry Collector:
cp /etc/otel/collector/splunk-otel-collector.conf.example etc/otel/collector/splunk-otel-collector.conf
# Splunk HEC endpoint URL, if forwarding to Splunk Observability Cloud
# SPLUNK_HEC_URL=https://ingest.us0.signalfx.com/v1/log
# If you're forwarding to a Splunk Enterprise instance running on example.com, with HEC at port 8088:
SPLUNK_HEC_URL=http://<OPW_HOST>:8088/services/collector
<OPW_HOST> es la IP o URL del servidor (o balanceador de carga) asociado con el Observability Pipelines Worker.- Para instalaciones de CloudFormation, la
LoadBalancerDNS salida de CloudFormation tiene la URL correcta que debe usar. - Para instalaciones de Kubernetes, se puede usar el registro DNS interno del servicio de Observability Pipelines Worker, por ejemplo
opw-observability-pipelines-worker.default.svc.cluster.local.
Nota: Si utiliza un firewall, asegúrese de que permita el tráfico desde el Splunk OpenTelemetry Collector hacia el Worker.