storage_spaces: move storage pool and virtual disk metrics out of mscluster (#2646)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
This commit is contained in:
Jan-Otto Kröpke
2026-10-10 16:50:35 +02:00
committed by GitHub
co-authored by Claude Opus 5.5
parent 60e52fd8e6
commit 2b21e74f0e
15 changed files with 361 additions and 106 deletions
+2
View File
@@ -68,6 +68,7 @@ import (
"github.com/prometheus-community/windows_exporter/internal/collector/smb"
"github.com/prometheus-community/windows_exporter/internal/collector/smbclient"
"github.com/prometheus-community/windows_exporter/internal/collector/smtp"
"github.com/prometheus-community/windows_exporter/internal/collector/storage_spaces"
"github.com/prometheus-community/windows_exporter/internal/collector/system"
"github.com/prometheus-community/windows_exporter/internal/collector/tcp"
"github.com/prometheus-community/windows_exporter/internal/collector/terminal_services"
@@ -141,6 +142,7 @@ func NewWithConfig(config Config) *Collection {
collectors[smb.Name] = smb.New(&config.SMB)
collectors[smbclient.Name] = smbclient.New(&config.SMBClient)
collectors[smtp.Name] = smtp.New(&config.SMTP)
collectors[storage_spaces.Name] = storage_spaces.New(&config.StorageSpaces)
collectors[system.Name] = system.New(&config.System)
collectors[tcp.Name] = tcp.New(&config.TCP)
collectors[terminal_services.Name] = terminal_services.New(&config.TerminalServices)
+3
View File
@@ -58,6 +58,7 @@ import (
"github.com/prometheus-community/windows_exporter/internal/collector/smb"
"github.com/prometheus-community/windows_exporter/internal/collector/smbclient"
"github.com/prometheus-community/windows_exporter/internal/collector/smtp"
"github.com/prometheus-community/windows_exporter/internal/collector/storage_spaces"
"github.com/prometheus-community/windows_exporter/internal/collector/system"
"github.com/prometheus-community/windows_exporter/internal/collector/tcp"
"github.com/prometheus-community/windows_exporter/internal/collector/terminal_services"
@@ -111,6 +112,7 @@ type Config struct {
SMB smb.Config `yaml:"smb"`
SMBClient smbclient.Config `yaml:"smb_client"`
SMTP smtp.Config `yaml:"smtp"`
StorageSpaces storage_spaces.Config `yaml:"storage_spaces"`
System system.Config `yaml:"system"`
TCP tcp.Config `yaml:"tcp"`
TerminalServices terminal_services.Config `yaml:"terminal_services"`
@@ -168,6 +170,7 @@ var ConfigDefaults = Config{
SMB: smb.ConfigDefaults,
SMBClient: smbclient.ConfigDefaults,
SMTP: smtp.ConfigDefaults,
StorageSpaces: storage_spaces.ConfigDefaults,
System: system.ConfigDefaults,
TCP: tcp.ConfigDefaults,
TerminalServices: terminal_services.ConfigDefaults,
+2
View File
@@ -62,6 +62,7 @@ import (
"github.com/prometheus-community/windows_exporter/internal/collector/smb"
"github.com/prometheus-community/windows_exporter/internal/collector/smbclient"
"github.com/prometheus-community/windows_exporter/internal/collector/smtp"
"github.com/prometheus-community/windows_exporter/internal/collector/storage_spaces"
"github.com/prometheus-community/windows_exporter/internal/collector/system"
"github.com/prometheus-community/windows_exporter/internal/collector/tcp"
"github.com/prometheus-community/windows_exporter/internal/collector/terminal_services"
@@ -122,6 +123,7 @@ var BuildersWithFlags = map[string]BuilderWithFlags[Collector]{
smb.Name: NewBuilderWithFlags(smb.NewWithFlags),
smbclient.Name: NewBuilderWithFlags(smbclient.NewWithFlags),
smtp.Name: NewBuilderWithFlags(smtp.NewWithFlags),
storage_spaces.Name: NewBuilderWithFlags(storage_spaces.NewWithFlags),
system.Name: NewBuilderWithFlags(system.NewWithFlags),
tcp.Name: NewBuilderWithFlags(tcp.NewWithFlags),
terminal_services.Name: NewBuilderWithFlags(terminal_services.NewWithFlags),