diff --git a/README.md b/README.md index be3054b2..cca4f68b 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,6 @@ A Prometheus exporter for Windows machines. | [tcp](docs/collector.tcp.md) | TCP connections | | | [terminal_services](docs/collector.terminal_services.md) | Terminal services (RDS) | | | [textfile](docs/collector.textfile.md) | Read prometheus metrics from a text file | | -| [thermalzone](docs/collector.thermalzone.md) | Thermal information | | | [time](docs/collector.time.md) | Windows Time Service | | | [udp](docs/collector.udp.md) | UDP connections | | | [update](docs/collector.update.md) | Windows Update Service | | diff --git a/docs/README.md b/docs/README.md index 2d152186..dc69b196 100644 --- a/docs/README.md +++ b/docs/README.md @@ -42,7 +42,6 @@ This directory contains documentation of the collectors in the windows_exporter, - [`tcp`](collector.tcp.md) - [`terminal_services`](collector.terminal_services.md) - [`textfile`](collector.textfile.md) -- [`thermalzone`](collector.thermalzone.md) - [`time`](collector.time.md) - [`udp`](collector.udp.md) - [`update`](collector.update.md) diff --git a/docs/collector.performancecounter.md b/docs/collector.performancecounter.md index b0755e0f..2510edca 100644 --- a/docs/collector.performancecounter.md +++ b/docs/collector.performancecounter.md @@ -260,3 +260,27 @@ collector: The perfdata collector returns metrics based on the user configuration. The metrics are named based on the object name and the counter name. The instance name is added as a label to the metric. + +# Examples + +## thermalzone collector + +```yaml +collector: + performancecounter: + objects: |- + - name: thermalzone + object: "Thermal Zone Information" + instances: ["*"] + type: formatted + counters: + - name: "Temperature" + type: "gauge" + metric: windows_thermalzone_percent_passive_limit + - name: "% Passive Limit" + type: "gauge" + metric: windows_thermalzone_temperature_celsius + - name: "Throttle Reasons" + type: "gauge" + metric: windows_thermalzone_throttle_reasons +``` diff --git a/docs/collector.thermalzone.md b/docs/collector.thermalzone.md deleted file mode 100644 index 6de0e534..00000000 --- a/docs/collector.thermalzone.md +++ /dev/null @@ -1,32 +0,0 @@ -# thermalzone collector - -The thermalzone collector exposes metrics about system temps. Note that temperature is given in Kelvin - -||| --|- -Metric name prefix | `thermalzone` -Classes | [`Win32_PerfRawData_Counters_ThermalZoneInformation`](https://wutils.com/wmi/root/cimv2/win32_perfrawdata_counters_thermalzoneinformation/#temperature_properties) -Enabled by default? | No - -## Flags - -None - -## Metrics - -Name | Description | Type | Labels ------|-------------|------|------- -`windows_thermalzone_percent_passive_limit` | % Passive Limit is the current limit this thermal zone is placing on the devices it controls. A limit of 100% indicates the devices are unconstrained. A limit of 0% indicates the devices are fully constrained. | gauge | None -`windows_thermalzone_temperature_celsius ` | Temperature of the thermal zone, in degrees Celsius. | gauge | None -`windows_thermalzone_throttle_reasons ` | Throttle Reasons indicate reasons why the thermal zone is limiting performance of the devices it controls. 0x0 - The zone is not throttled. 0x1 - The zone is throttled for thermal reasons. 0x2 - The zone is throttled to limit electrical current. | gauge | None - -[`Throttle reasons` source](https://docs.microsoft.com/en-us/windows-hardware/design/device-experiences/examples--requirements-and-diagnostics) - -### Example metric -_This collector does not yet have explained examples, we would appreciate your help adding them!_ - -## Useful queries -_This collector does not yet have any useful queries added, we would appreciate your help adding them!_ - -## Alerting examples -_This collector does not yet have alerting examples, we would appreciate your help adding them!_ diff --git a/internal/collector/thermalzone/thermalzone.go b/internal/collector/thermalzone/thermalzone.go index 051032f3..89b6133c 100644 --- a/internal/collector/thermalzone/thermalzone.go +++ b/internal/collector/thermalzone/thermalzone.go @@ -72,6 +72,10 @@ func (c *Collector) Close() error { } func (c *Collector) Build(logger *slog.Logger, _ *mi.Session) error { + logger.Warn("The thermalzone collector is deprecated and will be removed in a future release. Please use the 'performancecounter' collector instead.", + slog.String("collector", c.GetName()), + ) + c.temperature = prometheus.NewDesc( prometheus.BuildFQName(types.Namespace, Name, "temperature_celsius"), "(Temperature)",