From f5b7da5046be215a8d02237ef239cf11c9f38717 Mon Sep 17 00:00:00 2001 From: Thomas Roehl Date: Fri, 26 Nov 2021 18:15:04 +0100 Subject: [PATCH] Use configuration with all supported collectors for CI. Fixes #13 --- .github/ci-config.json | 49 +++++++++++++++++++++++++++++++++++ .github/workflows/runonce.yml | 2 +- Makefile | 3 --- 3 files changed, 50 insertions(+), 4 deletions(-) create mode 100644 .github/ci-config.json diff --git a/.github/ci-config.json b/.github/ci-config.json new file mode 100644 index 0000000..b3fbff1 --- /dev/null +++ b/.github/ci-config.json @@ -0,0 +1,49 @@ +{ + "sink": { + "user": "testuser", + "password": "testpass", + "host": "127.0.0.1", + "port": "9090", + "database": "testdb", + "organization": "testorg", + "type": "stdout" + }, + "interval": 3, + "duration": 1, + "collectors": [ + "tempstat", + "loadavg", + "memstat", + "netstat", + "ibstat", + "lustrestat", + "cpustat", + "topprocs", + "nvidia", + "diskstat", + "ipmistat" + ], + "default_tags": { + "cluster": "testcluster" + }, + "receiver": { + "type": "none" + }, + "collect_config": { + "topprocs" : { + "num_procs": 2 + }, + "tempstat": { + "tag_override": { + "hwmon0" : { + "type" : "socket", + "type-id" : "0" + }, + "hwmon1" : { + "type" : "socket", + "type-id" : "1" + } + } + } + } +} diff --git a/.github/workflows/runonce.yml b/.github/workflows/runonce.yml index 0ca96c1..8efc70a 100644 --- a/.github/workflows/runonce.yml +++ b/.github/workflows/runonce.yml @@ -14,4 +14,4 @@ jobs: run: make - name: Run MetricCollector - run: make runonce + run: ./cc-metric-collector --once --config .github/ci-config.json diff --git a/Makefile b/Makefile index d3b368b..120256d 100644 --- a/Makefile +++ b/Makefile @@ -6,9 +6,6 @@ $(APP): metric-collector.go make -C collectors go build -o $(APP) metric-collector.go -runonce: $(APP) - ./$(APP) --once - fmt: go fmt collectors/*.go go fmt sinks/*.go