From bf05b826a110609d6317184cbdbc519b55b51c85 Mon Sep 17 00:00:00 2001 From: nico Date: Wed, 17 Jun 2020 00:41:59 +0200 Subject: add more global values * organize global values + add global uptime value + add global processes count value --- calls.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'calls.py') diff --git a/calls.py b/calls.py index bd6bd0a..83b3fe3 100644 --- a/calls.py +++ b/calls.py @@ -75,6 +75,16 @@ class EjabberdApiCalls(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"}) -- cgit v1.2.3-18-g5258