mirror of
https://github.com/ClusterCockpit/cc-metric-collector.git
synced 2025-04-08 14:35:55 +02:00
Avoid go vet warning:
struct field tag `json:"..., omitempty"` not compatible with reflect.StructTag.Get: suspicious space in struct tag value struct field tag `json:"...", omitempty` not compatible with reflect.StructTag.Get: key:"value" pairs not separated by spaces
This commit is contained in:
parent
cc35357957
commit
5cbd345a1d
@ -13,7 +13,7 @@ import (
|
|||||||
const CPUSTATFILE = `/proc/stat`
|
const CPUSTATFILE = `/proc/stat`
|
||||||
|
|
||||||
type CpustatCollectorConfig struct {
|
type CpustatCollectorConfig struct {
|
||||||
ExcludeMetrics []string `json:"exclude_metrics, omitempty"`
|
ExcludeMetrics []string `json:"exclude_metrics,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type CpustatCollector struct {
|
type CpustatCollector struct {
|
||||||
|
@ -15,7 +15,7 @@ const DISKSTATFILE = `/proc/diskstats`
|
|||||||
const DISKSTAT_SYSFSPATH = `/sys/block`
|
const DISKSTAT_SYSFSPATH = `/sys/block`
|
||||||
|
|
||||||
type DiskstatCollectorConfig struct {
|
type DiskstatCollectorConfig struct {
|
||||||
ExcludeMetrics []string `json:"exclude_metrics, omitempty"`
|
ExcludeMetrics []string `json:"exclude_metrics,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type DiskstatCollector struct {
|
type DiskstatCollector struct {
|
||||||
|
@ -22,7 +22,7 @@ const LIDFILE = `/sys/class/infiniband/mlx4_0/ports/1/lid`
|
|||||||
const PERFQUERY = `/usr/sbin/perfquery`
|
const PERFQUERY = `/usr/sbin/perfquery`
|
||||||
|
|
||||||
type InfinibandCollectorConfig struct {
|
type InfinibandCollectorConfig struct {
|
||||||
ExcludeDevices []string `json:"exclude_devices, omitempty"`
|
ExcludeDevices []string `json:"exclude_devices,omitempty"`
|
||||||
PerfQueryPath string `json:"perfquery_path"`
|
PerfQueryPath string `json:"perfquery_path"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ import (
|
|||||||
const LOADAVGFILE = `/proc/loadavg`
|
const LOADAVGFILE = `/proc/loadavg`
|
||||||
|
|
||||||
type LoadavgCollectorConfig struct {
|
type LoadavgCollectorConfig struct {
|
||||||
ExcludeMetrics []string `json:"exclude_metrics, omitempty"`
|
ExcludeMetrics []string `json:"exclude_metrics,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type LoadavgCollector struct {
|
type LoadavgCollector struct {
|
||||||
|
@ -11,8 +11,8 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type NvidiaCollectorConfig struct {
|
type NvidiaCollectorConfig struct {
|
||||||
ExcludeMetrics []string `json:"exclude_metrics, omitempty"`
|
ExcludeMetrics []string `json:"exclude_metrics,omitempty"`
|
||||||
ExcludeDevices []string `json:"exclude_devices, omitempty"`
|
ExcludeDevices []string `json:"exclude_devices,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type NvidiaCollector struct {
|
type NvidiaCollector struct {
|
||||||
|
@ -54,11 +54,11 @@ import (
|
|||||||
type CentralConfigFile struct {
|
type CentralConfigFile struct {
|
||||||
Interval int `json:"interval"`
|
Interval int `json:"interval"`
|
||||||
Duration int `json:"duration"`
|
Duration int `json:"duration"`
|
||||||
Pidfile string `json:"pidfile", omitempty`
|
Pidfile string `json:"pidfile,omitempty"`
|
||||||
CollectorConfigFile string `json:"collectors"`
|
CollectorConfigFile string `json:"collectors"`
|
||||||
RouterConfigFile string `json:"router"`
|
RouterConfigFile string `json:"router"`
|
||||||
SinkConfigFile string `json:"sinks"`
|
SinkConfigFile string `json:"sinks"`
|
||||||
ReceiverConfigFile string `json:"receivers", omitempty`
|
ReceiverConfigFile string `json:"receivers,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func LoadCentralConfiguration(file string, config *CentralConfigFile) error {
|
func LoadCentralConfiguration(file string, config *CentralConfigFile) error {
|
||||||
|
@ -10,7 +10,7 @@ type ReceiverConfig struct {
|
|||||||
Addr string `json:"address"`
|
Addr string `json:"address"`
|
||||||
Port string `json:"port"`
|
Port string `json:"port"`
|
||||||
Database string `json:"database"`
|
Database string `json:"database"`
|
||||||
Organization string `json:"organization", omitempty`
|
Organization string `json:"organization,omitempty"`
|
||||||
Type string `json:"type"`
|
Type string `json:"type"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,14 +7,14 @@ import (
|
|||||||
|
|
||||||
type sinkConfig struct {
|
type sinkConfig struct {
|
||||||
Type string `json:"type"`
|
Type string `json:"type"`
|
||||||
Host string `json:"host", omitempty`
|
Host string `json:"host,omitempty"`
|
||||||
Port string `json:"port", omitempty`
|
Port string `json:"port,omitempty"`
|
||||||
Database string `json:"database, omitempty"`
|
Database string `json:"database,omitempty"`
|
||||||
User string `json:"user, omitempty"`
|
User string `json:"user,omitempty"`
|
||||||
Password string `json:"password", omitempty`
|
Password string `json:"password,omitempty"`
|
||||||
Organization string `json:"organization", omitempty`
|
Organization string `json:"organization,omitempty"`
|
||||||
SSL bool `json:"ssl", omitempty`
|
SSL bool `json:"ssl,omitempty"`
|
||||||
MetaAsTags bool `json:"meta_as_tags", omitempty`
|
MetaAsTags bool `json:"meta_as_tags,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type sink struct {
|
type sink struct {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user