Destino Google Cloud Storage
Este producto no es compatible con el
sitio Datadog seleccionado. (
).
Utiliza el destino Google Cloud Storage para enviar tus logs a un bucket de Google Cloud Storage. Si quieres enviar logs a Google Cloud Storage para archivar y rehidratar, debes configurar archivos de logs. Si no quieres rehidratar logs en Datadog, ve directamente a Configurar el destino de tu pipeline.
El worker de Observability Pipelines utiliza los métodos de autenticación estándar de Google. Consulta Métodos de autenticación en Google para obtener más información sobre cómo elegir el método de autenticación para tu uso caso.
Configurar archivos de logs
Este paso solo es necesario si quieres enviar logs a Google Cloud Storage para archivar y rehidratar y aún no tienes un archivo de logs de Datadog configurado para Observability Pipelines. Si ya tienes configurado un archivo de logs de Datadog o no quieres rehidratar tus logs en Datadog, ve directamente a Configurar el destino de tu pipeline.
Si ya tienes un archivo de log de Datadog configurado para Observability Pipelines, ve directamente a Configurar el destino de tu pipeline.
Para configurar archivos de logs de Datadog necesitas tener instalada la integración Google Cloud Platform de Datadog.
Create a storage bucket
- Navigate to Google Cloud Storage.
- On the Buckets page, click Create to create a bucket for your archives..
- Enter a name for the bucket and choose where to store your data.
- Select Fine-grained in the Choose how to control access to objects section.
- Do not add a retention policy because the most recent data needs to be rewritten in some rare cases (typically a timeout case).
- Click Create.
Create a service account to allow Workers to write to the bucket
- Create a Google Cloud Storage service account.
- Grant the Service Account permissions to your bucket with
Storage Admin and Storage Object Admin permissions. - If you want to authenticate with a credentials file, download the service account key file and place it under
DD_OP_DATA_DIR/config. You reference this file when you set up the Google Cloud Storage destination later on.
- Follow these instructions to create a service account key. Choose
json for the key type.
Connect the storage bucket to Datadog Log Archives
- Navigate to Datadog Log Forwarding.
- Click New archive.
- Enter a descriptive archive name.
- Add a query that filters out all logs going through log pipelines so that none of those logs go into this archive. For example, add the query
observability_pipelines_read_only_archive, assuming no logs going through the pipeline have that tag added. - Select Google Cloud Storage.
- Select the service account your storage bucket is in.
- Select the project.
- Enter the name of the storage bucket you created earlier.
- Optionally, enter a path.
- Optionally, set permissions, add tags, and define the maximum scan size for rehydration. See Advanced settings for more information.
- Click Save.
See the Log Archives documentation for additional information.
Configurar el destino de tu pipeline
Configura el destino Google Cloud Storage y sus variables de entorno cuando configures un pipeline de archivo de logs. La siguiente información se configura en la interfaz de usuario del pipeline.
- Introduce el nombre de tu bucket de Google Cloud Storage. Si configuraste archivos de logs, es el bucket que creaste anteriormente.
- Si tienes un archivo JSON de credenciales, introduce la ruta de acceso a tu archivo JSON de credenciales. Si configuraste archivos de logs, son las credenciales que descargaste anteriormente. El archivo de credenciales debe colocarse en
DD_OP_DATA_DIR/config. Alternativamente, puedes utilizar la variable de entorno GOOGLE_APPLICATION_CREDENTIALS para proporcionar la ruta de acceso a credenciales. - Selecciona la clase de almacenamiento para los objetos creados.
- Selecciona el nivel de acceso de los objetos creados.
- Opcionalmente, introduce el prefijo.
- Los prefijos son útiles para particionar objetos. Por ejemplo, puedes utilizar un prefijo como clave de objeto para almacenar objetos en un directorio concreto. Si se utiliza un prefijo con este fin, debe terminar en
/ para que actúe como una ruta de directorio; no se añade automáticamente un / al final. - Consulta la sintaxis de plantillas si quieres dirigir los logs a diferentes claves de objeto en función de campos específicos de tus logs.
- Nota: Datadog recomienda empezar los prefijos con el nombre del directorio y sin barra oblicua (
/). Por ejemplo, app-logs/ o service-logs/.
- Si lo deseas, haz clic en Add Header (Añadir encabezado) para añadir metadatos.
- Optionally, toggle the switch to enable Buffering Options. Enable a configurable buffer on your destination to ensure intermittent latency or an outage at the destination doesn’t create immediate backpressure, and allow events to continue to be ingested from your source. Disk buffers can also increase pipeline durability by writing logs to disk, ensuring buffered logs persist through a Worker restart. See Destination buffers for more information.
- If left unconfigured, your destination uses a memory buffer with a capacity of 500 events.
- To configure a buffer on your destination:
- Select the buffer type you want to set (Memory or Disk).
- Enter the buffer size and select the unit.
- Maximum memory buffer size is 128 GB.
- Maximum disk buffer size is 500 GB.
- In the Behavior on full buffer dropdown menu, select whether you want to block events or drop new events when the buffer is full.
Configurar secretos
These are the defaults used for secret identifiers and environment variables.
Note: If you enter identifiers for your secrets 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.
No hay identificadores secretos que configurar.
Google Cloud Storage
There are no environment variables to configure.
Cómo funciona el destino
Procesamiento de eventos por lotes
Un lote de eventos se descarga cuando se cumple uno de estos parámetros. Consulta lote de eventos para obtener más información.
| Eventos máximos | Bytes máximos | Tiempo de espera (segundos) |
|---|
| Ninguno | 100,000,000 | 900 |