From b8d9e0863e12053da1ee1e609d442dbea4b73e41 Mon Sep 17 00:00:00 2001 From: David Wagner Date: Tue, 9 Apr 2024 11:24:01 +0200 Subject: [PATCH] Moving: Use hostnames instead of service names --- modules/consul/base.nix | 2 +- modules/grafana/default.nix | 6 +++--- modules/loki.nix | 2 +- modules/prometheus.nix | 2 +- modules/promtail.nix | 2 +- nodemcu/provision.nix | 2 +- nodemcu/shell.nix | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/modules/consul/base.nix b/modules/consul/base.nix index da0e3d2..0cfc931 100644 --- a/modules/consul/base.nix +++ b/modules/consul/base.nix @@ -5,7 +5,7 @@ enable = true; extraConfig = { - retry_join = [ "nuc.thewagner.home" ]; + retry_join = [ "nuc" ]; client_addr = [ "0.0.0.0" ]; diff --git a/modules/grafana/default.nix b/modules/grafana/default.nix index e7e16cf..dc3833b 100644 --- a/modules/grafana/default.nix +++ b/modules/grafana/default.nix @@ -18,17 +18,17 @@ name = "Prometheus"; isDefault = true; type = "prometheus"; - url = "http://prometheus.thewagner.home"; + url = "http://nuc:9090"; } { name = "Loki"; type = "loki"; - url = "http://loki.thewagner.home"; + url = "http://nuc:3100"; } { name = "Alertmanager"; type = "alertmanager"; - url = "http://alertmanager.thewagner.home"; + url = "http://nuc:9093"; jsonData.implementation = "prometheus"; jsonData.handleGrafanaManagedAlerts = true; } diff --git a/modules/loki.nix b/modules/loki.nix index 97f77e1..b965d8e 100644 --- a/modules/loki.nix +++ b/modules/loki.nix @@ -54,7 +54,7 @@ let local.directory = "/tmp/rules"; }; rule_path = "/tmp/scratch"; - alertmanager_url = "http://alertmanager.thewagner.home"; + alertmanager_url = "http://nuc:9093"; ring.kvstore.store = "inmemory"; enable_api = true; }; diff --git a/modules/prometheus.nix b/modules/prometheus.nix index 3d24138..71d81ac 100644 --- a/modules/prometheus.nix +++ b/modules/prometheus.nix @@ -60,7 +60,7 @@ let { static_configs = [ { - targets = [ "alertmanager.thewagner.home" ]; + targets = [ "nuc:9093" ]; } ]; } diff --git a/modules/promtail.nix b/modules/promtail.nix index 317a351..c3f18e7 100644 --- a/modules/promtail.nix +++ b/modules/promtail.nix @@ -14,7 +14,7 @@ in server.grpc_listen_port = 0; clients = [ { - url = "http://loki.thewagner.home/loki/api/v1/push"; + url = "http://nuc:3100/loki/api/v1/push"; } ]; diff --git a/nodemcu/provision.nix b/nodemcu/provision.nix index 74b1663..64d94db 100644 --- a/nodemcu/provision.nix +++ b/nodemcu/provision.nix @@ -243,7 +243,7 @@ let send = device: command: value: - "${pkgs.mosquitto}/bin/mosquitto_pub --host mqtt --topic cmnd/${device}/${command} --message '${toString value}'"; + "${pkgs.mosquitto}/bin/mosquitto_pub --host nuc --topic cmnd/${device}/${command} --message '${toString value}'"; tasmota_0E63DE = pkgs.writeScript "tasmota_0E63DE" '' ${send "tasmota_0E63DE" "Backlog" (backlogMessage config-2c-3a-e8-0e-63-de)} diff --git a/nodemcu/shell.nix b/nodemcu/shell.nix index 67b04d6..8948180 100644 --- a/nodemcu/shell.nix +++ b/nodemcu/shell.nix @@ -52,7 +52,7 @@ mkShell { echo -n "SSID1 $WIFI_SSID;" echo -n "Password1 $WIFI_KEY;" - echo -n "MqttHost mqtt.thewagner.home;" + echo -n "MqttHost nuc;" echo -n "MqttUser 0;" echo -n "MqttPassword 0;"