go.d/sensors update meta (#18595)
Ilya Mashchenko committed
Sep 22, 2024 at 16:17 UTC
3628998360457c9896b8a83080284fe1a382aff9
4 files changed
+15
-15
src/go/plugin/go.d/modules/sensors/collect.go
-2
@@ -11,8 +11,6 @@ import (
11
12
const precision = 1000
13
14
-func ptr[T any](v T) *T { return &v }
15
-
14
func (s *Sensors) collect() (map[string]int64, error) {
15
if s.sc == nil {
16
return nil, errors.New("sysfs scanner is not initialized")
src/go/plugin/go.d/modules/sensors/integrations/linux_sensors_lm-sensors.md
src/go/plugin/go.d/modules/sensors/metadata.yaml
+13
-13
@@ -29,9 +29,18 @@ modules:
29
overview:
30
data_collection:
31
metrics_description: >
32
- This collector gathers real-time system sensor statistics,
33
- including temperature, voltage, current, power, fan speed, energy consumption, and humidity,
34
- utilizing the [sysfs](https://www.kernel.org/doc/Documentation/hwmon/sysfs-interface) interface.
32
+ This collector gathers real-time system sensor statistics using the [sysfs](https://www.kernel.org/doc/Documentation/hwmon/sysfs-interface) interface.
33
+
34
+ Supported sensors:
35
+
36
+ - Temperature
37
+ - Voltage
38
+ - Fan
39
+ - Current
40
+ - Power
41
+ - Energy
42
+ - Humidity
43
+ - Intrusion
44
method_description: ""
45
supported_platforms:
46
include: []
@@ -42,16 +51,7 @@ modules:
51
default_behavior:
52
auto_detection:
53
description: |
45
- The following type of sensors are auto-detected:
46
-
47
- - temperature
48
- - voltage
49
- - fan
50
- - current
51
- - power
52
- - energy
53
- - humidity
54
- - intrusion
54
+ Automatically discovers and exposes all available sensors on the system through the [sysfs](https://www.kernel.org/doc/Documentation/hwmon/sysfs-interface) interface.
55
limits:
56
description: ""
57
performance_impact:
src/go/plugin/go.d/modules/sensors/sensors_test.go
+2
@@ -306,6 +306,8 @@ func (m *mockScanner) Scan() ([]*lmsensors.Chip, error) {
306
return m.scanData, nil
307
}
308
309
+func ptr[T any](v T) *T { return &v }
310
+
311
func mockChips() []*lmsensors.Chip {
312
return []*lmsensors.Chip{
313
{