Skip to content

Commit

Permalink
adds uptime section for controller
Browse files Browse the repository at this point in the history
  • Loading branch information
gurubert committed Feb 16, 2024
1 parent f96bd89 commit 8718bf4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion agents/special/agent_unifi_controller
Original file line number Diff line number Diff line change
Expand Up @@ -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}")

Expand All @@ -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}\"}}")

Expand Down
Binary file removed unifi_controller-0.88.1.mkp
Binary file not shown.
Binary file added unifi_controller-0.88.2.mkp
Binary file not shown.

0 comments on commit 8718bf4

Please sign in to comment.