diff --git a/README.md b/README.md index 35ddebd..25c550d 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,14 @@ # Perfloop relay -A small program you run inside your network so Perfloop can read a -Prometheus, VictoriaMetrics, or Loki that the public internet cannot reach. -This repository is the complete source of what runs there. The image Perfloop -publishes is built from it, by the workflow in this repository, and is tagged -with the commit it was built from. +A small program you run inside your network so Perfloop can read the +telemetry you keep there: metrics, logs, and profiles from providers the +public internet cannot reach. This repository is the complete source of what +runs there. The image Perfloop publishes is built from it, by the workflow in +this repository, and is tagged with the commit it was built from. + +Sources the relay reads today: Prometheus, VictoriaMetrics, and Loki. Go +pprof and Pyroscope are next. Each kind is one table of read routes in +`routes.go`, and a kind the relay does not know is refused when it starts. 756 lines of Go outside tests, three runtime dependencies (`coder/websocket`, `go.yaml.in/yaml/v3`, `golang.org/x/net`): read it in an afternoon. diff --git a/config.go b/config.go index a8f6db0..552310c 100644 --- a/config.go +++ b/config.go @@ -40,7 +40,8 @@ type Upstream struct { // Name is the `relay://` endpoint that Setup registers. It is one // lowercase DNS label. Name string `yaml:"name"` - // Kind is prometheus, victoriametrics, or loki. It selects the read + // Kind selects the read routes the relay permits; routes.go lists the + // kinds (today prometheus, victoriametrics, and loki). It selects the read // routes the relay permits. Kind string `yaml:"kind"` // URL is the provider base: scheme, host, port, and an optional path diff --git a/docs/configuration.md b/docs/configuration.md index 254e8e4..11b34f8 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -27,7 +27,8 @@ upstreams: # lowercase DNS label: a-z, 0-9, and -, up to 63 characters, no # leading or trailing -. Names must be unique in the file. name: vm - # prometheus, victoriametrics, or loki. Selects the read routes + # One of the kinds routes.go lists: today prometheus, victoriametrics, + # or loki. Selects the read routes # (docs/security.md, "What the relay forwards"). kind: victoriametrics # The provider base: scheme, host, port, and an optional path prefix. diff --git a/docs/setup.md b/docs/setup.md index a0ccb05..38b3a5a 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -13,7 +13,7 @@ Collect these before starting. Nothing else is needed. | `` | Your Perfloop tenant name, the segment after `/t/` in the app URL. | | `` | The Kubernetes namespace the relay will run in. | | `` | A name you choose for the source, one lowercase DNS label, for example `vm`. | -| `` | `prometheus`, `victoriametrics`, or `loki`. | +| `` | One of the kinds `routes.go` lists: today `prometheus`, `victoriametrics`, or `loki`. | | `` | The provider base URL as reachable from inside the cluster, for example `http://vmselect.monitoring.svc:8481/select/0/prometheus`. No trailing slash. | | `` | A read-only token for that upstream, if it needs one. Query-scoped. | | `` | The relay image digest to pin. See "Choose the image" below. | diff --git a/examples/kubernetes/relay.yaml b/examples/kubernetes/relay.yaml index f2609fc..a847c2a 100644 --- a/examples/kubernetes/relay.yaml +++ b/examples/kubernetes/relay.yaml @@ -18,7 +18,7 @@ data: token: ${PERFLOOP_RELAY_TOKEN} upstreams: - name: - kind: + kind: # one of the kinds routes.go lists: prometheus, victoriametrics, loki url: http://..svc: headers: Authorization: Bearer ${UPSTREAM_READ_TOKEN}