Asterisk - The Open Source Telephony Project
18.5.0
|
Prometheus CLI Commands. More...
#include "asterisk.h"
#include "asterisk/cli.h"
#include "asterisk/localtime.h"
#include "asterisk/res_prometheus.h"
#include "prometheus_internal.h"
Go to the source code of this file.
Functions | |
int | cli_init (void) |
Initialize CLI command. More... | |
static void | cli_unload_cb (void) |
static char * | prometheus_show_metrics (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | prometheus_show_status (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
Variables | |
static struct ast_cli_entry | cli_prometheus [] |
static struct prometheus_metrics_provider | provider |
Prometheus CLI Commands.
Definition in file res/prometheus/cli.c.
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().
|
static |
Definition at line 123 of file res/prometheus/cli.c.
References ARRAY_LEN, and ast_cli_unregister_multiple().
|
static |
Definition at line 33 of file res/prometheus/cli.c.
References ast_cli_args::argc, ast_cli(), ast_free, ast_str_buffer(), CLI_FAILURE, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, ast_cli_args::fd, NULL, prometheus_scrape_to_string(), and ast_cli_entry::usage.
|
static |
Definition at line 63 of file res/prometheus/cli.c.
References ao2_ref, ast_cli_args::argc, ast_cli(), ast_localtime(), ast_strftime(), ast_strlen_zero, prometheus_general_config::auth_username, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, config, prometheus_general_config::enabled, ast_cli_args::fd, NULL, prometheus_general_config_get(), prometheus_last_scrape_duration_get(), prometheus_last_scrape_time_get(), prometheus_general_config::uri, and ast_cli_entry::usage.
|
static |
Definition at line 114 of file res/prometheus/cli.c.
|
static |
Definition at line 132 of file res/prometheus/cli.c.