Skip to content

Commit

Permalink
Moving: Use hostnames instead of service names
Browse files Browse the repository at this point in the history
  • Loading branch information
wagdav committed Apr 13, 2024
1 parent 89b9bb2 commit b8d9e08
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion modules/consul/base.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
enable = true;

extraConfig = {
retry_join = [ "nuc.thewagner.home" ];
retry_join = [ "nuc" ];

client_addr = [ "0.0.0.0" ];

Expand Down
6 changes: 3 additions & 3 deletions modules/grafana/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion modules/loki.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Expand Down
2 changes: 1 addition & 1 deletion modules/prometheus.nix
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ let
{
static_configs = [
{
targets = [ "alertmanager.thewagner.home" ];
targets = [ "nuc:9093" ];
}
];
}
Expand Down
2 changes: 1 addition & 1 deletion modules/promtail.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}
];

Expand Down
2 changes: 1 addition & 1 deletion nodemcu/provision.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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)}
Expand Down
2 changes: 1 addition & 1 deletion nodemcu/shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;"
Expand Down

0 comments on commit b8d9e08

Please sign in to comment.