mirror of
https://github.com/ClusterCockpit/cc-metric-collector.git
synced 2026-02-17 16:31:46 +01:00
Embedded types should be at the top of the field list of a struct.
And there should be an empty line separating embedded fields from regular fields
This commit is contained in:
@@ -37,6 +37,7 @@ type BeegfsMetaCollectorConfig struct {
|
||||
|
||||
type BeegfsMetaCollector struct {
|
||||
metricCollector
|
||||
|
||||
tags map[string]string
|
||||
matches map[string]string
|
||||
config BeegfsMetaCollectorConfig
|
||||
|
||||
@@ -35,6 +35,7 @@ type BeegfsStorageCollectorConfig struct {
|
||||
|
||||
type BeegfsStorageCollector struct {
|
||||
metricCollector
|
||||
|
||||
tags map[string]string
|
||||
matches map[string]string
|
||||
config BeegfsStorageCollectorConfig
|
||||
|
||||
@@ -32,6 +32,7 @@ type CPUFreqCpuInfoCollectorTopology struct {
|
||||
|
||||
type CPUFreqCpuInfoCollector struct {
|
||||
metricCollector
|
||||
|
||||
topology []CPUFreqCpuInfoCollectorTopology
|
||||
}
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@ type CPUFreqCollectorTopology struct {
|
||||
// See: https://www.kernel.org/doc/html/latest/admin-guide/pm/cpufreq.html
|
||||
type CPUFreqCollector struct {
|
||||
metricCollector
|
||||
|
||||
topology []CPUFreqCollectorTopology
|
||||
config struct {
|
||||
ExcludeMetrics []string `json:"exclude_metrics,omitempty"`
|
||||
|
||||
@@ -30,6 +30,7 @@ type CpustatCollectorConfig struct {
|
||||
|
||||
type CpustatCollector struct {
|
||||
metricCollector
|
||||
|
||||
config CpustatCollectorConfig
|
||||
lastTimestamp time.Time // Store time stamp of last tick to derive values
|
||||
matches map[string]int
|
||||
|
||||
@@ -31,6 +31,7 @@ type CustomCmdCollectorConfig struct {
|
||||
|
||||
type CustomCmdCollector struct {
|
||||
metricCollector
|
||||
|
||||
config CustomCmdCollectorConfig
|
||||
cmdFieldsSlice [][]string
|
||||
files []string
|
||||
|
||||
@@ -29,6 +29,7 @@ type DiskstatCollectorConfig struct {
|
||||
|
||||
type DiskstatCollector struct {
|
||||
metricCollector
|
||||
|
||||
config DiskstatCollectorConfig
|
||||
allowedMetrics map[string]bool
|
||||
}
|
||||
|
||||
@@ -52,6 +52,7 @@ type GpfsMetricDefinition struct {
|
||||
|
||||
type GpfsCollector struct {
|
||||
metricCollector
|
||||
|
||||
tags map[string]string
|
||||
config GpfsCollectorConfig
|
||||
sudoCmd string
|
||||
|
||||
@@ -46,6 +46,7 @@ type InfinibandCollectorInfo struct {
|
||||
|
||||
type InfinibandCollector struct {
|
||||
metricCollector
|
||||
|
||||
config struct {
|
||||
ExcludeDevices []string `json:"exclude_devices,omitempty"` // IB device to exclude e.g. mlx5_0
|
||||
SendAbsoluteValues bool `json:"send_abs_values"` // Send absolut values as read from sys filesystem
|
||||
|
||||
@@ -37,6 +37,7 @@ type IOstatCollectorEntry struct {
|
||||
|
||||
type IOstatCollector struct {
|
||||
metricCollector
|
||||
|
||||
matches map[string]int
|
||||
config IOstatCollectorConfig
|
||||
devices map[string]IOstatCollectorEntry
|
||||
|
||||
@@ -27,6 +27,7 @@ const IPMISENSORS_PATH = `ipmi-sensors`
|
||||
|
||||
type IpmiCollector struct {
|
||||
metricCollector
|
||||
|
||||
config struct {
|
||||
ExcludeDevices []string `json:"exclude_devices"`
|
||||
IpmitoolPath string `json:"ipmitool_path"`
|
||||
|
||||
@@ -30,6 +30,7 @@ const LOADAVGFILE = "/proc/loadavg"
|
||||
|
||||
type LoadavgCollector struct {
|
||||
metricCollector
|
||||
|
||||
tags map[string]string
|
||||
load_matches []string
|
||||
load_skips []bool
|
||||
|
||||
@@ -45,6 +45,7 @@ type LustreMetricDefinition struct {
|
||||
|
||||
type LustreCollector struct {
|
||||
metricCollector
|
||||
|
||||
tags map[string]string
|
||||
config LustreCollectorConfig
|
||||
lctl string
|
||||
|
||||
@@ -40,6 +40,7 @@ type MemstatCollectorNode struct {
|
||||
|
||||
type MemstatCollector struct {
|
||||
metricCollector
|
||||
|
||||
stats map[string]int64
|
||||
tags map[string]string
|
||||
matches map[string]string
|
||||
|
||||
@@ -41,6 +41,7 @@ type NetstatCollectorMetric struct {
|
||||
|
||||
type NetstatCollector struct {
|
||||
metricCollector
|
||||
|
||||
config NetstatCollectorConfig
|
||||
aliasToCanonical map[string]string
|
||||
matches map[string][]NetstatCollectorMetric
|
||||
|
||||
@@ -34,6 +34,7 @@ type NfsCollectorData struct {
|
||||
|
||||
type nfsCollector struct {
|
||||
metricCollector
|
||||
|
||||
tags map[string]string
|
||||
version string
|
||||
config struct {
|
||||
|
||||
@@ -34,6 +34,7 @@ type NfsIOStatCollectorConfig struct {
|
||||
// defined by metricCollector (name, init, ...)
|
||||
type NfsIOStatCollector struct {
|
||||
metricCollector
|
||||
|
||||
config NfsIOStatCollectorConfig // the configuration structure
|
||||
meta map[string]string // default meta information
|
||||
tags map[string]string // default tags
|
||||
|
||||
@@ -59,6 +59,7 @@ type NUMAStatsCollectorTopolgy struct {
|
||||
|
||||
type NUMAStatsCollector struct {
|
||||
metricCollector
|
||||
|
||||
topology []NUMAStatsCollectorTopolgy
|
||||
config NUMAStatsCollectorConfig
|
||||
lastTimestamp time.Time
|
||||
|
||||
@@ -47,6 +47,7 @@ type NvidiaCollectorDevice struct {
|
||||
|
||||
type NvidiaCollector struct {
|
||||
metricCollector
|
||||
|
||||
config NvidiaCollectorConfig
|
||||
gpus []NvidiaCollectorDevice
|
||||
num_gpus int
|
||||
|
||||
@@ -34,6 +34,7 @@ type RAPLZoneInfo struct {
|
||||
|
||||
type RAPLCollector struct {
|
||||
metricCollector
|
||||
|
||||
config struct {
|
||||
// Exclude IDs for RAPL zones, e.g.
|
||||
// * 0 for zone 0
|
||||
|
||||
@@ -38,6 +38,7 @@ type RocmSmiCollectorDevice struct {
|
||||
|
||||
type RocmSmiCollector struct {
|
||||
metricCollector
|
||||
|
||||
config RocmSmiCollectorConfig // the configuration structure
|
||||
devices []RocmSmiCollectorDevice
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ type SampleCollectorConfig struct {
|
||||
// defined by metricCollector (name, init, ...)
|
||||
type SampleCollector struct {
|
||||
metricCollector
|
||||
|
||||
config SampleCollectorConfig // the configuration structure
|
||||
meta map[string]string // default meta information
|
||||
tags map[string]string // default tags
|
||||
|
||||
@@ -26,6 +26,7 @@ type SampleTimerCollectorConfig struct {
|
||||
// defined by metricCollector (name, init, ...)
|
||||
type SampleTimerCollector struct {
|
||||
metricCollector
|
||||
|
||||
wg sync.WaitGroup // sync group for management
|
||||
done chan bool // channel for management
|
||||
meta map[string]string // default meta information
|
||||
|
||||
@@ -31,6 +31,7 @@ type SchedstatCollectorConfig struct {
|
||||
// defined by metricCollector (name, init, ...)
|
||||
type SchedstatCollector struct {
|
||||
metricCollector
|
||||
|
||||
config SchedstatCollectorConfig // the configuration structure
|
||||
lastTimestamp time.Time // Store time stamp of last tick to derive values
|
||||
meta map[string]string // default meta information
|
||||
|
||||
@@ -27,6 +27,7 @@ type SelfCollectorConfig struct {
|
||||
|
||||
type SelfCollector struct {
|
||||
metricCollector
|
||||
|
||||
config SelfCollectorConfig // the configuration structure
|
||||
meta map[string]string // default meta information
|
||||
tags map[string]string // default tags
|
||||
|
||||
@@ -32,6 +32,7 @@ type SlurmCgroupsConfig struct {
|
||||
|
||||
type SlurmCgroupCollector struct {
|
||||
metricCollector
|
||||
|
||||
config SlurmCgroupsConfig
|
||||
meta map[string]string
|
||||
tags map[string]string
|
||||
|
||||
@@ -41,6 +41,7 @@ type TempCollectorSensor struct {
|
||||
|
||||
type TempCollector struct {
|
||||
metricCollector
|
||||
|
||||
config struct {
|
||||
ExcludeMetrics []string `json:"exclude_metrics"`
|
||||
TagOverride map[string]map[string]string `json:"tag_override"`
|
||||
|
||||
@@ -27,6 +27,7 @@ type TopProcsCollectorConfig struct {
|
||||
|
||||
type TopProcsCollector struct {
|
||||
metricCollector
|
||||
|
||||
tags map[string]string
|
||||
config TopProcsCollectorConfig
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user