mirror of
https://github.com/bashclub/check-unifi-controller.git
synced 2025-01-12 19:50:12 +01:00
adds uptime section for controller
This commit is contained in:
parent
f96bd89f55
commit
8718bf4183
@ -492,7 +492,7 @@ class unifi_controller(unifi_object):
|
||||
def __str__(self):
|
||||
_ret = ["<<<unifi_controller:sep(124)>>>"]
|
||||
for _k,_v in self.__dict__.items():
|
||||
if _k.startswith("_") or type(_v) not in (str,int,float):
|
||||
if _k == "uptime" or _k.startswith("_") or type(_v) not in (str,int,float):
|
||||
continue
|
||||
_ret.append(f"{_k}|{_v}")
|
||||
|
||||
@ -503,6 +503,10 @@ class unifi_controller(unifi_object):
|
||||
_udm._piggy_back = False
|
||||
_ret.append(str(_udm))
|
||||
|
||||
if "uptime" in self.__dict__:
|
||||
_ret.append("<<<uptime>>>")
|
||||
_ret.append(f"{self.uptime}")
|
||||
|
||||
_ret.append("<<<labels:sep(0)>>>")
|
||||
_ret.append(f"{{\"unifi_device\":\"unifi-{self.type}\"}}")
|
||||
|
||||
|
Binary file not shown.
BIN
unifi_controller-0.88.2.mkp
Normal file
BIN
unifi_controller-0.88.2.mkp
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user