Skip to main content
Config lists every Edge configuration option.

Configuration File

Edge uses a JSON configuration file. Pass the path as the first argument:
./edge config.json

Full Example

config.json
{
  "listen_address": "0.0.0.0",
  "listen_port": 8080,
  "upstream_url": "https://agent-http-intake.logs.datadoghq.com",
  "logs_url": "https://agent-http-intake.logs.datadoghq.com",
  "metrics_url": "https://api.datadoghq.com",
  "workspace_id": "your-workspace-id",
  "log_level": "info",
  "max_body_size": 1048576,
  "policy_providers": [
    {
      "id": "local",
      "type": "file",
      "path": "/etc/edge/policies.json"
    },
    {
      "id": "remote",
      "type": "http",
      "url": "https://api.usetero.com/v1/policies",
      "headers": [
        {
          "name": "Authorization",
          "value": "Bearer your-api-key"
        }
      ]
    }
  ]
}

Configuration Reference

Edge supports up to 8,000 policies. Open an issue on GitHub if you need more.

Server Settings

FieldTypeDefaultDescription
listen_addressstring"127.0.0.1"IP address to bind to
listen_portnumber8080Port to listen on
max_body_sizenumber1048576Maximum request body size in bytes (1MB default)
log_levelstring"info"Logging level: trace, debug, info, warn, err

Upstream Settings

FieldTypeRequiredDescription
upstream_urlstringYesDefault upstream destination (fallback when specific URLs not set)
logs_urlstringNoUpstream destination for log endpoints (falls back to upstream_url)
metrics_urlstringNoUpstream destination for metrics endpoints (falls back to upstream_url)

Workspace Settings

FieldTypeRequiredDescription
workspace_idstringNoWorkspace identifier for policy sync

Policy Providers

The policy_providers array configures where Edge loads policies from.

File Provider

Loads policies from a local file and watches for changes.
{
  "id": "local",
  "type": "file",
  "path": "/etc/edge/policies.json"
}
FieldTypeRequiredDescription
idstringYesUnique identifier for this provider
typestringYesMust be "file"
pathstringYesPath to the policy file
Edge watches the file with inotify (Linux) or kqueue (macOS) and applies changes on save.

HTTP Provider

Loads policies from an HTTP endpoint with periodic polling.
{
  "id": "remote",
  "type": "http",
  "url": "https://api.example.com/policies",
  "headers": [
    {
      "name": "Authorization",
      "value": "Bearer token"
    }
  ]
}
FieldTypeRequiredDescription
idstringYesUnique identifier for this provider
typestringYesMust be "http"
urlstringYesURL to fetch policies from
headersarrayNoHTTP headers to include in requests

Policy File Format

Define policies in a JSON file:
policies.json
{
  "policies": [
    {
      "id": "policy-1",
      "name": "Human-readable name",
      "description": "What this policy does",
      "enabled": true,
      "log": {
        "match": [...],
        "keep": "...",
        "transform": {...}
      }
    },
    {
      "id": "policy-2",
      "name": "Another policy",
      "metric": {
        "match": [...],
        "keep": true
      }
    }
  ]
}
See the Policies section for detailed policy configuration.

Environment Variables

VariableDescription
TERO_LOG_LEVELOverride the configured log level

Next Steps

Operations

Logging, health checks, and resource requirements

Log Filtering

Configure log filtering policies