]> ## &name; (6lts fork) This is a fork of [fabianonline/unraid-zabbix_agent](https://git.schle.nz/fabian/unraid-zabbix_agent), maintained here to keep the bundled agent on the Zabbix 6.0 LTS branch and fix a couple of long-standing bugs. All credit for the original plugin design goes to fabianonline. Este es un fork de [fabianonline/unraid-zabbix_agent](https://git.schle.nz/fabian/unraid-zabbix_agent), mantenido aquí para dejar el agente empaquetado en la rama Zabbix 6.0 LTS y arreglar un par de bugs de larga duración. Todo el crédito del diseño original del plugin es de fabianonline. ### Support thread link (2026.07.25, no package version bump) - Added `supportURL` pointing to this plugin's official Unraid forum support thread (there was none before), so both Unraid's own Plugins page and the Community Applications listing show a real support venue. Metadata-only change to the `.plg` header, so no package version bump was needed. - Añadido `supportURL` apuntando al hilo oficial de soporte de este plugin en el foro de Unraid (antes no había ninguno), para que tanto la pestaña de Plugins de Unraid como el listado de Community Applications muestren un canal de soporte real. Cambio solo de metadatos en la cabecera del `.plg`, así que no hizo falta subir de versión del paquete. ### Template fix (2026.07.20, no package version bump — see below) - Fixed the "Temperature Mainboard" item (`unraid.temperatures[mainboard]`) in zabbix_template.xml: on hardware without a board sensor, the agent correctly reports `null`, but the item had no way to handle that gracefully, so Zabbix marked it "not supported" instead of just recording no data. The final working fix adds a "Does not match regular expression" preprocessing step (pattern `^-?[0-9]+(\.[0-9]+)?$`) with "Discard value" error handling, after the existing JSONPath step. Verified stable (state=normal, no error) for several minutes across multiple real polling cycles on a live Zabbix 6.0.42 server. Note for anyone hitting a similar issue: adding error handling directly to the JSONPath step does *not* work here, because the failure happens at Zabbix's final "convert to item value type" stage, which isn't covered by that step's own error handler — it needs a dedicated validation step afterward. Like the 2026.07.20.1 template fix, this only touches zabbix_template.xml, not the installable package, so no version bump was needed. - Arreglado el item "Temperature Mainboard" (`unraid.temperatures[mainboard]`) en zabbix_template.xml: en hardware sin sensor de placa, el agente devuelve correctamente `null`, pero el item no tenía forma de manejarlo con elegancia, así que Zabbix lo marcaba como "no soportado" en vez de simplemente no tener dato. El fix final que funciona añade un paso de preprocesado "Does not match regular expression" (patrón `^-?[0-9]+(\.[0-9]+)?$`) con gestión de error "Discard value", después del paso JSONPath ya existente. Verificado estable (estado normal, sin error) durante varios minutos en múltiples ciclos reales de sondeo, en un Zabbix Server 6.0.42 real. Nota para quien tope con algo parecido: añadir la gestión de error directamente al paso JSONPath *no* funciona en este caso, porque el fallo ocurre en la etapa final de Zabbix de "convertir al tipo de valor del item", que no queda cubierta por el manejador de error de ese paso — hace falta un paso de validación aparte después. Igual que el fix de template de 2026.07.20.1, esto solo toca zabbix_template.xml, no el paquete instalable, así que no hizo falta subir de versión. ### 2026.07.23.1 - Fixed: the zero-setup "View live logs" link (`scripts/tail_syslog_filtered`) tailed the last 200 raw syslog lines *before* filtering them down to the agent's own lines. Since the agent only logs on start/stop/errors by default, other services can easily fill that 200-line window between agent entries, so the terminal frequently opened showing nothing at all even though it was working correctly — just waiting silently for the next matching line. Rewritten to first search a much larger backfill window (3000 raw lines) for up to the last 50 matching lines and print those immediately, then continue following live from that point — the window now shows recent activity right away instead of looking broken. - Arreglado: el enlace "Ver logs en vivo — sin configurar nada" (`scripts/tail_syslog_filtered`) leía las últimas 200 líneas *sin filtrar* del syslog y luego las filtraba a las del agente. Como el agente por defecto solo escribe al arrancar/parar o si hay un error real, otros servicios pueden llenar fácilmente esas 200 líneas entre dos entradas del agente, así que la consola a menudo se abría totalmente vacía aunque estuviera funcionando bien — solo esperando en silencio la siguiente línea que encajara. Reescrito para buscar primero en una ventana mucho más amplia (3000 líneas sin filtrar) hasta las últimas 50 líneas que sí encajen y mostrarlas al instante, y a partir de ahí seguir en vivo — la consola ahora muestra actividad reciente nada más abrirse, en vez de parecer rota. ### 2026.07.21.3 - Fixed: `scripts/ups.sh` (backing the `unraid.ups` item) called `apcaccess`, which only returns data if the APCUPSD daemon is managing the UPS. Users running the (also Unraid-native) NUT stack instead — the more common setup for non-APC UPS units — got a permanently empty `{"connected":true}` with no real fields, and consequently no working triggers, no matter what was configured in Zabbix. Rewritten to query NUT directly via `upsc ups@127.0.0.1` (the same instance name/address the bundled `nut-dw` Unraid plugin uses by default), keeping the same JSON field names for compatibility (`status`, `loadpct`, `bcharge`, `timeleft`, `battv`, `linev`), plus `connected:false` if NUT itself isn't reachable. - Added actual `zabbix_template.xml` items/triggers for the UPS data (previously the UserParameter existed but nothing in the template consumed it): dependent items for status, battery charge, load, battery voltage and input voltage, plus triggers for "on battery" (OB), "low battery" (LB), "battery needs replacement" (RB), and loss of communication with NUT. - Arreglado: `scripts/ups.sh` (detrás del item `unraid.ups`) llamaba a `apcaccess`, que solo devuelve datos si el demonio APCUPSD es quien gestiona la UPS. Quien use en su lugar la pila NUT (también nativa de Unraid, y más habitual para UPS no-APC) obtenía siempre `{"connected":true}` vacío, sin ningún campo real, y por tanto sin triggers posibles configurara lo que configurase en Zabbix. Reescrito para consultar NUT directamente vía `upsc ups@127.0.0.1` (el mismo nombre/dirección de instancia que usa por defecto el plugin `nut-dw` de Unraid), manteniendo los mismos nombres de campo JSON por compatibilidad (`status`, `loadpct`, `bcharge`, `timeleft`, `battv`, `linev`), más `connected:false` si NUT no responde. - Añadidos items/triggers reales en `zabbix_template.xml` para los datos de la UPS (antes existía el UserParameter pero nada en la plantilla lo consumía): items dependientes para estado, carga de batería, carga de trabajo, voltaje de batería y voltaje de entrada, más triggers de "funcionando con batería" (OB), "batería baja" (LB), "batería necesita reemplazo" (RB), y pérdida de comunicación con NUT. ### 2026.07.21.2 - Fixed: the "View live logs" links (both the zero-setup syslog one and the dedicated-file one) were invisible, because they were placed inside inline-help blockquote elements — Unraid hides those by default (display:none, only shown via the page's Help toggle). Moved both links into regular, always-visible rows; only the descriptive help text stays in the hidden blockquote. - Arreglado: los enlaces "Ver logs en vivo" (tanto el de syslog sin configurar nada como el del fichero propio) eran invisibles, porque estaban dentro de bloques de ayuda (blockquote) — Unraid los oculta por defecto (display:none, solo se ven activando la ayuda de la página). Se movieron ambos enlaces a filas normales, siempre visibles; solo el texto explicativo se queda en el bloque oculto. ### 2026.07.21.1 - Settings page: light visual polish — each section is now grouped in a bordered box, and a status summary (Server, ServerActive, TLS, passive checks) sits at the top so you can see the effective config at a glance. Still uses only native Unraid webGUI look and feel, no external styling. - Plugin author is now just "Nebur692" in the Plugins tab (dropped the "fork of fabianonline" suffix from that field — the credit is still clearly given in the README and changelog). - Página de Settings: pequeño pulido visual — cada sección ahora va en una caja con borde, y arriba hay un resumen del estado efectivo (Server, ServerActive, TLS, passive checks) para verlo de un vistazo. Sigue usando solo el estilo nativo del webGUI de Unraid, sin nada externo. - El autor del plugin ahora es solo "Nebur692" en la pestaña Plugins (se quitó el sufijo "fork of fabianonline" de ese campo — el crédito sigue claro en el README y el changelog). ### 2026.07.20.6 - The plugin now links directly to its Settings page from the Plugins tab (added `launch=`). - Added a live syslog log viewer that works immediately, with no setup: a "View live logs (from syslog, no setup needed)" link on the Settings page follows the agent's existing syslog output in real time. This is in addition to the dedicated-file viewer from 2026.07.20.5, which is still there for anyone who wants Zabbix's logs isolated from the rest of syslog. - El plugin ahora enlaza directamente a su página de Settings desde la pestaña Plugins (añadido `launch=`). - Añadido un visor de logs de syslog en vivo que funciona sin configurar nada: un enlace "Ver logs en vivo (desde syslog, sin configurar nada)" en la página de Settings sigue en tiempo real lo que el agente ya manda a syslog. Esto se suma al visor de fichero propio de 2026.07.20.5, que sigue disponible para quien quiera los logs de Zabbix aislados del resto del syslog. ### 2026.07.20.5 - Added a live log viewer to the Settings page: a new "Log to a dedicated file" checkbox (off by default, so saving other fields doesn't change where logs go) sets LogType=file/LogFile, and once enabled and applied, a "View live logs" link opens Unraid's native live terminal (the same mechanism used by Docker, VMs and NUT) tailing the agent's log in real time. - Añadido un visor de logs en vivo a la página de Settings: una nueva casilla "Log a un fichero propio" (desactivada por defecto, para que guardar otros campos no cambie dónde van los logs) pone LogType=file/LogFile, y una vez activada y aplicada, un enlace "Ver logs en vivo" abre el terminal en vivo nativo de Unraid (el mismo mecanismo que usan Docker, VMs y NUT) siguiendo el log del agente en tiempo real. ### 2026.07.20.4 - The Settings page now shows a single language instead of both stacked: it reads Unraid's webGUI language (dynamix.cfg's locale=) and displays Spanish for any es_* locale, English otherwise. - La página de Settings ahora muestra un solo idioma en vez de los dos apilados: lee el idioma del webGUI de Unraid (locale= de dynamix.cfg) y muestra español para cualquier locale es_*, inglés en el resto de casos. ### 2026.07.20.3 - Added a webGUI Settings page (Utilities > Zabbix Agent): Server (allowed hosts for passive checks), ServerActive, Hostname, Timeout, an option to disable passive checks entirely (StartAgents=0), and TLS PSK enable/identity (requires a pre-shared key file already present, not generated by this plugin). IMPORTANT: once you save this form once, zabbix_agentd.custom.conf becomes generated from the Settings page — manual edits to that file will be overwritten on the next Apply. - Añadida una página de Settings en el webGUI (Utilities > Zabbix Agent): Server (hosts permitidos para passive checks), ServerActive, Hostname, Timeout, una opción para desactivar del todo los passive checks (StartAgents=0), y activar TLS PSK con identidad (requiere que ya exista un fichero de clave precompartida, este plugin no lo genera). IMPORTANTE: en cuanto guardes este formulario una vez, zabbix_agentd.custom.conf pasa a generarse desde la página de Settings — las ediciones manuales de ese fichero se sobrescribirán en el siguiente Aplicar. ### 2026.07.20.2 - Documentation is now bilingual (English/Spanish): README files (repo root and plugin) and this changelog entry are provided in both languages. No functional changes. - La documentación ahora es bilingüe (inglés/español): los README (raíz del repo y del plugin) y esta entrada del changelog están en ambos idiomas. Sin cambios funcionales. ### 2026.07.20.1 - Updated bundled zabbix_agentd from 5.2.1 (Nov 2020) to 6.0.47 LTS, using the official static Linux amd64 build from Zabbix. - Fixed unraid.temperatures (temperatures.sh): it only ever matched literal "CPU Temp:" / "MB Temp:" sensor labels, so on boards using the coretemp driver (Intel, labeled "Package id N:") or k10temp (AMD, "Tctl:"/"Tdie:") it always reported null for CPU temperature. Now takes the highest reading across all matched CPU sensor labels (supports multi-socket boards), with the original "CPU Temp:" kept as a fallback. Mainboard temperature still reports null when no matching sensor label is found on the board. - Also updated zabbix_template.xml to the Zabbix 6.0 export schema (uuids, tags instead of applications, host-qualified trigger expressions) — see release v1.0.1. - Actualizado el zabbix_agentd empaquetado de 5.2.1 (nov-2020) a 6.0.47 LTS, usando la build oficial estática de Linux amd64 de Zabbix. - Arreglado unraid.temperatures (temperatures.sh): solo reconocía las etiquetas literales "CPU Temp:" / "MB Temp:", así que en placas con el driver coretemp (Intel, etiquetado "Package id N:") o k10temp (AMD, "Tctl:"/"Tdie:") siempre devolvía null para la temperatura de CPU. Ahora toma la lectura más alta entre todas las etiquetas de CPU reconocidas (soporta placas multi-socket), manteniendo la "CPU Temp:" original como último recurso. La temperatura de placa base sigue devolviendo null cuando no hay ninguna etiqueta de sensor coincidente en la placa. - También se actualizó zabbix_template.xml al esquema de exportación de Zabbix 6.0 (uuids, tags en vez de applications, expresiones de trigger con host explícito) — ver release v1.0.1. ### 2024.12.19.1 - Sometimes, diskload.ini is not available (at least in Unraid 6.12.6). In that case we now skip omitting disk load data in order to still omit valid JSON. ### 2020.11.25.1 - You can now add a custom zabbix agent configuration file at /boot/config/plugins/zabbix_agent/zabbix_agentd.custom.conf. It won't be overwritten by a future update of this plugin. Please note that the list of usable keys is heavily restricted in zabbix_agentd.conf. To have your custom UserParameters accessible, you can either: - Name them custom.$whatever. - Add the key to the whitelist via AllowKey. - Updated zabbix_agentd from 5.0.3 to 5.2.1. ### 2020.10.31.1 - Updated zabbix_agentd from 5.0.2 to 5.0.3 - Download updated plugins from stable instead of main. - Fixed removal of old plugin packages during updates. - Added new zabbix endpoint unraid.ups ### 2020.09.05.1 - Added a new field 'running' to qemu.disk ### 2020.08.11 - Added system temperature metrics. Note: These will only work if you have the Dynamix System Temperature plugin installed. - Fixed the virtual interface detection in unraid.qemu. ### 2020.07.16 - Package based installation process. - Added a zabbix template file. ### 2020.07.15 - More metrics ### 2020.07.14 - Initial commit echo "Installation of zabbix_agent plugin started." if [ -e /boot/config/plugins/zabbix_agent/&packageName; ]; then echo "Package already exists." else echo "Current &packageName; not found; removing old packages (if existing)." rm /boot/config/plugins/zabbix_agent/*.txz echo "Downloading current package..." fi &packageURL; &packageMD5; if [ -x /etc/rc.d/rc.zabbix_agentd ]; then echo "Stopping old zabbix agent..." /etc/rc.d/rc.zabbix_agentd stop fi echo "Extracting support files..." upgradepkg --install-new /boot/config/plugins/zabbix_agent/&packageName; echo "Starting zabbix_agent..." /etc/rc.d/rc.zabbix_agentd start echo "Removal of zabbix_agent plugin started." echo "Stopping zabbix_agentd..." /etc/rc.d/rc.zabbix_agentd stop echo "Uninstalling package..." removepkg zabbix_agent echo "Removing remaining plugin files..." rm -rf /boot/config/plugins/zabbix_agent echo "Removal of zabbix_agent plugin completed."