res_prometheus: Add Asterisk bridge metrics

This patch adds basic Asterisk bridge statistics to the res_prometheus
module. This includes:

* asterisk_bridges_count: The current number of bridges active on the
  system.

* asterisk_bridges_channels_count: The number of channels active in a
  bridge.

In all cases, enough information is provided with each bridge metric
to determine a unique instance of Asterisk that provided the data, along
with the technology, subclass, and creator of the bridge.

ASTERISK-28403

Change-Id: Ie27417dd72c5bc7624eb2a7a6a8829d7551788dc
This commit is contained in:
Matt Jordan
2019-05-09 09:41:49 -05:00
parent ed6cd13b5b
commit 066280f0cc
4 changed files with 197 additions and 3 deletions

View File

@@ -917,7 +917,9 @@ static int load_module(void)
goto cleanup;
}
if (channel_metrics_init() || endpoint_metrics_init()) {
if (channel_metrics_init()
|| endpoint_metrics_init()
|| bridge_metrics_init()) {
goto cleanup;
}