Authorization: Bearer <jwt> 认证(或使用 API token,见 安全)。
支持的协议
| 协议 | 端点 | 直接替代 |
|---|---|---|
| OTLP gRPC | :5082 | OpenTelemetry SDK / Collector |
| OTLP HTTP | POST /api/v1/{logs,metrics,traces} | OTel HTTP exporter |
| Prometheus remote_write | POST /api/v1/prometheus/api/v1/write | Prometheus / VictoriaMetrics |
Elasticsearch _bulk | POST /api/v1/_bulk | Filebeat、Vector ES sink、Logstash |
| Loki push | POST /api/v1/loki/api/v1/push | Promtail、Vector Loki sink |
| Syslog UDP/TCP | [syslog].udp_bind / tcp_bind | rsyslog、syslog-ng |
| Kinesis Firehose | POST /api/v1/_kinesis_firehose | AWS Firehose |
| Cloudflare Logpush | POST /api/v1/_cloudflare | Cloudflare Logpush |
| Heroku log drain | POST /api/v1/_heroku | Heroku |
| 原生 HTTP JSON | POST /api/v1/ingest/{type}/:stream | curl / 应用 SDK |
原生 HTTP JSON
最简单的方式。把一个记录数组 POST 到ingest/{logs,metrics,traces}/{stream}。时间戳为 Unix 纪元起
的微秒数,放在 _timestamp 字段。
OpenTelemetry
- OTLP HTTP
- OTLP gRPC
把 OTel HTTP exporter 指向 MoleSignal:日志、指标、追踪分别 POST 到
/api/v1/logs、/api/v1/metrics、/api/v1/traces。Prometheus remote_write
在prometheus.yml 中把 MoleSignal 加为远程写入目标:
Loki 与 Elasticsearch
管道函数(Pipeline functions)
你可以在接入热路径上用管道函数转换事件 —— 它是挂在管道步骤上的可复用变换。支持两种语言:- VRL —— 始终可用。按
(function_id, updated_at)编译,使用vrl::compiler标准库 (del、parse_json、to_int、match、encrypt/decrypt等)。 - JavaScript —— 可选,基于
deno_core(V8)。默认关闭;启用需同时具备构建特性 (--features molesignal-bootstrap/js-runtime)与 TOML 开关[functions] js_runtime_enabled = true。