# Datadog agent

**Status:** not yet available on Epok's hosted service. Use OpenTelemetry (OTLP) for now.

Send logs and metrics from your agent to Epok using an Epok ingest key. The key selects the workspace and project. This is agent intake; no Datadog account connection or SaaS import is involved.

## Configure the agent

These settings target agent 7.64.3. Replace the hosts with your Epok ingest hosts and use TLS outside a local network.

```
api_key: EPOK_INGEST_KEY
hostname: my-host
dd_url: http://localhost:8080
use_v2_api:
  series: false
serializer_compressor_kind: zlib
logs_enabled: true
logs_config:
  force_use_http: true
  logs_dd_url: localhost:3100
  logs_no_ssl: true
  use_v2_api: true
apm_config:
  enabled: false
remote_configuration:
  enabled: false
```

Add a file source in `conf.d/my-app.d/conf.yaml`:

```
logs:
  - type: file
    path: /var/log/my-app.log
    service: my-app
    source: application
```

## Supported intake

- `POST /api/v2/logs`: JSON log arrays; gzip supported.
- `POST /api/v1/series`: JSON gauges, counts and rates; gzip and deflate supported.
- `GET /api/v1/validate`: validates the Epok ingest key locally.
- `POST /api/v2/series`: returns 415. Set `use_v2_api.series: false`; recent agents default to protobuf.

Counts accumulate into running totals; rates are multiplied by their interval before accumulation. Gauges retain their values. Metric dots become underscores, so `my.app.requests` is queried as`my_app_requests`. Tags and host are retained as labels. Retries of the newest count/rate point do not add it twice. Older out-of-order points are rejected explicitly. Malformed v1 batches are rejected before writes; shared ingest policy may report rejected points with a 400 after storing supported points.

The agent sends `DD-API-KEY`; older `api_key` query parameters also work. Both use the same ingest-key lookup as`X-API-Key`. Missing or unknown keys return 401; scope failures return 403, quotas 429. Metrics bodies are capped at 8 MiB, including decompressed bytes. Metering uses the normalized metrics representation. Distribution sketches, events, service checks and agent APM are outside this compatibility row; disable those senders or configure them separately.
