Expose ZFS ARC size and maximum as optional read-only metrics
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- graphql, typescript
Línea de trabajo
Start by locating the public GraphQL schema and the API code that collects MemoryUtilization; the issue does not name specific files or tests. Trace how existing memory metrics are read and exposed, then check the schema and tests for the relevant entry points. Done means optional, read-only ARC size and maximum fields report byte values or null when unavailable, with tests for the listed cases and existing memory behavior preserved.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Is your feature request related to a problem?
Home Assistant users need ZFS ARC used bytes and percentage of the configured ARC maximum to replace a separate Glances installation. The standard Unraid API does not currently expose these values, so a typed client cannot provide them without bypassing the API.
This blocks the two ZFS-cache metrics in https://github.com/tinkerologie/ha-unraid/issues/202. The integration intentionally performs all Unraid I/O through the unraid-api Python client.
Describe the solution you'd like
Expose optional, read-only ARC size and ARC maximum values in the public metrics schema, for example nullable BigInt fields on MemoryUtilization (field names subject to maintainer preference). Read the current size and c_max counters from the fixed /proc/spl/kstat/zfs/arcstats source, without SMART calls, disk probes, shell execution, or disk wake-ups. Return null when ZFS/ARC stats are unavailable; do not substitute zero for unavailable data. Define both values in bytes, allowing clients to calculate size / c_max * 100.
Acceptance criteria:
- Public GraphQL schema exposes typed ARC size and maximum fields, with documented units and unavailable behavior.
- Collection remains read-only and does not spin up disks.
- Tests cover valid counters, unavailable ZFS, malformed/missing counters, and large values.
- Existing memory metrics retain their current behavior.
Describe alternatives you've considered
Glances, SSH collection, and the separate Unraid Management Agent can expose ARC data, but they introduce another service or bypass the standard Unraid API. HA template/group helpers cannot reconstruct ARC size or c_max from total/used/free/available memory. We do not want to manufacture an estimate or query undocumented file/log endpoints.
Additional context
Verified against live API 4.37.7+250d3663: the type list has no ARC/ZFS metrics type, and MemoryUtilization contains total, used, free, available, active, buffcache and swap metrics only. The published schema at https://github.com/unraid/api/blob/250d366375f3f004e4c02e9db1aede5a7a629705/api/generated-schema.graphql#L1808 confirms this. The Python client currently has no typed ARC fields either.
Once the server schema provides the capability, the Python client can detect it and expose optional fields without breaking older servers. The HA integration can then create ZFS cache sensors only for supported servers.
Environment (if relevant)
Unraid OS Version: 7.3.4; API 4.37.7+250d3663. The original request was raised on Unraid 7.2.4.
Pre-submission Checklist
- I have searched existing issues to ensure this feature hasn't already been requested
- This is not an Unraid Connect related feature
- I have provided clear examples or use cases for the feature
- 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
-
Temperature metrics: lm-sensors voltages, fan speeds and power are reported as temperatures (°C)Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
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
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