diff options
Diffstat (limited to 'hosts/sagittarius/web/observability.nix')
| -rw-r--r-- | hosts/sagittarius/web/observability.nix | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/hosts/sagittarius/web/observability.nix b/hosts/sagittarius/web/observability.nix new file mode 100644 index 0000000..956245c --- /dev/null +++ b/hosts/sagittarius/web/observability.nix @@ -0,0 +1,59 @@ +{ ... }: +{ + services.opentelemetry-collector = { + enable = true; + settings = { + receivers = { + otlp = { + protocols = { + grpc.endpoint = "localhost:4317"; + http.endpoint = "localhost:4318"; + }; + }; + hostmetrics.scrapers = { + cpu = { }; + disk = { }; + filesystem = { }; + load = { }; + memory = { }; + network = { }; + process = { }; + processes = { }; + paging = { }; + }; + }; + processors = { + memory_limiter = { + check_interval = "5s"; + limit_mib = 2500; + spike_limit_mib = 500; + }; + }; + exporters = { + debug = { + verbosity = "detailed"; + }; + }; + service = { + extensions = [ ]; + pipelines = { + traces = { + receivers = [ "otlp" ]; + exporters = [ "debug" ]; + }; + metrics = { + receivers = [ + "otlp" + "hostmetrics" + ]; + exporters = [ "debug" ]; + }; + logs = { + receivers = [ "otlp" ]; + exporters = [ "debug" ]; + }; + }; + }; + }; + }; +} |
