Use configuration with all supported collectors for CI. Fixes #13

This commit is contained in:
Thomas Roehl 2021-11-26 18:15:04 +01:00
parent bf43f6d975
commit f5b7da5046
3 changed files with 50 additions and 4 deletions

49
.github/ci-config.json vendored Normal file
View File

@ -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"
}
}
}
}
}

View File

@ -14,4 +14,4 @@ jobs:
run: make
- name: Run MetricCollector
run: make runonce
run: ./cc-metric-collector --once --config .github/ci-config.json

View File

@ -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