mirror of
https://github.com/bashclub/check-unifi-controller.git
synced 2025-02-05 10:58:36 +01:00
removes uptime metric
special agent returns <<<uptime>>> section
This commit is contained in:
parent
e0c0e88bbd
commit
5af8b06f42
@ -270,7 +270,6 @@ register.inventory_plugin(
|
|||||||
def discovery_unifi_device(section):
|
def discovery_unifi_device(section):
|
||||||
yield Service(item="Device Status")
|
yield Service(item="Device Status")
|
||||||
yield Service(item="Unifi Device")
|
yield Service(item="Unifi Device")
|
||||||
yield Service(item="Uptime")
|
|
||||||
yield Service(item="Active-User")
|
yield Service(item="Active-User")
|
||||||
if section.type != "uap": # kein satisfaction bei ap .. radio/ssid haben schon
|
if section.type != "uap": # kein satisfaction bei ap .. radio/ssid haben schon
|
||||||
yield Service(item="Satisfaction")
|
yield Service(item="Satisfaction")
|
||||||
@ -316,14 +315,6 @@ def check_unifi_device(item,section):
|
|||||||
)
|
)
|
||||||
yield Metric("user_sta",_active_user)
|
yield Metric("user_sta",_active_user)
|
||||||
yield Metric("guest_sta",_safe_int(section.guest_num_sta))
|
yield Metric("guest_sta",_safe_int(section.guest_num_sta))
|
||||||
if item == "Uptime":
|
|
||||||
_uptime = int(section.uptime) if section.uptime else -1
|
|
||||||
if _uptime > 0:
|
|
||||||
yield Result(
|
|
||||||
state=State.OK,
|
|
||||||
summary=render.timespan(_uptime)
|
|
||||||
)
|
|
||||||
yield Metric("uptime",_uptime)
|
|
||||||
if item == "Satisfaction":
|
if item == "Satisfaction":
|
||||||
yield Result(
|
yield Result(
|
||||||
state=State.OK,
|
state=State.OK,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user