Asterisk - The Open Source Telephony Project GIT-master-f36a736
|
Prometheus Bridge Metrics. More...
#include "asterisk.h"
#include "asterisk/stasis_bridges.h"
#include "asterisk/res_prometheus.h"
#include "prometheus_internal.h"
Go to the source code of this file.
Data Structures | |
struct | bridge_metric_defs |
Macros | |
#define | BRIDGES_CHANNELS_COUNT_HELP "Number of channels in the bridge." |
Functions | |
int | bridge_metrics_init (void) |
Initialize bridge metrics. More... | |
static void | bridge_metrics_unload_cb (void) |
static void | bridges_scrape_cb (struct ast_str **response) |
static void | get_bridge_channel_count (struct prometheus_metric *metric, struct ast_bridge_snapshot *snapshot) |
Variables | |
struct bridge_metric_defs | bridge_metric_defs [] |
struct prometheus_callback | bridges_callback |
static struct prometheus_metrics_provider | provider |
Prometheus Bridge Metrics.
Definition in file bridges.c.
int bridge_metrics_init | ( | void | ) |
Initialize bridge metrics.
0 | success |
-1 | error |
Definition at line 206 of file bridges.c.
References bridges_callback, prometheus_callback_register(), prometheus_metrics_provider_register(), and provider.
Referenced by load_module().
|
static |
Definition at line 192 of file bridges.c.
References bridges_callback, and prometheus_callback_unregister().
|
static |
Definition at line 78 of file bridges.c.
References ao2_container_clone, ao2_container_count(), ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, ao2_ref, ARRAY_LEN, AST_BRIDGE_FLAG_INVISIBLE, ast_bridge_get_snapshot(), ast_bridges(), ast_calloc, ast_copy_string(), ast_eid_default, ast_eid_to_str(), ast_free, AST_LIST_INSERT_TAIL, ast_test_flag, bridges, ast_bridge_snapshot::creator, ast_bridge::feature_flags, bridge_metric_defs::get_value, bridge_metric_defs::help, metrics, name, ast_bridge_snapshot::name, NULL, PROMETHEUS_METRIC_GAUGE, PROMETHEUS_METRIC_SET_LABEL, PROMETHEUS_METRIC_STATIC_INITIALIZATION, prometheus_metric_to_string(), ast_bridge_snapshot::subclass, ast_bridge_snapshot::technology, ast_bridge_snapshot::uniqueid, and prometheus_metric::value.
|
static |
Definition at line 42 of file bridges.c.
References ast_bridge_snapshot::num_channels, and prometheus_metric::value.
struct bridge_metric_defs bridge_metric_defs[] |
struct prometheus_callback bridges_callback |
Definition at line 183 of file bridges.c.
Referenced by bridge_metrics_init(), and bridge_metrics_unload_cb().
|
static |
Definition at line 201 of file bridges.c.
Referenced by _ast_device_state(), action_presencestate(), ast_phoneprov_add_extension(), ast_phoneprov_provider_register(), ast_presence_state_helper(), ast_presence_state_prov_add(), ast_presence_state_prov_del(), ast_sip_api_provider_register(), bridge_metrics_init(), do_presence_state_change(), getproviderstate(), presence_read(), presence_state_alloc(), presence_state_event(), prometheus_metrics_provider_register(), provider_destructor(), reload(), reload_module(), and unload_module().