Skip to main content

OTLP Configuration Reference

Full reference for pharlux.toml. All fields have sensible defaults — a zero-length config file is valid.

[server]

KeyTypeDefaultDescription
bind_addressstring"0.0.0.0"Address to bind all listeners
http_portu163100REST API port
otlp_grpc_portu164317OTLP gRPC ingestion port
otlp_http_portu164318OTLP HTTP/protobuf ingestion port
tls_cert_filepath(none)TLS certificate (use reverse proxy instead)
tls_key_filepath(none)TLS private key
cors_allowed_originslist[]CORS allowed origins for the REST API

[storage]

KeyTypeDefaultDescription
data_dirpath/var/lib/pharluxRoot data directory
retention_daysu3230Automatic data retention (days)
wal_max_segment_bytesu6467108864 (64 MB)Max WAL segment size before rotation
wal_max_total_bytesu64536870912 (512 MB)Max total WAL size
parquet_row_group_bytesu64134217728 (128 MB)Target Parquet row group size
parquet_compressionstring"zstd"Compression algorithm
parquet_zstd_levelu83Zstd compression level (1-22)

[ingest]

KeyTypeDefaultDescription
channel_capacityu321000Bounded mpsc channel size (batches)
send_timeout_msu32100Timeout before returning 429/RESOURCE_EXHAUSTED
late_arrival_window_secondsu323600Reject points older than this
reject_future_secondsu323600Reject points further in the future than this

[query]

KeyTypeDefaultDescription
memory_pool_mbu32256DataFusion MemoryPool cap (ADR-0011)
query_timeout_secondsu3230Query execution timeout
max_result_rowsu32100000Default max rows per query
max_concurrent_queriesu3216Max concurrent query executions

[auth]

KeyTypeDefaultDescription
jwt_secret_filepath/etc/pharlux/jwt.secretPath to JWT signing secret (>= 32 bytes)
token_ttl_secondsu323600JWT token lifetime
argon2_memory_kbu3219456Argon2id memory cost (OWASP 2023: 19 MiB)
argon2_time_costu322Argon2id iterations
argon2_parallelismu321Argon2id parallelism

[alerts]

KeyTypeDefaultDescription
evaluation_interval_secondsu3260Alert rule evaluation interval
max_consecutive_panicsu323Circuit breaker: self-disable after N panics
notification_timeout_secondsu3210Webhook notification timeout

[telemetry]

KeyTypeDefaultDescription
self_scrape_enabledbooltrueEnable self-observability metrics
self_scrape_interval_secondsu3215Self-scrape interval
log_levelstring"info"Log level (trace, debug, info, warn, error)

Example configuration

[server]
bind_address = "0.0.0.0"
http_port = 3100

[storage]
data_dir = "/var/lib/pharlux"
retention_days = 14

[query]
memory_pool_mb = 256

[auth]
jwt_secret_file = "/etc/pharlux/jwt.secret"

[telemetry]
log_level = "info"

OTLP endpoints

EndpointMethodContent-TypeDescription
/v1/metrics (port 4318)POSTapplication/x-protobufOTLP HTTP metrics
/v1/logs (port 4318)POSTapplication/x-protobufOTLP HTTP logs
gRPC MetricsService/Export (port 4317)gRPCprotobufOTLP gRPC metrics
gRPC LogsService/Export (port 4317)gRPCprotobufOTLP gRPC logs

Backpressure

When the ingest channel is full, Pharlux returns:

  • HTTP: 429 Too Many Requests
  • gRPC: RESOURCE_EXHAUSTED

The OTel Collector's built-in retry mechanism handles this automatically.

Timestamp validation

  • Points with timestamps older than late_arrival_window_seconds (default 1 hour) are rejected
  • Points with timestamps more than reject_future_seconds (default 1 hour) in the future are rejected
  • Points with zero timestamps are rejected