Asterisk - The Open Source Telephony Project
18.5.0
|
Go to the source code of this file.
Functions | |
int | bridge_metrics_init (void) |
Initialize bridge metrics. More... | |
int | channel_metrics_init (void) |
Initialize channel metrics. More... | |
int | cli_init (void) |
Initialize CLI command. More... | |
int | endpoint_metrics_init (void) |
Initialize endpoint metrics. More... | |
int | pjsip_outbound_registration_metrics_init (void) |
Initialize PJSIP outbound registration metrics. More... | |
int64_t | prometheus_last_scrape_duration_get (void) |
Retrieve the amount of time it took to perform the last scrape. More... | |
struct timeval | prometheus_last_scrape_time_get (void) |
Retrieve the timestamp when the last scrape occurred. More... | |
struct ast_str * | prometheus_scrape_to_string (void) |
Get the raw output of what a scrape would produce. More... | |
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().
int channel_metrics_init | ( | void | ) |
Initialize channel metrics.
0 | success |
-1 | error |
Definition at line 241 of file channels.c.
References prometheus_callback_register(), and prometheus_metrics_provider_register().
Referenced by load_module().
int cli_init | ( | void | ) |
Initialize CLI command.
0 | success |
-1 | error |
Definition at line 137 of file res/prometheus/cli.c.
References ARRAY_LEN, ast_cli_register_multiple, and prometheus_metrics_provider_register().
Referenced by load_module().
int endpoint_metrics_init | ( | void | ) |
Initialize endpoint metrics.
0 | success |
-1 | error |
Definition at line 198 of file res/prometheus/endpoints.c.
References prometheus_callback_register(), and prometheus_metrics_provider_register().
Referenced by load_module().
int pjsip_outbound_registration_metrics_init | ( | void | ) |
Initialize PJSIP outbound registration metrics.
0 | success |
-1 | error |
Definition at line 342 of file pjsip_outbound_registrations.c.
References ao2_cleanup, ast_sip_get_sorcery(), ast_sorcery_instance_observer_add(), ast_sorcery_instance_observer_remove(), ast_sorcery_observer_add(), ast_sorcery_observer_remove(), ast_system_registry_type(), ast_system_topic(), cleanup(), NULL, prometheus_metrics_provider_register(), registry_message_cb(), stasis_message_router_add(), and stasis_message_router_create.
Referenced by load_module().
int64_t prometheus_last_scrape_duration_get | ( | void | ) |
Retrieve the amount of time it took to perform the last scrape.
Time returned is in milliseconds
The | scrape duration, in milliseconds |
Definition at line 701 of file res_prometheus.c.
References prometheus_metric::value.
Referenced by prometheus_show_status().
struct timeval prometheus_last_scrape_time_get | ( | void | ) |
Retrieve the timestamp when the last scrape occurred.
The | time when the last scrape occurred |
Definition at line 712 of file res_prometheus.c.
References lock, SCOPED_MUTEX, and scrape_lock.
Referenced by prometheus_show_status().
struct ast_str* prometheus_scrape_to_string | ( | void | ) |
Get the raw output of what a scrape would produce.
It can be useful to dump what a scrape will look like. This function returns the raw string representation of the metrics.
NULL | on error |
Malloc'd | ast_str on success |
Definition at line 685 of file res_prometheus.c.
References ast_mutex_lock, ast_mutex_unlock, ast_str_create, NULL, scrape_lock, and scrape_metrics().
Referenced by prometheus_show_metrics().