TimelessLogs.HTTP (timeless_logs v1.4.12)

Copy Markdown View Source

Optional HTTP interface compatible with VictoriaLogs.

Usage

Add to your config:

config :timeless_logs, http: true                          # port 9428, no auth
config :timeless_logs, http: [port: 9500, bearer_token: "secret"]

Or add to your supervision tree directly:

children = [
  {TimelessLogs.HTTP, port: 9428}
]

Endpoints

Ingest

  • POST /insert/jsonline - NDJSON log ingest (VictoriaLogs format)

Query

  • GET /select/logsql/query - Query logs with filters, returns NDJSON
  • POST /select/logsql/query - LogsQL query via form body, returns NDJSON
  • POST /select/logsql/field_values - Distinct values for a field
  • POST /select/logsql/field_names - All field names from matching entries
  • GET /select/logsql/stats - Storage statistics

Operational

  • GET /health - Health check
  • POST /api/v1/backup - Online backup
  • GET /api/v1/flush - Force buffer flush

Summary

Functions

child_spec(opts)

dispatch(arg1, arg2, req)

handle(req)