External integration - TrueNAS

cover-truenas

Hi everyone!

Synology, Unraid, UGREEN, QNAP… TrueNAS was missing, the NAS for everyone who built their own with ZFS. I do a lot of self-hosting (Sonarr & Radarr was a treat), and this series is for those who have a NAS or a server at home: this one monitors the NAS locally, without cloud.

What it does

  • The NAS: online, processor, memory, processor temperature, uptime, version, « update available », number of active alerts and their highest level.
  • One device per ZFS pool: status (online, errors, degraded, failed…), used space, free space, capacity, days since last scrub and its errors.
  • One device per disk: temperature and SMART status.
  • One device per application and per VM: running or not, status. An on/off switch as an option, disabled by default.
  • Two triggers: « Degraded Pool » and « New TrueNAS Alert » (filterable by level, with the alert text).
  • Two actions « Restart / Shutdown the NAS », disabled by default (to check in the configuration).
  • A widget: processor and memory gauges, problems at the top, then pools, applications and VMs.
  • In French, English, German and Spanish.

The cool thing

Degraded pool → message to the whole house and a lamp that turns red
New alert of level Error or higher → notification with the alert text
First Sunday of the month, a pool without scrub for 35 days → reminder

Installation

:warning: Gladys 5.1 minimum.

It will arrive in the store at the next indexer run. In the meantime: Integrations → Install from GitHub, with GitHub - guim31/gladys-truenas: TrueNAS pools, disks, alerts and apps for Gladys Assistant · GitHub

  1. In TrueNAS: Credentials → Users → Add, a user gladys with the role Read-only Administrator (no shell or share needed).
  2. Connected with this user: user menu in the top right → API Keys → Add, and copy the key (TrueNAS only displays it once). To start and stop applications and VMs, you also need the APPS_WRITE and VM_WRITE rights; to restart or shut down the NAS, a full administrator.
  3. In Gladys: the NAS address and the key, check Accept a self-signed certificate (TrueNAS generates one by default), then Test the connection.
  4. Discovery tab: add the NAS, the pools, the disks and the applications.

Honest small reservations

  • HTTPS only: TrueNAS revokes an API key sent over plain HTTP, so the integration refuses an address in http:// before sending anything.
  • TrueNAS 25.04 or newer only (Community Edition, ex-SCALE): neither TrueNAS CORE nor SCALE 24.10, which do not have this API. One NAS per installation.
  • The alert texts remain in English, as TrueNAS writes them. Datasets, shares and snapshots are not read.
  • Developed without TrueNAS. It’s a complete system, which I couldn’t run for the occasion: the integration is tested on responses reconstructed from TrueNAS’s source code (25.04, 25.10 and 26.0 beta). Only the encrypted connection has been verified for real. The processor, memory and temperature graphs, the disk temperatures in 25.04 and the start/stop of applications are to be confirmed. If you have a TrueNAS, your feedback is more than welcome, and the repository contains a small read-only test script if you want to help me.

Like the previous ones, developed with Claude Code. Independent project, not affiliated with iXsystems.

Repository: GitHub - guim31/gladys-truenas: TrueNAS pools, disks, alerts and apps for Gladys Assistant · GitHub