Add observability stack: Alloy, Tempo, and OTEL support
- Add NixOS modules for Alloy and Tempo with default configs - Update Grafana datasource config for Prometheus, Loki, Tempo - Add Prometheus remote_write for Alloy - Implement OTEL metrics/tracing/logging in arrtrix (Go) - Enable Alloy and Tempo in ulmo system config
This commit is contained in:
parent
81f34676c4
commit
9b93f017b6
9 changed files with 661 additions and 19 deletions
|
|
@ -1,7 +1,7 @@
|
|||
{ pkgs, config, lib, namespace, ... }:
|
||||
let
|
||||
inherit (builtins) toString;
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
inherit (lib) mkEnableOption mkIf optionals;
|
||||
|
||||
cfg = config.${namespace}.services.observability.prometheus;
|
||||
in
|
||||
|
|
@ -14,6 +14,9 @@ in
|
|||
services.prometheus = {
|
||||
enable = true;
|
||||
port = 9002;
|
||||
extraFlags = optionals config.${namespace}.services.observability.alloy.enable [
|
||||
"--web.enable-remote-write-receiver"
|
||||
];
|
||||
|
||||
globalConfig.scrape_interval = "15s";
|
||||
|
||||
|
|
@ -31,6 +34,22 @@ in
|
|||
{ targets = [ "localhost:${toString config.services.prometheus.exporters.node.port}" ]; }
|
||||
];
|
||||
}
|
||||
]
|
||||
++ optionals config.${namespace}.services.observability.alloy.enable [
|
||||
{
|
||||
job_name = "alloy";
|
||||
static_configs = [
|
||||
{ targets = [ "localhost:9007" ]; }
|
||||
];
|
||||
}
|
||||
]
|
||||
++ optionals config.${namespace}.services.observability.tempo.enable [
|
||||
{
|
||||
job_name = "tempo";
|
||||
static_configs = [
|
||||
{ targets = [ "localhost:9006" ]; }
|
||||
];
|
||||
}
|
||||
];
|
||||
|
||||
exporters = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue