Destino Google Cloud Storage
El destino Google Cloud Storage está disponible para la plantilla Logs de archivos. Utiliza este destino para enviar tus logs en formato rehidratable en Datadog a un bucket de Google Cloud Storage para archivarlos. Debes configurar logs de archivos de Datadog, si aún no lo has hecho y, a continuación, debes configurar el destino en la interfaz de usuario del pipeline.
Configurar archivos de logs
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.
Allow the Observability Pipeline Worker to write to the bucket
To authenticate the Observability Pipelines Worker for Google Cloud Storage, contact your Google Security Operations representative for a Google Developer Service Account Credential. This credential is a JSON file and must be placed under DD_OP_DATA_DIR/config
. See Getting API authentication credential for more information.
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 Amazon S3 y sus variables de entorno cuando configures un pipeline de logs de archivos. La siguiente información se configura en la interfaz de usuario del pipeline.
- Introduce el nombre del bucket de almacenamiento de Google Cloud que creaste anteriormente.
- Introduce la ruta al archivo JSON de credenciales que descargaste anteriormente.
- 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 utilizas un prefijo con este fin, debe terminar en
/
para que actúe como una ruta de directorio; no se añade automáticamente una /
al final. - Si lo deseas, haz clic en Add Header (Añadir encabezado) para añadir metadatos.
Configurar las variables de entorno
There are no environment variables to configure.
Cómo funciona el destino
Colocación de eventos en lotes
Un lote de eventos se descarga cuando se cumple uno de estos parámetros. Para obtener más información, consulta la colocación de eventos en lotes.
Eventos máximos | Bytes máximos | Tiempo de espera (segundos) |
---|
Ninguno | 100,000,000 | 900 |