DEVELOPMENT ENVIRONMENT

~liljamo/nix-arta

11d839f3c3a1596bf3854353ae1261882881234d — Jonni Liljamo 2 months ago 7c0d4bd
feat(systems/hosts/metrics): revamp scrape_configs
1 files changed, 9 insertions(+), 32 deletions(-)

M systems/hosts/metrics/default.nix
M systems/hosts/metrics/default.nix => systems/hosts/metrics/default.nix +9 -32
@@ 1,4 1,4 @@
{...}: let
{artautil, ...}: let
  influxDB2Port = 8086;
  prometheusPort = 9090;
  lokiPort = 9091;


@@ 29,66 29,43 @@ in {
        job_name = "prometheus";
        static_configs = [
          {
            targets = ["localhost:${toString prometheusPort}"];
            targets = ["metrics.home.arpa:${toString prometheusPort}"];
          }
        ];
      }

      # lxcmetrics
      # node, systemd
      {
        job_name = "lxcmetrics_job";
        job_name = "node";
        static_configs = [
          {
            targets = ["localhost:9100" "localhost:9558"];
            targets = map (x: x + ":9100") (builtins.attrNames (artautil.getDNSEntries "lxc"));
          }
        ];
      }

      # lxcproxy
      # haproxy, node, systemd
      {
        job_name = "lxcproxy_job";
        job_name = "systemd";
        static_configs = [
          {
            targets = ["10.1.2.10:8404" "10.1.2.10:9100" "10.1.2.10:9558"];
            targets = map (x: x + ":9558") (builtins.attrNames (artautil.getDNSEntries "lxc"));
          }
        ];
      }

      # lxccloud
      # node, systemd
      {
        job_name = "lxccloud_job";
        job_name = "haproxy";
        static_configs = [
          {
            targets = ["10.1.2.15:9100" "10.1.2.15:9558"];
            targets = ["proxy.home.arpa:8404"];
          }
        ];
      }

      # uwulpine vm
      {
        job_name = "node_uwulpine";
        static_configs = [
          {
            targets = ["10.1.1.10:9091"];
          }
        ];
      }
      {
        job_name = "cadvisor_uwulpine";
        static_configs = [
          {
            targets = ["10.1.1.10:9092"];
          }
        ];
      }
      {
        job_name = "jellyfin";
        static_configs = [
          {
            targets = ["10.1.2.20:8096"];
            targets = ["10.1.2.30:8096"];
          }
        ];
      }