From 53b83f2d0e4351b2c4b67504f0219f8aa6db1e13 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Tue, 29 Sep 2020 15:24:46 +0200 Subject: [PATCH] Use MAC of device if no name is defined in Unifi device discovery --- zabbix_scripts/disco_unifi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zabbix_scripts/disco_unifi b/zabbix_scripts/disco_unifi index 3471df6..e84a66c 100755 --- a/zabbix_scripts/disco_unifi +++ b/zabbix_scripts/disco_unifi @@ -80,7 +80,7 @@ if ($what eq 'devices'){ '{#UNIFI_DEV_ID}' => $entry->{device_id}, '{#UNIFI_DEV_ADOPTED}' => $entry->{adopted}, '{#UNIFI_DEV_MODEL}' => $entry->{model}, - '{#UNIFI_DEV_NAME}' => $entry->{name}, + '{#UNIFI_DEV_NAME}' => $entry->{name} || $entry->{mac}, '{#UNIFI_DEV_MAC}' => $entry->{mac}, '{#UNIFI_DEV_TYPE}' => $entry->{type} };