Temperature metrics: lm-sensors voltages, fan speeds and power are reported as temperatures (°C)
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 78/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- graphql, linux, typescript
Línea de trabajo
El filtro está en read() en api/src/unraid-api/graph/resolvers/metrics/temperature/sensors/lm_sensors.service.ts. Actualmente acepta cualquier clave que termine en _input y siempre establece CELSIUS. Empieza ahí y restringe las claves aceptadas a temp<n>_input con un valor numérico, dejando fuera ventiladores, voltajes y potencia. Está terminado cuando la consulta GraphQL para metrics.temperature.sensors devuelve solo las cuatro lecturas de temperatura de la reproducción, sin unit: CELSIUS en los valores de ventiladores o voltajes.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Environment
Unraid OS Version: 7.4.0 (Unraid API 4.37.12)
Are you using a reverse proxy? No, direct access (http://:5000)
Pre-submission Checklist
- I have verified that my Unraid OS is up to date
- I have tested this issue by accessing my server directly (not through a reverse proxy)
- This is not an Unraid Connect related issue
Issue Description
metrics.temperature.sensors contains every value of sensors -j that ends with _input, not only temperatures. Voltages (in*_input), fan speeds (fan*_input) and power (power*_input) are returned as temperature sensors with unit: CELSIUS and type: CUSTOM.
Cause: LmSensorsService.read() in api/src/unraid-api/graph/resolvers/metrics/temperature/sensors/lm_sensors.service.ts only checks key.endsWith('_input') and always sets TemperatureUnit.CELSIUS.
Steps to Reproduce
- Server with a Super-I/O chip that exposes voltages and fans via lm-sensors (here: Fintek
f71868a, plusfam15h_power) - Query
{ metrics { temperature { sensors { id name type current { value unit } } } } } - Look at the returned sensors
Expected Behavior
Only temperature readings (temp*_input) are returned as temperature sensors.
Actual Behavior
16 sensors are returned, only 4 of them are temperatures. Examples:
| id (key part) | value | real meaning |
|---|---|---|
f71868a-isa-0e80:3VSB:in7_input |
3.3 | voltage (V) |
f71868a-isa-0e80:Array Fan:fan2_input |
1570 | fan (RPM) |
fam15h_power-pci-00c4:power1:power1_input |
106.96 | power (W) |
f71868a-isa-0e80:MB Temp:temp1_input |
45 | temperature (correct) |
All of them come with unit: CELSIUS, so clients show e.g. "1570 °C" for a fan. Status/thresholds based on these values are meaningless as well.
Additional Context
Possible fix: in read(), only accept keys matching /^temp\d+_input$/ (lm-sensors naming), e.g.
if (!/^temp\d+_input$/.test(key) || typeof value !== 'number') continue;
Fans/voltages could be exposed separately later (see #1560 / #1598), but they should not appear in the temperature metrics.
Noticed while working on the ioBroker Unraid adapter (https://github.com/ingel81/ioBroker.unraid), which now filters these readings on its side.
- Lenguaje dominante
- TypeScript
- Estrellas
- 123
- Forks
- 25
- Merge medio
- 2 d 16 h
- PR fusionados (30 d)
- 9
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de unraid/api
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
flash { guid } always fails: resolver no longer returns guid but the schema marks it non-nullableAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
parityHistory query fails with NaN when a parity-checks.log record has an empty errors fieldAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
Todos los issues de unraid/api
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
yavorsky/unbuilt.app#65 ·
-
CVE security
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
mckinsey/agents-at-scale-ark#4091 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
factory:subtask
Dificultad 1/5 Menos de una hora Aptitud para principiantes 94/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
NUS-Project-SaBai/project-sabai#386 ·
Los mantenedores suelen responder en 3 días
-
android needs clarification
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
super-productivity/super-productivity#12105 · 3 comentarios ·
Los mantenedores suelen responder en 1 día