From 1256ea7de8a093f51b116f2802871480cd646ae8 Mon Sep 17 00:00:00 2001 From: genofire Date: Fri, 26 Jun 2020 08:25:10 +0200 Subject: add new metrics to prometheus --- prometheus.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/prometheus.py b/prometheus.py index da0d24c..9af4de3 100755 --- a/prometheus.py +++ b/prometheus.py @@ -57,6 +57,10 @@ class Prometheus: Gauge('ejabberd_node_s2s_in', 'count of incoming server-to-server connection', registry=registry).set(self._metrics.get_s2s_in()) Gauge('ejabberd_node_s2s_out', 'count of outgoing server-to-server connection', registry=registry).set(self._metrics.get_s2s_out()) + nodename = self._metrics.nodename + Gauge('ejabberd_node_uptime', 'uptime of ejabberd service', ["node"], registry=registry).labels(nodename).set(self._metrics.get_uptime()) + Gauge('ejabberd_node_proccess', 'count of pejabber proccess', ["node"], registry=registry).labels(nodename).set(self._metrics.get_processes()) + labelnames_vhost = ["vhost"] registered_vhosts = Gauge('ejabberd_registered_vhosts', 'count of user per vhost', labelnames_vhost, registry=registry) -- cgit v1.2.3-54-g00ecf