From 519ee436073d6e2b7d7f3661a917d1584c13d08d Mon Sep 17 00:00:00 2001 From: Christian W Date: Thu, 27 Jan 2022 00:25:31 +0100 Subject: [PATCH] Update unifi_controller.py Changed Uptime to Unifi Device Uptime because it collides with the service Uptime if you use SNMP monitoring additionally on unifi devices. --- lib/check_mk/base/plugins/agent_based/unifi_controller.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/check_mk/base/plugins/agent_based/unifi_controller.py b/lib/check_mk/base/plugins/agent_based/unifi_controller.py index 1d4af11..7dea6d1 100644 --- a/lib/check_mk/base/plugins/agent_based/unifi_controller.py +++ b/lib/check_mk/base/plugins/agent_based/unifi_controller.py @@ -271,7 +271,7 @@ register.inventory_plugin( def discovery_unifi_device(section): yield Service(item="Device Status") yield Service(item="Unifi Device") - yield Service(item="Uptime") + yield Service(item="Unifi Device Uptime") yield Service(item="Active-User") if section.type != "uap": # kein satisfaction bei ap .. radio/ssid haben schon yield Service(item="Satisfaction") @@ -317,7 +317,7 @@ def check_unifi_device(item,section): ) yield Metric("user_sta",_active_user) yield Metric("guest_sta",_safe_int(section.guest_num_sta)) - if item == "Uptime": + if item == "Unifi Device Uptime": _uptime = int(section.uptime) if section.uptime else -1 if _uptime > 0: yield Result(