aboutsummaryrefslogtreecommitdiff
path: root/doc/book/connect/observability.md
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2023-01-26 16:46:40 +0100
committerAlex Auvolat <alex@adnab.me>2023-01-26 16:46:40 +0100
commit590a0a84505c0bee8ddd8fcd8de6f340319da097 (patch)
tree14009c0feea6c27cdf36fe85a21dc22753da8653 /doc/book/connect/observability.md
parentdac254a6e7413498df0e3b626769c2d2be3a4cfb (diff)
parent611792ddcf86f0a728e22abaa6e172d3679d5ca6 (diff)
downloadgarage-590a0a84505c0bee8ddd8fcd8de6f340319da097.tar.gz
garage-590a0a84505c0bee8ddd8fcd8de6f340319da097.zip
Merge branch 'main' into k2v-watch-range-2
Diffstat (limited to 'doc/book/connect/observability.md')
-rw-r--r--doc/book/connect/observability.md57
1 files changed, 57 insertions, 0 deletions
diff --git a/doc/book/connect/observability.md b/doc/book/connect/observability.md
new file mode 100644
index 00000000..c5037fa4
--- /dev/null
+++ b/doc/book/connect/observability.md
@@ -0,0 +1,57 @@
++++
+title = "Observability"
+weight = 25
++++
+
+An object store can be used as data storage location for metrics, and logs which
+can then be leveraged for systems observability.
+
+## Metrics
+
+### Prometheus
+
+Prometheus itself has no object store capabilities, however two projects exist
+which support storing metrics in an object store:
+
+ - [Cortex](https://cortexmetrics.io/)
+ - [Thanos](https://thanos.io/)
+
+## System logs
+
+### Vector
+
+[Vector](https://vector.dev/) natively supports S3 as a
+[data sink](https://vector.dev/docs/reference/configuration/sinks/aws_s3/)
+(and [source](https://vector.dev/docs/reference/configuration/sources/aws_s3/)).
+
+This can be configured with Garage with the following:
+
+```bash
+garage key new --name vector-system-logs
+garage bucket create system-logs
+garage bucket allow system-logs --read --write --key vector-system-logs
+```
+
+The `vector.toml` can then be configured as follows:
+
+```toml
+[sources.journald]
+type = "journald"
+current_boot_only = true
+
+[sinks.out]
+encoding.codec = "json"
+type = "aws_s3"
+inputs = [ "journald" ]
+bucket = "system-logs"
+key_prefix = "%F/"
+compression = "none"
+region = "garage"
+endpoint = "https://my-garage-instance.mydomain.tld"
+auth.access_key_id = ""
+auth.secret_access_key = ""
+```
+
+This is an example configuration - please refer to the Vector documentation for
+all configuration and transformation possibilities. Also note that Garage
+performs its own compression, so this should be disabled in Vector.