diff --git a/hosts/h001/mods/monitoring.nix b/hosts/h001/mods/monitoring.nix index f9b31bc..cc2811e 100644 --- a/hosts/h001/mods/monitoring.nix +++ b/hosts/h001/mods/monitoring.nix @@ -11,7 +11,7 @@ job_name = "node"; static_configs = [ { - targets = [ "localhost:9100" ]; + targets = [ "100.64.0.13:9100" ]; labels.instance = config.networking.hostName; # h001 } # { @@ -109,7 +109,6 @@ }; ruler = { - alertmanager_url = "http://localhost:9093"; storage = { type = "local"; local = { diff --git a/hosts/h001/mods/reporting.nix b/hosts/h001/mods/reporting.nix index dc6a3a0..7a9eadb 100644 --- a/hosts/h001/mods/reporting.nix +++ b/hosts/h001/mods/reporting.nix @@ -4,7 +4,10 @@ }: { config = { - services.prometheus.exporters.node.enable = true; # port 9080 + services.prometheus.exporters.node = { + enable = true; + port = 9100; + }; # Create necessary directories with appropriate permissions systemd.tmpfiles.rules = [ "d /tmp/positions 1777 - - -" # World-writable directory for positions file @@ -26,7 +29,7 @@ }; clients = [ { - url = "http://localhost:3100/loki/api/v1/push"; # Points to your Loki instance + url = "http://100.64.0.13:3100/loki/api/v1/push"; # Points to your Loki instance } ]; scrape_configs = [ @@ -38,7 +41,7 @@ path = "/var/log/journal"; labels = { job = "systemd-journal"; - host = "${config.networking.hostName}"; + host = config.networking.hostName; }; }; relabel_configs = [ @@ -48,20 +51,6 @@ } ]; } - # Simple file-based logs as a fallback - { - job_name = "system"; - static_configs = [ - { - targets = [ "localhost" ]; - labels = { - job = "syslog"; - host = "${config.networking.hostName}"; - __path__ = "/var/log/syslog"; - }; - } - ]; - } ]; }; };