diff --git a/consul_backup/metadata.json b/consul_backup/metadata.json index 83a9281..27da2a7 100644 --- a/consul_backup/metadata.json +++ b/consul_backup/metadata.json @@ -1,5 +1,5 @@ { - "backup_timestamp": "2025-11-24T15:25:00.879116", + "backup_timestamp": "2025-11-25T02:00:43.207780", "total_keys": 79, "successful_backups": 74, "failed_backups": 5, diff --git a/consul_backup/nomad/postgres/members/pg-odroid6 b/consul_backup/nomad/postgres/members/pg-odroid6 index 2444b66..a2d2322 100644 --- a/consul_backup/nomad/postgres/members/pg-odroid6 +++ b/consul_backup/nomad/postgres/members/pg-odroid6 @@ -1 +1 @@ -{"conn_url":"postgres://192.168.4.226:5432/postgres","api_url":"http://192.168.4.226:8008/patroni","state":"running","role":"replica","version":"4.0.4","xlog_location":589299797968,"replication_state":"streaming","timeline":248} \ No newline at end of file +{"conn_url":"postgres://192.168.4.226:5432/postgres","api_url":"http://192.168.4.226:8008/patroni","state":"running","role":"replica","version":"4.0.4","xlog_location":589695087928,"replication_state":"streaming","timeline":248} \ No newline at end of file diff --git a/consul_backup/nomad/postgres/members/pg-odroid7 b/consul_backup/nomad/postgres/members/pg-odroid7 index 6320cf2..7be53e1 100644 --- a/consul_backup/nomad/postgres/members/pg-odroid7 +++ b/consul_backup/nomad/postgres/members/pg-odroid7 @@ -1 +1 @@ -{"conn_url":"postgres://192.168.4.227:5432/postgres","api_url":"http://192.168.4.227:8008/patroni","state":"running","role":"replica","version":"4.0.4","xlog_location":589299779856,"replication_state":"streaming","timeline":248} \ No newline at end of file +{"conn_url":"postgres://192.168.4.227:5432/postgres","api_url":"http://192.168.4.227:8008/patroni","state":"running","role":"replica","version":"4.0.4","xlog_location":589695042792,"replication_state":"streaming","timeline":248} \ No newline at end of file diff --git a/consul_backup/nomad/postgres/members/pg-odroid8 b/consul_backup/nomad/postgres/members/pg-odroid8 index 795b013..37c774c 100644 --- a/consul_backup/nomad/postgres/members/pg-odroid8 +++ b/consul_backup/nomad/postgres/members/pg-odroid8 @@ -1 +1 @@ -{"conn_url":"postgres://192.168.4.228:5432/postgres","api_url":"http://192.168.4.228:8008/patroni","state":"running","role":"primary","version":"4.0.4","xlog_location":589299779856,"timeline":248} \ No newline at end of file +{"conn_url":"postgres://192.168.4.228:5432/postgres","api_url":"http://192.168.4.228:8008/patroni","state":"running","role":"primary","version":"4.0.4","xlog_location":589695042792,"timeline":248} \ No newline at end of file diff --git a/consul_backup/nomad/postgres/members/pg-opti1 b/consul_backup/nomad/postgres/members/pg-opti1 index 11abb5a..1bf66ac 100644 --- a/consul_backup/nomad/postgres/members/pg-opti1 +++ b/consul_backup/nomad/postgres/members/pg-opti1 @@ -1 +1 @@ -{"conn_url":"postgres://192.168.4.36:5432/postgres","api_url":"http://192.168.4.36:8008/patroni","state":"running","role":"replica","version":"4.0.4","xlog_location":589299713952,"replication_state":"streaming","timeline":248} \ No newline at end of file +{"conn_url":"postgres://192.168.4.36:5432/postgres","api_url":"http://192.168.4.36:8008/patroni","state":"running","role":"replica","version":"4.0.4","xlog_location":589695111384,"replication_state":"streaming","timeline":248} \ No newline at end of file diff --git a/consul_backup/nomad/postgres/status b/consul_backup/nomad/postgres/status index b1325dc..258c39b 100644 --- a/consul_backup/nomad/postgres/status +++ b/consul_backup/nomad/postgres/status @@ -1 +1 @@ -{"optime":589299779856,"slots":{"pg_odroid6":589299779856,"pg_odroid7":589299779856,"pg_opti1":589299779856,"pg_odroid8":589299779856},"retain_slots":["pg_odroid6","pg_odroid7","pg_odroid8","pg_opti1"]} \ No newline at end of file +{"optime":589695042792,"slots":{"pg_odroid6":589695042792,"pg_odroid7":589695042792,"pg_opti1":589695042792,"pg_odroid8":589695042792},"retain_slots":["pg_odroid6","pg_odroid7","pg_odroid8","pg_opti1"]} \ No newline at end of file diff --git a/consul_backup/qbitcheck/connection_monitor/remediation b/consul_backup/qbitcheck/connection_monitor/remediation index d7c6e7b..7cc0230 100644 --- a/consul_backup/qbitcheck/connection_monitor/remediation +++ b/consul_backup/qbitcheck/connection_monitor/remediation @@ -1 +1 @@ -{"state": null, "start_time": null, "stabilization_checks": 0} \ No newline at end of file +{"state": "stopping_torrents", "start_time": 1763998459.4216952, "stabilization_checks": 0} \ No newline at end of file diff --git a/consul_backup/qbitcheck/connection_monitor/state b/consul_backup/qbitcheck/connection_monitor/state index 1bbf7ea..18b31ce 100644 --- a/consul_backup/qbitcheck/connection_monitor/state +++ b/consul_backup/qbitcheck/connection_monitor/state @@ -1 +1 @@ -{"connection_state": "unstable", "last_state_change_time": 1763997771.3138738, "consecutive_failures": 0, "consecutive_stable_checks": 0, "last_failure_time": 1763829749.067393} \ No newline at end of file +{"connection_state": "unstable", "last_state_change_time": 1763997771.3138738, "consecutive_failures": 837, "consecutive_stable_checks": 0, "last_failure_time": 1764028457.5270371} \ No newline at end of file diff --git a/consul_backup/qbitcheck/connection_monitor/vpn b/consul_backup/qbitcheck/connection_monitor/vpn index 44de8f6..f154728 100644 --- a/consul_backup/qbitcheck/connection_monitor/vpn +++ b/consul_backup/qbitcheck/connection_monitor/vpn @@ -1 +1 @@ -{"vpn_status": "running", "last_vpn_status_change": 1763829147.0930555, "public_ip": "139.28.218.235", "last_public_ip_change": 1763997771.0223732, "public_ip_details": {"public_ip": "139.28.218.235", "region": "Quebec", "country": "Canada", "city": "Montreal", "location": "45.499401,-73.570297", "organization": "M247 Europe SRL", "postal_code": "H3B", "timezone": "America/Toronto"}} \ No newline at end of file +{"vpn_status": "running", "last_vpn_status_change": 1764028493.6521404, "public_ip": "87.101.92.171", "last_public_ip_change": 1764016230.1919472, "public_ip_details": {"public_ip": "87.101.92.171", "region": "Quebec", "country": "Canada", "city": "Montr\u00e9al", "location": "45.5088,-73.5878", "organization": "AS9009 M247 Europe SRL", "postal_code": "H3H", "timezone": "America/Toronto"}} \ No newline at end of file diff --git a/nomad_backup/node-exporter.hcl b/nomad_backup/node-exporter.hcl new file mode 100644 index 0000000..4eb5ebe --- /dev/null +++ b/nomad_backup/node-exporter.hcl @@ -0,0 +1,70 @@ +job "node-exporter" { + region = "global" + datacenters = ["dc1"] + type = "system" + + constraint { + attribute = "${attr.kernel.name}" + value = "linux" + } + + group "node-exporter" { + count = 1 + + restart { + attempts = 3 + delay = "20s" + mode = "delay" + } + + task "node-exporter" { + driver = "docker" + + config { + #image = "anzevalher/node-exporter" + image = "prom/node-exporter" + + force_pull = true + + args = ["--collector.cpu","--collector.filesystem","--collector.meminfo","--collector.thermal_zone","--collector.disable-defaults",] + volumes = [ + "/proc:/host/proc", + "/sys:/host/sys", + "/:/rootfs", + ] + + port_map { + http = 9100 + } + } + + service { + name = "node-exporter" + + tags = [ + "metrics", + ] + + port = "http" + + check { + type = "http" + path = "/metrics/" + interval = "10s" + timeout = "2s" + } + } + + resources { + cpu = 20 + memory = 20 + + network { + port "http" { + static = "9100" + } + } + } + } + } +} diff --git a/nomad_backup/node-exporter_backup.hcl b/nomad_backup/node-exporter_backup.hcl new file mode 100644 index 0000000..d5dd6db --- /dev/null +++ b/nomad_backup/node-exporter_backup.hcl @@ -0,0 +1,70 @@ +job "node-exporter_backup" { + region = "global" + datacenters = ["dc1"] + type = "system" + node_pool = "backup" + constraint { + attribute = "${attr.kernel.name}" + value = "linux" + } + + group "node-exporter" { + count = 1 + + restart { + attempts = 3 + delay = "20s" + mode = "delay" + } + + task "node-exporter" { + driver = "docker" + + config { + #image = "anzevalher/node-exporter" + image = "prom/node-exporter" + + force_pull = true + + args = ["--collector.cpu","--collector.filesystem","--collector.meminfo","--collector.thermal_zone","--collector.disable-defaults",] + volumes = [ + "/proc:/host/proc", + "/sys:/host/sys", + "/:/rootfs", + ] + + port_map { + http = 9100 + } + } + + service { + name = "node-exporter" + + tags = [ + "metrics", + ] + + port = "http" + + check { + type = "http" + path = "/metrics/" + interval = "10s" + timeout = "2s" + } + } + + resources { + cpu = 20 + memory = 20 + + network { + port "http" { + static = "9100" + } + } + } + } + } +} diff --git a/nomad_backup/nzbget.hcl b/nomad_backup/nzbget.hcl index 009f8e3..c727cb5 100644 --- a/nomad_backup/nzbget.hcl +++ b/nomad_backup/nzbget.hcl @@ -226,6 +226,14 @@ service { }, ] } + +env { + REQUIRE_AUTH = "false" # Option 1: Disable auth + # OR + # REQUIRE_AUTH = "true" # Option 2: Enable auth with credentials + # PROXY_USER = "your-username" + # PROXY_PASSWORD = "your-password" + } resources { cpu = 64 # 500 MHz diff --git a/nomad_backup/prowlarr.hcl b/nomad_backup/prowlarr.hcl index 0f21c7d..f1b8cf6 100644 --- a/nomad_backup/prowlarr.hcl +++ b/nomad_backup/prowlarr.hcl @@ -1,12 +1,6 @@ # There can only be a single job definition per file. # Create a job with ID and Name 'example' job "prowlarr" { - constraint { - attribute = "${attr.cpu.arch}" - operator = "!=" - value = "arm" - } - datacenters = ["dc1"] type = "service" @@ -36,11 +30,28 @@ job "prowlarr" { } +task "flaresolver" { + driver = "docker" + config { + image = "ghcr.io/flaresolverr/flaresolverr:latest" + ports = ["http_flare"] + dns_servers = ["${attr.unique.network.ip-address}","192.168.4.250","8.8.8.8"] + memory_hard_limit = "2048" + force_pull = false + } + service { + name = "${TASKGROUP}" + tags = ["prowlarr_pg", "tools"] + port = "http_flare" + } +} + task "prowlarr" { driver = "docker" config { image = "ghcr.io/linuxserver/prowlarr:develop" ports = ["http"] + dns_servers = ["${attr.unique.network.ip-address}","192.168.4.250","8.8.8.8"] memory_hard_limit = "2048" volumes = [ "/mnt/Public/configs/prowlarr_pg:/config", diff --git a/nomad_backup/qbittorrent.hcl b/nomad_backup/qbittorrent.hcl index cbb642d..0da4754 100644 --- a/nomad_backup/qbittorrent.hcl +++ b/nomad_backup/qbittorrent.hcl @@ -159,6 +159,13 @@ ] } +env { + REQUIRE_AUTH = "false" # Option 1: Disable auth + # OR + # REQUIRE_AUTH = "true" # Option 2: Enable auth with credentials + # PROXY_USER = "your-username" + # PROXY_PASSWORD = "your-password" + } resources { cpu = 64 # 500 MHz memory = 128 # 128MB diff --git a/nomad_backup/sonarr-small.hcl b/nomad_backup/sonarr-small.hcl index 3b48b73..75b0860 100644 --- a/nomad_backup/sonarr-small.hcl +++ b/nomad_backup/sonarr-small.hcl @@ -43,7 +43,7 @@ job "sonarr-small" { ports = ["http"] - // dns_servers = ["192.168.1.1", "1.1.1.1"] + dns_servers = ["${attr.unique.network.ip-address}","192.168.4.250","8.8.8.8"] memory_hard_limit = "2048" // cpuset_cpus = "4-7" diff --git a/nomad_backup/traefik.hcl b/nomad_backup/traefik.hcl index 26cf9b7..6b63afe 100644 --- a/nomad_backup/traefik.hcl +++ b/nomad_backup/traefik.hcl @@ -1,11 +1,4 @@ job "traefik" { - node_pool = "default" - constraint { - attribute = "${attr.cpu.arch}" - operator = "!=" - value = "arm" - } - datacenters = ["dc1"] type = "system" @@ -65,7 +58,7 @@ job "traefik" { "/mnt/mnt/configs/letsencrypt:/acmecert/", ] - // dns_servers = ["192.168.4.1", "192.168.4.250"] + dns_servers = ["${attr.unique.network.ip-address}","192.168.4.250","8.8.8.8"] ports = ["traefik", "traefikhttps","traefikui"] memory_hard_limit = 20480 diff --git a/nomad_backup/unpackerr.hcl b/nomad_backup/unpackerr.hcl new file mode 100644 index 0000000..1c0694f --- /dev/null +++ b/nomad_backup/unpackerr.hcl @@ -0,0 +1,155 @@ +# There can only be a single job definition per file. +# Create a job with ID and Name 'example' +job "unpackerr" { + datacenters = ["dc1"] + type = "service" + + constraint { + attribute = "${attr.kernel.name}" + value = "linux" + } + constraint { + attribute = "${attr.unique.hostname}" + operator = "regexp" + value = "odroid.*" + } + // affinity { + // attribute = "${attr.unique.hostname}" + // value = "odroid2" + // value = "odroid2" + // weight = 100 + // } + + update { + stagger = "10s" + max_parallel = 1 + } + + group "unpackerr" { + count = 1 + + restart { + attempts = 2 + interval = "1m" + delay = "10s" + mode = "fail" + } + + task "unpackerr" { + driver = "docker" + + config { + image = "golift/unpackerr" + memory_hard_limit = "2048" + force_pull = false + dns_servers = ["${attr.unique.network.ip-address}","192.168.4.250","8.8.8.8"] + volumes = [ + "/mnt/Public/Downloads/news:/downloads", + ] + } + + + env { + TZ = "EST5EDT" + #PUID = 1000 + #PGID = 1000 + #TZ=${TZ} + #General config + UN_DEBUG="false" + #UN_LOG_FILE= + #UN_LOG_FILES=10 + #UN_LOG_FILE_MB=10 + #UN_INTERVAL=2m + #UN_START_DELAY=1m + #UN_RETRY_DELAY=5m + #UN_MAX_RETRIES=3 + #UN_PARALLEL=1 + #UN_FILE_MODE=0644 + #UN_DIR_MODE=0755 + #Sonarr Config + UN_SONARR_0_URL="http://sonarr.service.dc1.consul:8989" + UN_SONARR_0_API_KEY="1632787062fb47a9a6eb4c88e32b3ff3" + UN_SONARR_0_PATHS_0="/downloads/qbittorrent/tv-sonarr" + UN_SONARR_0_PROTOCOLS="torrent" + UN_SONARR_0_TIMEOUT="10s" + UN_SONARR_0_DELETE_ORIG="false" + UN_SONARR_0_DELETE_DELAY="5m" + UN_SONARR_1_URL="http://sonarr-small.service.dc1.consul:8989" + UN_SONARR_1_API_KEY="1632787062fb47a9a6eb4c88e32b3ff3" + UN_SONARR_1_PATHS_0="/downloads/qbittorrent/tv-sonarrsmall" + UN_SONARR_1_PROTOCOLS="torrent" + UN_SONARR_1_TIMEOUT="10s" + UN_SONARR_1_DELETE_ORIG="false" + UN_SONARR_1_DELETE_DELAY="5m" + + #Radarr Config + UN_RADARR_0_URL="http://radarr.service.dc1.consul:7878" + UN_RADARR_0_API_KEY="237c27f22504440385e5ee295fd65eb5" + UN_RADARR_0_PATHS_0="/downloads/qbittorrent/radarr" + UN_RADARR_0_PROTOCOLS="torrent" + UN_RADARR_0_TIMEOUT="10s" + UN_RADARR_0_DELETE_ORIG="false" + UN_RADARR_0_DELETE_DELAY="5m" + #Lidarr Config + #UN_LIDARR_0_URL=http://lidarr.service.dc1.consul:8686 + #UN_LIDARR_0_API_KEY= + #UN_LIDARR_0_PATHS_0=/downloads + #UN_LIDARR_0_PROTOCOLS=torrent + #UN_LIDARR_0_TIMEOUT=10s + #UN_LIDARR_0_DELETE_ORIG=false + #UN_LIDARR_0_DELETE_DELAY=5m + #Readarr Config + #UN_READARR_0_URL=http://readarr:8787 + #UN_READARR_0_API_KEY= + #UN_READARR_0_PATHS_0=/downloads + #UN_READARR_0_PROTOCOLS=torrent + #UN_READARR_0_TIMEOUT=10s + #UN_READARR_0_DELETE_ORIG=false + #UN_READARR_0_DELETE_DELAY=5m + #Folder Config + #UN_FOLDER_0_PATH= + #UN_FOLDER_0_EXTRACT_PATH= + #UN_FOLDER_0_DELETE_AFTER=10m + #UN_FOLDER_0_DELETE_ORIGINAL=false + #UN_FOLDER_0_DELETE_FILES=false + #UN_FOLDER_0_MOVE_BACK=false + #Webhook Config + #UN_WEBHOOK_0_URL= + #UN_WEBHOOK_0_NAME= + #UN_WEBHOOK_0_NICKNAME=Unpackerr + #UN_WEBHOOK_0_CHANNEL= + #UN_WEBHOOK_0_TIMEOUT=10s + #UN_WEBHOOK_0_SILENT=false + #UN_WEBHOOK_0_IGNORE_SSL=false + #UN_WEBHOOK_0_EXCLUDE_0= + #UN_WEBHOOK_0_EVENTS_0=0 + #UN_WEBHOOK_0_TEMPLATE_PATH= + #UN_WEBHOOK_0_CONTENT_TYPE=application/json + #Command Hook Config + #UN_CMDHOOK_0_COMMAND= + #UN_CMDHOOK_0_NAME= + #UN_CMDHOOK_0_TIMEOUT=10s + #UN_CMDHOOK_0_SILENT=false + #UN_CMDHOOK_0_SHELL=false + #UN_CMDHOOK_0_EXCLUDE_0= + #UN_CMDHOOK_0_EVENTS_0=0 + } + + resources { + cpu = 500 # 500 MHz + memory = 256 # 128MB + } + + # Specify configuration related to log rotation + logs { + max_files = 10 + max_file_size = 15 + } + + # Controls the timeout between signalling a task it will be killed + # and killing the task. If not set a default is used. + kill_timeout = "10s" + } #End main task + + } +}