mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-02-08 05:56:37 +00:00
udp: Added UDP collector (#1725)
This commit is contained in:
@@ -55,6 +55,7 @@ import (
|
||||
"github.com/prometheus-community/windows_exporter/internal/collector/textfile"
|
||||
"github.com/prometheus-community/windows_exporter/internal/collector/thermalzone"
|
||||
"github.com/prometheus-community/windows_exporter/internal/collector/time"
|
||||
"github.com/prometheus-community/windows_exporter/internal/collector/udp"
|
||||
"github.com/prometheus-community/windows_exporter/internal/collector/update"
|
||||
"github.com/prometheus-community/windows_exporter/internal/collector/vmware"
|
||||
"github.com/prometheus-community/windows_exporter/internal/mi"
|
||||
@@ -122,6 +123,7 @@ func NewWithConfig(config Config) *MetricCollectors {
|
||||
collectors[textfile.Name] = textfile.New(&config.Textfile)
|
||||
collectors[thermalzone.Name] = thermalzone.New(&config.ThermalZone)
|
||||
collectors[time.Name] = time.New(&config.Time)
|
||||
collectors[udp.Name] = udp.New(&config.UDP)
|
||||
collectors[update.Name] = update.New(&config.Update)
|
||||
collectors[vmware.Name] = vmware.New(&config.Vmware)
|
||||
|
||||
|
||||
@@ -45,6 +45,7 @@ import (
|
||||
"github.com/prometheus-community/windows_exporter/internal/collector/textfile"
|
||||
"github.com/prometheus-community/windows_exporter/internal/collector/thermalzone"
|
||||
"github.com/prometheus-community/windows_exporter/internal/collector/time"
|
||||
"github.com/prometheus-community/windows_exporter/internal/collector/udp"
|
||||
"github.com/prometheus-community/windows_exporter/internal/collector/update"
|
||||
"github.com/prometheus-community/windows_exporter/internal/collector/vmware"
|
||||
)
|
||||
@@ -94,6 +95,7 @@ type Config struct {
|
||||
Textfile textfile.Config `yaml:"textfile"`
|
||||
ThermalZone thermalzone.Config `yaml:"thermal_zone"`
|
||||
Time time.Config `yaml:"time"`
|
||||
UDP udp.Config `yaml:"udp"`
|
||||
Update update.Config `yaml:"update"`
|
||||
Vmware vmware.Config `yaml:"vmware"`
|
||||
}
|
||||
@@ -146,6 +148,7 @@ var ConfigDefaults = Config{
|
||||
Textfile: textfile.ConfigDefaults,
|
||||
ThermalZone: thermalzone.ConfigDefaults,
|
||||
Time: time.ConfigDefaults,
|
||||
UDP: udp.ConfigDefaults,
|
||||
Update: update.ConfigDefaults,
|
||||
Vmware: vmware.ConfigDefaults,
|
||||
}
|
||||
|
||||
@@ -49,6 +49,7 @@ import (
|
||||
"github.com/prometheus-community/windows_exporter/internal/collector/textfile"
|
||||
"github.com/prometheus-community/windows_exporter/internal/collector/thermalzone"
|
||||
"github.com/prometheus-community/windows_exporter/internal/collector/time"
|
||||
"github.com/prometheus-community/windows_exporter/internal/collector/udp"
|
||||
"github.com/prometheus-community/windows_exporter/internal/collector/update"
|
||||
"github.com/prometheus-community/windows_exporter/internal/collector/vmware"
|
||||
)
|
||||
@@ -104,6 +105,7 @@ var BuildersWithFlags = map[string]BuilderWithFlags[Collector]{
|
||||
textfile.Name: NewBuilderWithFlags(textfile.NewWithFlags),
|
||||
thermalzone.Name: NewBuilderWithFlags(thermalzone.NewWithFlags),
|
||||
time.Name: NewBuilderWithFlags(time.NewWithFlags),
|
||||
udp.Name: NewBuilderWithFlags(udp.NewWithFlags),
|
||||
update.Name: NewBuilderWithFlags(update.NewWithFlags),
|
||||
vmware.Name: NewBuilderWithFlags(vmware.NewWithFlags),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user