mirror of
https://github.com/ClusterCockpit/cc-metric-collector.git
synced 2026-02-13 14:41:45 +01:00
Golangci lint fixes (#195)
* Add golangci-lin as make target * Fix: could omit type ... from declaration; it will be inferred from the right-hand side (staticcheck) * Fix func intArrayContains is unused (unused) * Fix: could use strings.ReplaceAll instead (staticcheck) * Fix: could expand call to math.Pow (staticcheck) * Fix: could use tagged switch on `...` (staticcheck) * Fix: Error return value of `...` is not checked (errcheck) * Fix: ineffectual assignment to err (ineffassign) * Fix: There is no need to wait for command completion * Add cpustat, diskstat and schedstat config * Use slices to exclude metrics * Replaced stringArrayContains by slices.Contains * Replace m[k]=v loop with maps.Copy * Use module slices from the standard library. Remove use of golang.org/x/exp/slices * Use SplitSeq and max to modernize code
This commit is contained in:
@@ -1,6 +1,19 @@
|
||||
{
|
||||
"cpufreq": {},
|
||||
"cpufreq_cpuinfo": {},
|
||||
"cpustat": {
|
||||
"exclude_metrics": [
|
||||
"cpu_idle"
|
||||
]
|
||||
},
|
||||
"diskstat": {
|
||||
"exclude_metrics": [
|
||||
"disk_total"
|
||||
],
|
||||
"exclude_mounts": [
|
||||
"slurm-tmpfs"
|
||||
]
|
||||
},
|
||||
"gpfs": {
|
||||
"exclude_filesystem": [
|
||||
"test_fs"
|
||||
@@ -21,6 +34,8 @@
|
||||
},
|
||||
"numastats": {},
|
||||
"nvidia": {},
|
||||
"schedstat": {
|
||||
},
|
||||
"tempstat": {
|
||||
"report_max_temperature": true,
|
||||
"report_critical_temperature": true,
|
||||
@@ -38,4 +53,4 @@
|
||||
"topprocs": {
|
||||
"num_procs": 5
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user