Skip to content

Commit

Permalink
Upgrade windows_exporter to 0.27.2 (#1527)
Browse files Browse the repository at this point in the history
* Upgrade windows_exporter to 0.27.2

* Upgrade windows_exporter to 0.27.2

* Add Close method
  • Loading branch information
jkroepke authored Sep 3, 2024
1 parent 7a2030e commit 6fcf6cf
Show file tree
Hide file tree
Showing 8 changed files with 167 additions and 118 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ Main (unreleased)
- Add a `otelcol.processor.groupbyattrs` component to reassociate collected metrics that match specified attributes
from opentelemetry. (@kehindesalaam)

- Update windows_exporter to v0.27.2. (@jkroepke)
The `smb.enabled_list` and `smb_client.enabled_list` doesn't have any effect anymore. All sub-collectors are enabled by default.

- Live debugging of `loki.process` will now also print the timestamp of incoming and outgoing log lines.
This is helpful for debugging `stage.timestamp`. (@ptodev)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,9 @@ The v2 collector can query service states much more efficiently, but can't provi

### smb block

Name | Type | Description | Default | Required
---------------|----------|--------------------------------------------|---------|---------
`enabled_list` | `string` | Comma-separated list of collectors to use. | `""` | no
Name | Type | Description | Default | Required
---------------|----------|----------------------------------------------------------------|---------|---------
`enabled_list` | `string` | Deprecated (no-op), Comma-separated list of collectors to use. | `""` | no

The collectors specified by `enabled_list` can include the following:

Expand All @@ -210,9 +210,9 @@ For example, `enabled_list` may be set to `"ServerShares"`.

### smb_client block

Name | Type | Description | Default | Required
---------------|----------|--------------------------------------------|---------|---------
`enabled_list` | `string` | Comma-separated list of collectors to use. | `""` | no
Name | Type | Description | Default | Required
---------------|----------|----------------------------------------------------------------|---------|---------
`enabled_list` | `string` | Deprecated (no-op), Comma-separated list of collectors to use. | `""` | no

The collectors specified by `enabled_list` can include the following:

Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ require (
github.com/prometheus-community/elasticsearch_exporter v1.5.0
github.com/prometheus-community/postgres_exporter v0.11.1
github.com/prometheus-community/stackdriver_exporter v0.15.1
github.com/prometheus-community/windows_exporter v0.26.2-0.20240731160221-8f2a45d83276
github.com/prometheus-community/windows_exporter v0.27.2
github.com/prometheus-operator/prometheus-operator v0.66.0
github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.66.0
github.com/prometheus-operator/prometheus-operator/pkg/client v0.66.0
Expand Down Expand Up @@ -235,7 +235,7 @@ require (
golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842
golang.org/x/net v0.27.0
golang.org/x/oauth2 v0.21.0
golang.org/x/sys v0.22.0
golang.org/x/sys v0.24.0
golang.org/x/text v0.16.0
golang.org/x/time v0.5.0
golang.org/x/tools v0.22.0
Expand Down
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2116,6 +2116,8 @@ github.com/prometheus-community/stackdriver_exporter v0.15.1 h1:+k26zeBy8BlG+eDK
github.com/prometheus-community/stackdriver_exporter v0.15.1/go.mod h1:UmmIgnrVQqDAeM8pSeYntBcUxPhp8oqb8W3nvRYzsSg=
github.com/prometheus-community/windows_exporter v0.26.2-0.20240731160221-8f2a45d83276 h1:hyWyr4JekYnFneEiqamv6CXQBA2ymSnS+VZgiWla++s=
github.com/prometheus-community/windows_exporter v0.26.2-0.20240731160221-8f2a45d83276/go.mod h1:5r9EMDZEMh+6a7fuTOoO/aik6R33NdSj5y19TFcfvDU=
github.com/prometheus-community/windows_exporter v0.27.2 h1:/tdRTouPMVsC4qt8+s9NOPEm7L/9qdDxmasiETlx+Wk=
github.com/prometheus-community/windows_exporter v0.27.2/go.mod h1:8+T6hfv71nvgVIzguouXkIGoa15ni+uXHHULBOA2bZo=
github.com/prometheus-operator/prometheus-operator v0.66.0 h1:Jj4mbGAkfBbTih6ait03f2vUjEHB7Kb4gnlAmWu7AJ0=
github.com/prometheus-operator/prometheus-operator v0.66.0/go.mod h1:U7S3+u6YTxwCTMNIQxZWttEq70qBA4Qps7/c5mUZOpQ=
github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.66.0 h1:PPW01FLVjJHMNcbAL1DDD9EZceSQKMOU/VpK0irrxrI=
Expand Down Expand Up @@ -3023,6 +3025,8 @@ golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI=
golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg=
golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
Expand Down
74 changes: 37 additions & 37 deletions internal/component/prometheus/exporter/windows/config_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,76 +13,76 @@ func (a *Arguments) SetToDefault() {
*a = Arguments{
EnabledCollectors: strings.Split(windows_integration.DefaultConfig.EnabledCollectors, ","),
Dfsr: DfsrConfig{
SourcesEnabled: strings.Split(col.ConfigDefaults.Dfsr.DfsrEnabledCollectors, ","),
SourcesEnabled: col.ConfigDefaults.DFSR.CollectorsEnabled,
},
Exchange: ExchangeConfig{
EnabledList: strings.Split(col.ConfigDefaults.Exchange.CollectorsEnabled, ","),
EnabledList: col.ConfigDefaults.Exchange.CollectorsEnabled,
},
IIS: IISConfig{
AppBlackList: col.ConfigDefaults.Iis.AppExclude,
AppWhiteList: col.ConfigDefaults.Iis.AppInclude,
SiteBlackList: col.ConfigDefaults.Iis.SiteExclude,
SiteWhiteList: col.ConfigDefaults.Iis.SiteInclude,
AppInclude: col.ConfigDefaults.Iis.AppInclude,
AppExclude: col.ConfigDefaults.Iis.AppExclude,
SiteInclude: col.ConfigDefaults.Iis.SiteInclude,
SiteExclude: col.ConfigDefaults.Iis.SiteExclude,
AppBlackList: col.ConfigDefaults.IIS.AppExclude.String(),
AppWhiteList: col.ConfigDefaults.IIS.AppInclude.String(),
SiteBlackList: col.ConfigDefaults.IIS.SiteExclude.String(),
SiteWhiteList: col.ConfigDefaults.IIS.SiteInclude.String(),
AppInclude: col.ConfigDefaults.IIS.AppInclude.String(),
AppExclude: col.ConfigDefaults.IIS.AppExclude.String(),
SiteInclude: col.ConfigDefaults.IIS.SiteInclude.String(),
SiteExclude: col.ConfigDefaults.IIS.SiteExclude.String(),
},
LogicalDisk: LogicalDiskConfig{
BlackList: col.ConfigDefaults.LogicalDisk.VolumeExclude,
WhiteList: col.ConfigDefaults.LogicalDisk.VolumeInclude,
Include: col.ConfigDefaults.LogicalDisk.VolumeInclude,
Exclude: col.ConfigDefaults.LogicalDisk.VolumeExclude,
BlackList: col.ConfigDefaults.LogicalDisk.VolumeExclude.String(),
WhiteList: col.ConfigDefaults.LogicalDisk.VolumeInclude.String(),
Include: col.ConfigDefaults.LogicalDisk.VolumeInclude.String(),
Exclude: col.ConfigDefaults.LogicalDisk.VolumeExclude.String(),
},
MSMQ: MSMQConfig{
Where: col.ConfigDefaults.Msmq.QueryWhereClause,
Where: *col.ConfigDefaults.Msmq.QueryWhereClause,
},
MSSQL: MSSQLConfig{
EnabledClasses: strings.Split(col.ConfigDefaults.Mssql.EnabledCollectors, ","),
EnabledClasses: col.ConfigDefaults.Mssql.CollectorsEnabled,
},
Network: NetworkConfig{
BlackList: col.ConfigDefaults.Net.NicExclude,
WhiteList: col.ConfigDefaults.Net.NicInclude,
Include: col.ConfigDefaults.Net.NicInclude,
Exclude: col.ConfigDefaults.Net.NicExclude,
BlackList: col.ConfigDefaults.Net.NicExclude.String(),
WhiteList: col.ConfigDefaults.Net.NicInclude.String(),
Include: col.ConfigDefaults.Net.NicInclude.String(),
Exclude: col.ConfigDefaults.Net.NicExclude.String(),
},
PhysicalDisk: PhysicalDiskConfig{
Exclude: col.ConfigDefaults.PhysicalDisk.DiskExclude,
Include: col.ConfigDefaults.PhysicalDisk.DiskInclude,
Exclude: col.ConfigDefaults.PhysicalDisk.DiskExclude.String(),
Include: col.ConfigDefaults.PhysicalDisk.DiskInclude.String(),
},
Printer: PrinterConfig{
Include: col.ConfigDefaults.Printer.Include,
Exclude: col.ConfigDefaults.Printer.Exclude,
Include: col.ConfigDefaults.Printer.PrinterInclude.String(),
Exclude: col.ConfigDefaults.Printer.PrinterExclude.String(),
},
Process: ProcessConfig{
BlackList: col.ConfigDefaults.Process.ProcessExclude,
WhiteList: col.ConfigDefaults.Process.ProcessInclude,
Include: col.ConfigDefaults.Process.ProcessInclude,
Exclude: col.ConfigDefaults.Process.ProcessExclude,
BlackList: col.ConfigDefaults.Process.ProcessExclude.String(),
WhiteList: col.ConfigDefaults.Process.ProcessInclude.String(),
Include: col.ConfigDefaults.Process.ProcessInclude.String(),
Exclude: col.ConfigDefaults.Process.ProcessExclude.String(),
},
ScheduledTask: ScheduledTaskConfig{
Include: col.ConfigDefaults.ScheduledTask.TaskInclude,
Exclude: col.ConfigDefaults.ScheduledTask.TaskExclude,
Include: col.ConfigDefaults.ScheduledTask.TaskInclude.String(),
Exclude: col.ConfigDefaults.ScheduledTask.TaskExclude.String(),
},
Service: ServiceConfig{
UseApi: strconv.FormatBool(col.ConfigDefaults.Service.UseAPI),
Where: col.ConfigDefaults.Service.ServiceWhereClause,
V2: strconv.FormatBool(col.ConfigDefaults.Service.V2),
},
SMB: SMBConfig{
EnabledList: strings.Split(col.ConfigDefaults.Smb.CollectorsEnabled, ","),
EnabledList: []string{},
},
SMBClient: SMBClientConfig{
EnabledList: strings.Split(col.ConfigDefaults.SmbClient.CollectorsEnabled, ","),
EnabledList: []string{},
},
SMTP: SMTPConfig{
BlackList: col.ConfigDefaults.Smtp.ServerExclude,
WhiteList: col.ConfigDefaults.Smtp.ServerInclude,
Include: col.ConfigDefaults.Smtp.ServerInclude,
Exclude: col.ConfigDefaults.Smtp.ServerExclude,
BlackList: col.ConfigDefaults.SMTP.ServerExclude.String(),
WhiteList: col.ConfigDefaults.SMTP.ServerInclude.String(),
Include: col.ConfigDefaults.SMTP.ServerInclude.String(),
Exclude: col.ConfigDefaults.SMTP.ServerExclude.String(),
},
TextFile: TextFileConfig{
TextFileDirectory: col.ConfigDefaults.Textfile.TextFileDirectories,
TextFileDirectory: strings.Join(col.ConfigDefaults.Textfile.TextFileDirectories, ","),
},
}
}
2 changes: 2 additions & 0 deletions internal/static/integrations/windows_exporter/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,13 @@ type PrinterConfig struct {
}

// SMBConfig handles settings for the windows_exporter smb collector
// Deprecated: This is not used by the windows_exporter
type SMBConfig struct {
EnabledList string `yaml:"enabled_list,omitempty"`
}

// SMBClientConfig handles settings for the windows_exporter smb client collector
// Deprecated: This is not used by the windows_exporter
type SMBClientConfig struct {
EnabledList string `yaml:"enabled_list,omitempty"`
}
Loading

0 comments on commit 6fcf6cf

Please sign in to comment.