From e30296ae908d67cbcc1a9496658fee9973eab95d Mon Sep 17 00:00:00 2001 From: Somtochi Onyekwere Date: Wed, 27 Mar 2024 10:14:18 +0100 Subject: [PATCH] fill in docs for config --- doc/config/README.md | 8 ++++---- doc/config/admin.md | 10 ++++++++++ doc/config/api.md | 30 ++++++++++++++++++++++++++++++ doc/config/consul.md | 16 ++++++++++++++++ doc/config/telemetry.md | 36 ++++++++++++++++++++++++++++++++++++ 5 files changed, 96 insertions(+), 4 deletions(-) create mode 100644 doc/config/admin.md create mode 100644 doc/config/api.md create mode 100644 doc/config/consul.md create mode 100644 doc/config/telemetry.md diff --git a/doc/config/README.md b/doc/config/README.md index 073b919f..1d93b93e 100644 --- a/doc/config/README.md +++ b/doc/config/README.md @@ -5,7 +5,7 @@ Corrosion configuration lives in a TOML file. The default location is `/etc/corr Configuration sections: - [db](db.md) - [gossip](gossip.md) -- [api]() (to come) -- [admin]() (to come) -- [telemetry]() (to come) -- [consul]() (to come) \ No newline at end of file +- [api](api.md) +- [admin](admin.md) +- [telemetry](telemetry.md) +- [consul](consul.md) \ No newline at end of file diff --git a/doc/config/admin.md b/doc/config/admin.md new file mode 100644 index 00000000..d9212d2b --- /dev/null +++ b/doc/config/admin.md @@ -0,0 +1,10 @@ +# The [admin] block + +## admin.path + +Path for unix socket used to send commands for admin operations. + +```toml +[admin] +path = "/admin.sock" +``` diff --git a/doc/config/api.md b/doc/config/api.md new file mode 100644 index 00000000..7b513e62 --- /dev/null +++ b/doc/config/api.md @@ -0,0 +1,30 @@ +# The [api] block + +## api.addr + +Address for the Corrosion HTTP API to listen on. + +```toml +[api] +addr = "0.0.0.0:9000" +``` + +## api.authz.bearer-token + +Bearer token that will be used to authenticate HTTP requests. +The client should set this token in the `Authorization` header. + +```toml +[api] +authz.bearer-token = "" +``` + +## api.pg.addr + +Address to listen on for PostgresQL connections. +This allows you to query the sqlite databases using SQL. + +```toml +[api] +pg.addr = "" +``` \ No newline at end of file diff --git a/doc/config/consul.md b/doc/config/consul.md new file mode 100644 index 00000000..f4bb8cc6 --- /dev/null +++ b/doc/config/consul.md @@ -0,0 +1,16 @@ +# The [consul] block + +## consul.client.addr + +Local address of consul server. + +## consul.client.tls + +TLS configuration to use when communicating with Consul. + +```toml +[consul.client.tls] +ca_file = "" +cert_file = "" +key_file = "" +``` \ No newline at end of file diff --git a/doc/config/telemetry.md b/doc/config/telemetry.md new file mode 100644 index 00000000..846e9569 --- /dev/null +++ b/doc/config/telemetry.md @@ -0,0 +1,36 @@ +# The [telemetry] configuration + +The telemetry block is optional. This block configures open telemetry and prometheus. + +## Optional Fields + +### telemetry.prometheus.addr + +Address for the prometheus exporter binds to. `GET` requests to this address will return prometheus metrics. + +```toml +[telemetry] +prometheus.addr = "0.0.0.0:9090" +``` + +You can read more about the Prometheus metrics that corrosion exposes [here](../telemetry/prometheus.md). + +### telemetry.open-telemetry + +This block configures how the open telemetry exporter. + +Configure open telemetry exporter using environment variables. The environment variables and their default are listed [here](https://opentelemetry.io/docs/specs/otel/protocol/exporter/). + +```toml +[telemetry] +open-telemetry = "from_env" +``` + +### telemetry.open-telemetry.exporter + +Address that open telemetry exporter should send traces to. + +```toml +[telemetry] +open-telemetry.exporter = { endpoint = "10.0.0.0:9999"} +``` \ No newline at end of file