Send logs to CloudPrem with REST API

Cette page n'est pas encore disponible en français, sa traduction est en cours.
Si vous avez des questions ou des retours sur notre projet de traduction actuel, n'hésitez pas à nous contacter.
Join the Preview!

Datadog CloudPrem is in Preview.

Overview

You can send logs to CloudPrem using direct REST API calls. This method is useful for custom integrations or scripts that can’t use a Datadog Agent or Observability Pipelines.

Datadog Logs API

Endpoint: POST /api/v2/logs
Content-Type: application/json
Authentication: Datadog API key

curl -X POST "http://<RELEASE_NAME>-indexer.<NAMESPACE_NAME>.svc.cluster.local:7280/api/v2/logs" \
  -H "Content-Type: application/json" \
  -H "DD-API-KEY: your-datadog-api-key" \
  -d '[
    {
      "message": "User login successful",
      "level": "info",
      "timestamp": "2024-01-15T10:30:00Z",
      "service": "auth-service",
      "host": "web-01",
      "tags": ["authentication", "success"]
    }
  ]'

Further reading