mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-02-08 05:56:37 +00:00
file: add file collector to scrape file size and file modify time which can replace filetime collector (#2205)
Co-authored-by: Jan-Otto Kröpke <mail@jkroepke.de>
This commit is contained in:
@@ -40,6 +40,7 @@ import (
|
||||
"github.com/prometheus-community/windows_exporter/internal/collector/diskdrive"
|
||||
"github.com/prometheus-community/windows_exporter/internal/collector/dns"
|
||||
"github.com/prometheus-community/windows_exporter/internal/collector/exchange"
|
||||
"github.com/prometheus-community/windows_exporter/internal/collector/file"
|
||||
"github.com/prometheus-community/windows_exporter/internal/collector/filetime"
|
||||
"github.com/prometheus-community/windows_exporter/internal/collector/fsrmquota"
|
||||
"github.com/prometheus-community/windows_exporter/internal/collector/gpu"
|
||||
@@ -111,6 +112,7 @@ func NewWithConfig(config Config) *Collection {
|
||||
collectors[dns.Name] = dns.New(&config.DNS)
|
||||
collectors[exchange.Name] = exchange.New(&config.Exchange)
|
||||
collectors[filetime.Name] = filetime.New(&config.Filetime)
|
||||
collectors[file.Name] = file.New(&config.File)
|
||||
collectors[fsrmquota.Name] = fsrmquota.New(&config.Fsrmquota)
|
||||
collectors[gpu.Name] = gpu.New(&config.GPU)
|
||||
collectors[hyperv.Name] = hyperv.New(&config.HyperV)
|
||||
|
||||
@@ -30,6 +30,7 @@ import (
|
||||
"github.com/prometheus-community/windows_exporter/internal/collector/diskdrive"
|
||||
"github.com/prometheus-community/windows_exporter/internal/collector/dns"
|
||||
"github.com/prometheus-community/windows_exporter/internal/collector/exchange"
|
||||
"github.com/prometheus-community/windows_exporter/internal/collector/file"
|
||||
"github.com/prometheus-community/windows_exporter/internal/collector/filetime"
|
||||
"github.com/prometheus-community/windows_exporter/internal/collector/fsrmquota"
|
||||
"github.com/prometheus-community/windows_exporter/internal/collector/gpu"
|
||||
@@ -81,6 +82,7 @@ type Config struct {
|
||||
DNS dns.Config `yaml:"dns"`
|
||||
Exchange exchange.Config `yaml:"exchange"`
|
||||
Filetime filetime.Config `yaml:"filetime"`
|
||||
File file.Config `yaml:"file"`
|
||||
Fsrmquota fsrmquota.Config `yaml:"fsrmquota"`
|
||||
GPU gpu.Config `yaml:"gpu"`
|
||||
HyperV hyperv.Config `yaml:"hyperv"`
|
||||
|
||||
@@ -34,6 +34,7 @@ import (
|
||||
"github.com/prometheus-community/windows_exporter/internal/collector/diskdrive"
|
||||
"github.com/prometheus-community/windows_exporter/internal/collector/dns"
|
||||
"github.com/prometheus-community/windows_exporter/internal/collector/exchange"
|
||||
"github.com/prometheus-community/windows_exporter/internal/collector/file"
|
||||
"github.com/prometheus-community/windows_exporter/internal/collector/filetime"
|
||||
"github.com/prometheus-community/windows_exporter/internal/collector/fsrmquota"
|
||||
"github.com/prometheus-community/windows_exporter/internal/collector/gpu"
|
||||
@@ -92,6 +93,7 @@ var BuildersWithFlags = map[string]BuilderWithFlags[Collector]{
|
||||
dns.Name: NewBuilderWithFlags(dns.NewWithFlags),
|
||||
exchange.Name: NewBuilderWithFlags(exchange.NewWithFlags),
|
||||
filetime.Name: NewBuilderWithFlags(filetime.NewWithFlags),
|
||||
file.Name: NewBuilderWithFlags(file.NewWithFlags),
|
||||
fsrmquota.Name: NewBuilderWithFlags(fsrmquota.NewWithFlags),
|
||||
gpu.Name: NewBuilderWithFlags(gpu.NewWithFlags),
|
||||
hyperv.Name: NewBuilderWithFlags(hyperv.NewWithFlags),
|
||||
|
||||
Reference in New Issue
Block a user