diff options
Diffstat (limited to 'modules/by-name/mo/monitoring')
| -rw-r--r-- | modules/by-name/mo/monitoring/components/grafana.nix | 5 | ||||
| -rw-r--r-- | modules/by-name/mo/monitoring/components/loki.nix | 84 |
2 files changed, 45 insertions, 44 deletions
diff --git a/modules/by-name/mo/monitoring/components/grafana.nix b/modules/by-name/mo/monitoring/components/grafana.nix index 7b9665a..534ac78 100644 --- a/modules/by-name/mo/monitoring/components/grafana.nix +++ b/modules/by-name/mo/monitoring/components/grafana.nix @@ -150,9 +150,10 @@ in { ../dashboards/Performance.json ../dashboards/Scraping_Jobs.json ]; + + anubis.instances."${cfg.fqdn}".target = "http://${config.services.grafana.settings.server.http_addr}:${toString cfg.port}"; }; - vhack.anubis.instances."${cfg.fqdn}".target = "http://${config.services.grafana.settings.server.http_addr}:${toString cfg.port}"; services = { postgresql = { ensureUsers = [ @@ -209,7 +210,7 @@ in { folder = "Vhack"; options.path = pkgs.symlinkJoin { name = "dashboards"; - paths = map (p: pkgs.runCommand "davhackoard" {} "mkdir $out; cp ${p} $out") cfg.dashboards; + paths = map (p: pkgs.runCommand "dashoard" {} "mkdir $out; cp ${p} $out") cfg.dashboards; }; allowUiUpdates = true; disableDeletion = true; diff --git a/modules/by-name/mo/monitoring/components/loki.nix b/modules/by-name/mo/monitoring/components/loki.nix index ac9b1fa..149e577 100644 --- a/modules/by-name/mo/monitoring/components/loki.nix +++ b/modules/by-name/mo/monitoring/components/loki.nix @@ -67,48 +67,6 @@ in { }; }; services = { - loki = { - enable = true; - dataDir = "/var/lib/loki"; - package = pkgs.grafana-loki; - configuration = { - auth_enabled = false; - - server.http_listen_port = cfg.port; - - common = { - ring = { - instance_addr = "127.0.0.1"; - kvstore = { - store = "inmemory"; - }; - }; - - replication_factor = 1; - path_prefix = "/tmp/loki"; - }; - - schema_config = { - configs = [ - { - from = "2020-05-15"; - store = "tsdb"; - object_store = "filesystem"; - schema = "v13"; - index = { - prefix = "index_"; - period = "24h"; - }; - } - ]; - }; - - storage_config = { - filesystem.directory = "/tmp/loki/chunks"; - }; - }; - }; - fluent-bit = { enable = true; settings = { @@ -165,6 +123,48 @@ in { }; graceLimit = "1m"; }; + + loki = { + enable = true; + dataDir = "/var/lib/loki"; + package = pkgs.grafana-loki; + configuration = { + auth_enabled = false; + + server.http_listen_port = cfg.port; + + common = { + ring = { + instance_addr = "127.0.0.1"; + kvstore = { + store = "inmemory"; + }; + }; + + replication_factor = 1; + path_prefix = "/tmp/loki"; + }; + + schema_config = { + configs = [ + { + from = "2020-05-15"; + store = "tsdb"; + object_store = "filesystem"; + schema = "v13"; + index = { + prefix = "index_"; + period = "24h"; + }; + } + ]; + }; + + storage_config = { + filesystem.directory = "/tmp/loki/chunks"; + }; + }; + }; }; }; } |
