diff --git a/hosts/rico0/services/apps/blocky.nix b/hosts/rico0/services/apps/blocky.nix index fbf37ad..44b9775 100644 --- a/hosts/rico0/services/apps/blocky.nix +++ b/hosts/rico0/services/apps/blocky.nix @@ -65,6 +65,10 @@ _: { upstream = "192.168.1.1"; singleNameOrder = [ 2 1 ]; }; + prometheus = { + enable = true; + path = "/metrics"; + }; ports = { dns = "192.168.1.10:53,10.10.10.10:53"; tls = "192.168.1.10:853,10.10.10.10:853"; diff --git a/hosts/rico0/services/apps/default.nix b/hosts/rico0/services/apps/default.nix index 7390f7d..d0d33f0 100644 --- a/hosts/rico0/services/apps/default.nix +++ b/hosts/rico0/services/apps/default.nix @@ -1,3 +1,3 @@ _: { - imports = [ ./blocky.nix ]; + imports = [ ./blocky.nix ./prometheus.nix ]; } diff --git a/hosts/rico0/services/apps/prometheus.nix b/hosts/rico0/services/apps/prometheus.nix new file mode 100644 index 0000000..74d8cf8 --- /dev/null +++ b/hosts/rico0/services/apps/prometheus.nix @@ -0,0 +1,19 @@ +_: { + services.prometheus = { + enable = true; + scrapeConfigs = [ + { + job_name = "frp"; + static_configs = [ + { targets = [ "10.10.10.1:7500" ]; } + ]; + } + { + job_name = "blocky"; + static_configs = [ + { targets = [ "10.10.10.10:8080" ]; } + ]; + } + ]; + }; +}