diff options
Diffstat (limited to 'systems/atlas')
| -rw-r--r-- | systems/atlas/miniflux.nix | 27 | ||||
| -rw-r--r-- | systems/atlas/victoria-metrics.nix | 47 |
2 files changed, 62 insertions, 12 deletions
diff --git a/systems/atlas/miniflux.nix b/systems/atlas/miniflux.nix index 5fd22f2..14c9fc5 100644 --- a/systems/atlas/miniflux.nix +++ b/systems/atlas/miniflux.nix @@ -1,6 +1,5 @@ { config, - lib, secretsDir, ... }: @@ -14,28 +13,32 @@ adminCredentialsFile = config.age.secrets.miniflux.path; config = { BASE_URL = "https://miniflux.${config.networking.domain}"; + LISTEN_ADDR = "localhost:7000"; + METRICS_COLLECTOR = 1; }; }; nginx.virtualHosts = { "miniflux.getchoo.com" = { locations."/" = { - proxyPass = "http://unix:${lib.head config.systemd.sockets.miniflux.listenStreams}"; + proxyPass = "http://${config.services.miniflux.config.LISTEN_ADDR}"; }; }; }; }; - # Create the socket manually to ensure NGINX has permission for the socket's parent directory - # ...since for some reason Miniflux will not give it the same `0777` permission as the socket itself - systemd = { - services.miniflux = { - requires = [ "miniflux.socket" ]; - }; + /* + # Create the socket manually to ensure NGINX has permission for the socket's parent directory + # ...since for some reason Miniflux will not give it the same `0777` permission as the socket itself + systemd = { + services.miniflux = { + requires = [ "miniflux.socket" ]; + }; - sockets.miniflux = { - wantedBy = [ "sockets.target" ]; - listenStreams = [ "/run/miniflux.sock" ]; + sockets.miniflux = { + wantedBy = [ "sockets.target" ]; + listenStreams = [ "/run/miniflux.sock" ]; + }; }; - }; + */ } diff --git a/systems/atlas/victoria-metrics.nix b/systems/atlas/victoria-metrics.nix index 25f0e57..fba00ae 100644 --- a/systems/atlas/victoria-metrics.nix +++ b/systems/atlas/victoria-metrics.nix @@ -1,4 +1,5 @@ { + config, lib, inputs, ... @@ -41,10 +42,56 @@ in prometheusConfig = { scrape_configs = [ { + job_name = "forgejo"; + metrics_path = "/metrics"; + static_configs = [ + { + targets = [ + "http://${config.services.forgejo.settings.server.HTTP_ADDR}:${toString config.services.forgejo.settings.server.HTTP_PORT}" + ]; + labels.type = "forgejo"; + } + ]; + } + + { + job_name = "miniflux"; + metrics_path = "/metrics"; + static_configs = [ + { + targets = [ "http://${config.services.miniflux.config.LISTEN_ADDR}" ]; + labels.type = "miniflux"; + } + ]; + } + + { job_name = "node-exporter"; metrics_path = "/metrics"; static_configs = remoteNodes; } + + { + job_name = "victoria-logs"; + metrics_path = "/metrics"; + static_configs = [ + { + targets = [ "localhost:9428" ]; + labels.type = "victoria-logs"; + } + ]; + } + + { + job_name = "victoria-metrics"; + metrics_path = "/metrics"; + static_configs = [ + { + targets = [ "localhost${config.services.victoriametrics.listenAddress}" ]; + labels.type = "victoria-logs"; + } + ]; + } ]; }; }; |
