aboutsummaryrefslogtreecommitdiffstats
path: root/control.py
diff options
context:
space:
mode:
authornico <nico@magicbroccoli.de>2020-06-17 00:41:59 +0200
committernico <nico@magicbroccoli.de>2020-06-17 00:41:59 +0200
commit990d3abdc60bea8a525d4fbdc56cdff2e44947ce (patch)
tree2a1b921134fdcc19df981a9b2e1a7804a262125b /control.py
parentc7bf9f6b9f186b1eb24bd3d3665f04fafeb68246 (diff)
add more global values
+ add global uptime value + add global processes count value
Diffstat (limited to 'control.py')
-rw-r--r--control.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/control.py b/control.py
index f865444..ecf3994 100644
--- a/control.py
+++ b/control.py
@@ -73,6 +73,16 @@ class EjabberdCtl(EjabberdApi):
return result
return result["s2s_outgoing"]
+ def fetch_uptime(self):
+ result = self.cmd("stats", {"name": "uptimeseconds"})
+ if "stat" in result:
+ return result["stat"]
+
+ def fetch_processes(self):
+ result = self.cmd("stats", {"name": "processes"})
+ if "stat" in result:
+ return result["stat"]
+
def fetch_registered_count(self, vhost=None):
if vhost is None:
result = self.cmd("stats", {"name":"registeredusers"})