|
Asterisk - The Open Source Telephony Project GIT-master-9647a4f
|
Prometheus Endpoint Metrics. More...
#include "asterisk.h"#include "asterisk/stasis_endpoints.h"#include "asterisk/res_prometheus.h"#include "prometheus_internal.h"
Go to the source code of this file.
Data Structures | |
| struct | endpoint_metric_defs |
Macros | |
| #define | ENDPOINTS_CHANNELS_COUNT_HELP "Count of the number of channels currently existing that are associated with the endpoint." |
| #define | ENDPOINTS_STATE_HELP "Individual endpoint states. 0=unknown; 1=offline; 2=online." |
Functions | |
| int | endpoint_metrics_init (void) |
| Initialize endpoint metrics. | |
| static void | endpoint_metrics_unload_cb (void) |
| static void | endpoints_scrape_cb (struct ast_str **response) |
| static void | get_endpoint_channel_count (struct prometheus_metric *metric, struct ast_endpoint_snapshot *snapshot) |
| static void | get_endpoint_state (struct prometheus_metric *metric, struct ast_endpoint_snapshot *snapshot) |
Variables | |
| struct endpoint_metric_defs | endpoint_metric_defs [] |
| struct prometheus_callback | endpoints_callback |
| static struct prometheus_metrics_provider | provider |
Prometheus Endpoint Metrics.
Definition in file res/prometheus/endpoints.c.
| #define ENDPOINTS_CHANNELS_COUNT_HELP "Count of the number of channels currently existing that are associated with the endpoint." |
Definition at line 35 of file res/prometheus/endpoints.c.
| #define ENDPOINTS_STATE_HELP "Individual endpoint states. 0=unknown; 1=offline; 2=online." |
Definition at line 33 of file res/prometheus/endpoints.c.
| int endpoint_metrics_init | ( | void | ) |
Initialize endpoint metrics.
| 0 | success |
| -1 | error |
Definition at line 198 of file res/prometheus/endpoints.c.
References endpoints_callback, prometheus_callback_register(), prometheus_metrics_provider_register(), and provider.
Referenced by load_module().
|
static |
Definition at line 184 of file res/prometheus/endpoints.c.
References endpoints_callback, and prometheus_callback_unregister().
|
static |
Definition at line 97 of file res/prometheus/endpoints.c.
References ao2_container_clone, ao2_container_count(), ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, ao2_ref, ARRAY_LEN, ast_calloc, ast_copy_string(), ast_eid_default, ast_eid_to_str(), ast_endpoint_cache(), ast_endpoint_snapshot_type(), ast_free, AST_LIST_INSERT_TAIL, endpoints, endpoint_metric_defs::get_value, prometheus_metric::help, endpoint_metric_defs::help, ast_endpoint_snapshot::id, name, NULL, PROMETHEUS_METRIC_GAUGE, PROMETHEUS_METRIC_SET_LABEL, PROMETHEUS_METRIC_STATIC_INITIALIZATION, prometheus_metric_to_string(), ast_endpoint_snapshot::resource, stasis_cache_dump(), stasis_message_data(), ast_endpoint_snapshot::tech, prometheus_metric::type, and prometheus_metric::value.
|
static |
Definition at line 56 of file res/prometheus/endpoints.c.
References ast_endpoint_snapshot::num_channels, and prometheus_metric::value.
|
static |
Definition at line 44 of file res/prometheus/endpoints.c.
References ast_endpoint_snapshot::state, and prometheus_metric::value.
| struct endpoint_metric_defs endpoint_metric_defs[] |
| struct prometheus_callback endpoints_callback |
Definition at line 175 of file res/prometheus/endpoints.c.
Referenced by endpoint_metrics_init(), and endpoint_metrics_unload_cb().
|
static |
Definition at line 193 of file res/prometheus/endpoints.c.
Referenced by endpoint_metrics_init().