From 407467fd81b5def1aca4cfe0dd0b03e3c04077bf Mon Sep 17 00:00:00 2001 From: arbulu89 Date: Wed, 27 Nov 2024 14:40:34 +0100 Subject: [PATCH] Fix typo in agent config file and variable --- internal/discovery/host.go | 6 +++--- packaging/config/agent.yaml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/discovery/host.go b/internal/discovery/host.go index b1321d80..811a43a4 100644 --- a/internal/discovery/host.go +++ b/internal/discovery/host.go @@ -132,9 +132,9 @@ func updatePrometheusTargets(targets PrometheusTargets, ipAddresses []string) Pr // Fallback to lowest IP address value to replace empty exporter targets ips := make([]net.IP, 0, len(ipAddresses)) for _, ip := range ipAddresses { - parsedIp := net.ParseIP(ip) - if parsedIp.To4() != nil && !parsedIp.IsLoopback() { - ips = append(ips, parsedIp) + parsedIP := net.ParseIP(ip) + if parsedIP.To4() != nil && !parsedIP.IsLoopback() { + ips = append(ips, parsedIP) } } diff --git a/packaging/config/agent.yaml b/packaging/config/agent.yaml index d7f18fac..3c0c1aee 100644 --- a/packaging/config/agent.yaml +++ b/packaging/config/agent.yaml @@ -100,6 +100,6 @@ ## Prometheus exporters targets ## Configure the prometheus targets. If not given, the lowest discovered IP address -## with a default port numbers is used +## with a default port number is used # node-exporter-target: 192.168.1.10:9100 \ No newline at end of file