From eb607a786381f54a0a053f1b319b7d9590f71190 Mon Sep 17 00:00:00 2001 From: Shaun Prince Date: Tue, 11 Jun 2024 06:35:32 -0700 Subject: [PATCH] stepping up the logging, simplify config example, re-order ci steps --- .github/workflows/ci.yml | 7 ++++--- config-example.yaml | 3 --- metrics/collector.py | 1 + 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7cb9bc9..425d94f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,8 +41,9 @@ jobs: sleep 5 done - name: Run tests - run: | - python -m unittest discover tests env: VALKEY_HOST: valkey - VALKEY_PORT: 6379 + VALKEY_PORT: 6379 + run: | + python -m unittest discover tests + diff --git a/config-example.yaml b/config-example.yaml index de5d586..ed2f6b0 100644 --- a/config-example.yaml +++ b/config-example.yaml @@ -2,9 +2,6 @@ servers: - name: ServerOne address: http://ServerOne:9100 network_interface: eno1 - - name: ServerTwo - address: http://ServerTwo:9100 - network_interface: enp7s0 dashboard: host: 0.0.0.0 diff --git a/metrics/collector.py b/metrics/collector.py index fd98f15..a4b839c 100644 --- a/metrics/collector.py +++ b/metrics/collector.py @@ -48,6 +48,7 @@ def collect_metrics(redis_client): if __name__ == "__main__": config = load_config() redis_host = os.getenv('VALKEY_HOST', config.get('redis', {}).get('host', 'localhost')) + logger.info("Redis host: {redis_host}.") redis_client = Redis( host=redis_host, port=config.get('redis', {}).get('port', 6379),