thermalzone: deprecate collector (#2201)

This commit is contained in:
Jan-Otto Kröpke
2025-09-26 12:29:55 +02:00
committed by GitHub
parent bbe0d1aba7
commit 7c108ea5be
5 changed files with 28 additions and 34 deletions

View File

@@ -55,7 +55,6 @@ A Prometheus exporter for Windows machines.
| [tcp](docs/collector.tcp.md) | TCP connections | | | [tcp](docs/collector.tcp.md) | TCP connections | |
| [terminal_services](docs/collector.terminal_services.md) | Terminal services (RDS) | | | [terminal_services](docs/collector.terminal_services.md) | Terminal services (RDS) | |
| [textfile](docs/collector.textfile.md) | Read prometheus metrics from a text file | | | [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 | | | [time](docs/collector.time.md) | Windows Time Service | |
| [udp](docs/collector.udp.md) | UDP connections | | | [udp](docs/collector.udp.md) | UDP connections | |
| [update](docs/collector.update.md) | Windows Update Service | | | [update](docs/collector.update.md) | Windows Update Service | |

View File

@@ -42,7 +42,6 @@ This directory contains documentation of the collectors in the windows_exporter,
- [`tcp`](collector.tcp.md) - [`tcp`](collector.tcp.md)
- [`terminal_services`](collector.terminal_services.md) - [`terminal_services`](collector.terminal_services.md)
- [`textfile`](collector.textfile.md) - [`textfile`](collector.textfile.md)
- [`thermalzone`](collector.thermalzone.md)
- [`time`](collector.time.md) - [`time`](collector.time.md)
- [`udp`](collector.udp.md) - [`udp`](collector.udp.md)
- [`update`](collector.update.md) - [`update`](collector.update.md)

View File

@@ -260,3 +260,27 @@ collector:
The perfdata collector returns metrics based on the user configuration. The perfdata collector returns metrics based on the user configuration.
The metrics are named based on the object name and the counter name. The metrics are named based on the object name and the counter name.
The instance name is added as a label to the metric. 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
```

View File

@@ -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!_

View File

@@ -72,6 +72,10 @@ func (c *Collector) Close() error {
} }
func (c *Collector) Build(logger *slog.Logger, _ *mi.Session) 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( c.temperature = prometheus.NewDesc(
prometheus.BuildFQName(types.Namespace, Name, "temperature_celsius"), prometheus.BuildFQName(types.Namespace, Name, "temperature_celsius"),
"(Temperature)", "(Temperature)",