File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
lib/check_mk/base/plugins/agent_based Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -270,6 +270,7 @@ def inventory_unifi_device_shortlist(section):
270
270
def discovery_unifi_device (section ):
271
271
yield Service (item = "Device Status" )
272
272
yield Service (item = "Unifi Device" )
273
+ yield Service (item = "Unifi Device Uptime" )
273
274
yield Service (item = "Active-User" )
274
275
if section .type != "uap" : # kein satisfaction bei ap .. radio/ssid haben schon
275
276
yield Service (item = "Satisfaction" )
@@ -315,7 +316,14 @@ def check_unifi_device(item,section):
315
316
)
316
317
yield Metric ("user_sta" ,_active_user )
317
318
yield Metric ("guest_sta" ,_safe_int (section .guest_num_sta ))
318
-
319
+ if item == "Unifi Device Uptime" :
320
+ _uptime = int (section .uptime ) if section .uptime else - 1
321
+ if _uptime > 0 :
322
+ yield Result (
323
+ state = State .OK ,
324
+ summary = render .timespan (_uptime )
325
+ )
326
+ yield Metric ("unifi_uptime" ,_uptime )
319
327
if item == "Satisfaction" :
320
328
yield Result (
321
329
state = State .OK ,
You can’t perform that action at this time.
0 commit comments