From 0153b39e0e027980e63baa7603d5d84a232d480d Mon Sep 17 00:00:00 2001 From: Evans Mungai Date: Tue, 1 Aug 2023 16:21:31 +0100 Subject: [PATCH] chore: resolve localhost host collector and analyser (#73) --- host/default.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/host/default.yaml b/host/default.yaml index ffde66d..bdcbd8f 100644 --- a/host/default.yaml +++ b/host/default.yaml @@ -384,6 +384,10 @@ spec: backgroundReadIOPS: 50 backgroundReadIOPSJobs: 1 exclude: true + - run: + collectorName: "localhost-ips" + command: "sh" + args: ["-c", "host localhost"] hostAnalyzers: - certificate: collectorName: k8s-api-keypair @@ -712,3 +716,14 @@ spec: - pass: when: "true" message: "ETCD status returned: healthy" + - textAnalyze: + checkName: Check if localhost resolves to 127.0.0.1 + fileName: host-collectors/run-host/localhost-ips.txt + regex: 'localhost has address 127.0.0.1' + outcomes: + - fail: + when: "false" + message: "'localhost' does not resolve to 127.0.0.1 ip address" + - pass: + when: "true" + message: "'localhost' resolves to 127.0.0.1 ip address"