Asterisk - The Open Source Telephony Project
18.5.0
|
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 183 of file bridges.c.
References prometheus_callback_register(), and prometheus_metrics_provider_register().
Referenced by load_module().
|
static |
Definition at line 169 of file bridges.c.
References 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_get_snapshot(), ast_bridges(), ast_calloc, ast_copy_string(), ast_eid_default, ast_eid_to_str(), ast_free, AST_LIST_INSERT_TAIL, bridges, ast_bridge_snapshot::creator, bridge_metric_defs::get_value, bridge_metric_defs::help, prometheus_metric::help, bridge_metric_defs::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, prometheus_metric::type, 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 |
|
static |
Definition at line 178 of file bridges.c.
Referenced by _ast_device_state(), action_presencestate(), ast_phoneprov_provider_register(), ast_presence_state_helper(), ast_presence_state_prov_add(), ast_presence_state_prov_del(), ast_sip_api_provider_register(), AST_TEST_DEFINE(), handle_cli_osp_show(), osp_auth(), osp_create_provider(), osp_create_transaction(), osp_lookup(), osp_next(), osp_unload(), ospauth_exec(), osplookup_exec(), ospnext_exec(), presence_read(), reload_module(), and unload_module().