summary refs log tree commit diff
path: root/host
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2025-02-22 16:41:43 +0100
committerRory& <root@rory.gay>2025-02-22 16:41:43 +0100
commita8b4e52be4908b8cc3bdd83ef0e867be5b73a12c (patch)
tree1e1912cf20d75d44e0e9c73478f51abd86858a84 /host
parentDont forget about apex domain (diff)
downloadRory-Open-Architecture-a8b4e52be4908b8cc3bdd83ef0e867be5b73a12c.tar.xz
Update service map for Rory-nginx
Diffstat (limited to 'host')
-rw-r--r--host/Rory-nginx/configuration.nix1
-rw-r--r--host/Rory-nginx/services/redpanda/root.nix10
-rw-r--r--host/Rory-nginx/services/redpanda/systemd-services.nix109
3 files changed, 0 insertions, 120 deletions
diff --git a/host/Rory-nginx/configuration.nix b/host/Rory-nginx/configuration.nix

index 59a118c..52d83e8 100644 --- a/host/Rory-nginx/configuration.nix +++ b/host/Rory-nginx/configuration.nix
@@ -18,7 +18,6 @@ ../../modules/users/Alice.nix ./services/postgres.nix - ./services/matrix/root.nix ./services/nginx/nginx.nix #./services/jitsi.nix ./services/cgit.nix diff --git a/host/Rory-nginx/services/redpanda/root.nix b/host/Rory-nginx/services/redpanda/root.nix deleted file mode 100644
index ef169a6..0000000 --- a/host/Rory-nginx/services/redpanda/root.nix +++ /dev/null
@@ -1,10 +0,0 @@ -{ ... }: -{ - imports = [ - ./systemd-services.nix - ]; - - services.redpanda-connect = { - enable = true; - }; -} diff --git a/host/Rory-nginx/services/redpanda/systemd-services.nix b/host/Rory-nginx/services/redpanda/systemd-services.nix deleted file mode 100644
index c75a5be..0000000 --- a/host/Rory-nginx/services/redpanda/systemd-services.nix +++ /dev/null
@@ -1,109 +0,0 @@ -{ pkgs, lib, ... }: -{ - services.redpanda-connect.pipelines.systemd-services = { - enable = true; - allowSudo = true; - config = { - http = { - enabled = true; - address = "127.0.0.1:5100"; - }; - input = { - label = ""; - subprocess = { - name = "${pkgs.systemd}/bin/systemctl"; - args = [ - "-ojson" - "--recursive" - ]; - restart_on_exit = true; - max_buffer = 1024 * 512; - }; - }; - pipeline = { - processors = [ - { unarchive.format = "json_array"; } - { - mapping = '' - root = this - if this.load == "loaded" { - root.loaded_value = 1.0 - } else { - root.loaded_value = 0.0 - } - if this.active == "active" { - root.active_value = 1.0 - } else if this.active == "activating" { - root.active_value = 0.5 - } else { - root.active_value = 0.0 - } - if this.sub == "active" { - root.sub_value = 1.0 - } else if this.sub == "auto-restart" { - root.sub_value = 0.5 - } else { - root.sub_value = 0.0 - } - ''; - } - { - metric = { - name = "systemd_service_status"; - type = "gauge"; - value = "\${!json(\"loaded_value\")}"; - labels = { - field = "load"; - service = "\${!json(\"unit\")}"; - description = "\${!json(\"description\")}"; - }; - }; - } - { - metric = { - name = "systemd_service_status"; - type = "gauge"; - value = "\${!json(\"active_value\")}"; - labels = { - field = "active"; - service = "\${!json(\"unit\")}"; - description = "\${!json(\"description\")}"; - }; - }; - } - { - metric = { - name = "systemd_service_status"; - type = "gauge"; - value = "\${!json(\"sub_value\")}"; - labels = { - field = "sub"; - service = "\${!json(\"unit\")}"; - description = "\${!json(\"description\")}"; - }; - }; - } - { - sleep.duration = "5s"; - } - ]; - }; - metrics.prometheus = { }; - output.drop = { }; - }; - }; - - services.prometheus.scrapeConfigs = [ - { - job_name = "redpanda-connect"; - scrape_interval = "5s"; - static_configs = [ - { - targets = [ "localhost:5100" ]; - labels.instance = "redpanda-connect"; - } - ]; - metrics_path = "/metrics"; - } - ]; -}