libosmovty
0.9.6.315-40e62
Osmocom VTY library
|
VTY interface for statsd / statistic items. More...
Functions | |
static struct osmo_stats_reporter * | osmo_stats_vty2srep (struct vty *vty) |
static int | set_srep_parameter_str (struct vty *vty, int(*fun)(struct osmo_stats_reporter *, const char *), const char *val, const char *param_name) |
static int | set_srep_parameter_int (struct vty *vty, int(*fun)(struct osmo_stats_reporter *, int), const char *val, const char *param_name) |
DEFUN (cfg_stats_reporter_local_ip, cfg_stats_reporter_local_ip_cmd,"local-ip ADDR","Set the IP address to which we bind locally\n""IP Address\n") | |
DEFUN (cfg_no_stats_reporter_local_ip, cfg_no_stats_reporter_local_ip_cmd,"no local-ip", NO_STR"Set the IP address to which we bind locally\n") | |
DEFUN (cfg_stats_reporter_remote_ip, cfg_stats_reporter_remote_ip_cmd,"remote-ip ADDR","Set the remote IP address to which we connect\n""IP Address\n") | |
DEFUN (cfg_stats_reporter_remote_port, cfg_stats_reporter_remote_port_cmd,"remote-port <1-65535>","Set the remote port to which we connect\n""Remote port number\n") | |
DEFUN (cfg_stats_reporter_mtu, cfg_stats_reporter_mtu_cmd,"mtu <100-65535>","Set the maximum packet size\n""Size in byte\n") | |
DEFUN (cfg_no_stats_reporter_mtu, cfg_no_stats_reporter_mtu_cmd,"no mtu", NO_STR"Set the maximum packet size\n") | |
DEFUN (cfg_stats_reporter_prefix, cfg_stats_reporter_prefix_cmd,"prefix PREFIX","Set the item name prefix\n""The prefix string\n") | |
DEFUN (cfg_no_stats_reporter_prefix, cfg_no_stats_reporter_prefix_cmd,"no prefix", NO_STR"Set the item name prefix\n") | |
DEFUN (cfg_stats_reporter_level, cfg_stats_reporter_level_cmd,"level (global|peer|subscriber)","Set the maximum group level\n""Report global groups only\n""Report global and network peer related groups\n""Report global, peer, and subscriber groups\n") | |
DEFUN (cfg_stats_reporter_enable, cfg_stats_reporter_enable_cmd,"enable","Enable the reporter\n") | |
DEFUN (cfg_stats_reporter_disable, cfg_stats_reporter_disable_cmd,"disable","Disable the reporter\n") | |
DEFUN (cfg_stats_reporter_statsd, cfg_stats_reporter_statsd_cmd,"stats reporter statsd", CFG_STATS_STR CFG_REPORTER_STR"Report to a STATSD server\n") | |
DEFUN (cfg_stats_interval, cfg_stats_interval_cmd,"stats interval <1-65535>", CFG_STATS_STR"Set the reporting interval\n""Interval in seconds\n") | |
DEFUN (cfg_no_stats_reporter_statsd, cfg_no_stats_reporter_statsd_cmd,"no stats reporter statsd", NO_STR CFG_STATS_STR CFG_REPORTER_STR"Report to a STATSD server\n") | |
DEFUN (cfg_stats_reporter_log, cfg_stats_reporter_log_cmd,"stats reporter log", CFG_STATS_STR CFG_REPORTER_STR"Report to the logger\n") | |
DEFUN (cfg_no_stats_reporter_log, cfg_no_stats_reporter_log_cmd,"no stats reporter log", NO_STR CFG_STATS_STR CFG_REPORTER_STR"Report to the logger\n") | |
DEFUN (show_stats, show_stats_cmd,"show stats", SHOW_STR SHOW_STATS_STR) | |
DEFUN (show_stats_level, show_stats_level_cmd,"show stats level (global|peer|subscriber)", SHOW_STR SHOW_STATS_STR"Set the maximum group level\n""Show global groups only\n""Show global and network peer related groups\n""Show global, peer, and subscriber groups\n") | |
static int | asciidoc_handle_counter (struct osmo_counter *counter, void *sctx_) |
static void | asciidoc_counter_generate (struct vty *vty) |
static int | asciidoc_rate_ctr_handler (struct rate_ctr_group *ctrg, struct rate_ctr *ctr, const struct rate_ctr_desc *desc, void *sctx_) |
static int | asciidoc_rate_ctr_group_handler (struct rate_ctr_group *ctrg, void *sctx_) |
static int | asciidoc_osmo_stat_item_handler (struct osmo_stat_item_group *statg, struct osmo_stat_item *item, void *sctx_) |
static int | asciidoc_osmo_stat_item_group_handler (struct osmo_stat_item_group *statg, void *sctx_) |
DEFUN (show_stats_asciidoc_table, show_stats_asciidoc_table_cmd,"show asciidoc counters", SHOW_STR"Asciidoc generation\n""Generate table of all registered counters\n") | |
static int | config_write_stats_reporter (struct vty *vty, struct osmo_stats_reporter *srep) |
static int | config_write_stats (struct vty *vty) |
void | osmo_stats_vty_add_cmds () |
Add stats related commands to the VTY Call this once during your application initialization if you would like to have stats VTY commands enabled. More... | |
static int | osmo_stat_item_handler (struct osmo_stat_item_group *statg, struct osmo_stat_item *item, void *vctx_) |
void | vty_out_stat_item_group (struct vty *vty, const char *prefix, struct osmo_stat_item_group *statg) |
print a stat item group to given VTY More... | |
static int | osmo_stat_item_group_handler (struct osmo_stat_item_group *statg, void *vctx_) |
Variables | |
struct host | host |
struct cmd_node | cfg_stats_node |
static const struct value_string | stats_class_strs [] |
VTY interface for statsd / statistic items.
|
static |
References asciidoc_handle_counter(), VTY_NEWLINE, and vty_out().
Referenced by DEFUN().
|
static |
References osmo_asciidoc_escape(), VTY_NEWLINE, and vty_out().
Referenced by asciidoc_counter_generate().
|
static |
References asciidoc_osmo_stat_item_handler(), osmo_asciidoc_escape(), VTY_NEWLINE, and vty_out().
Referenced by DEFUN().
|
static |
References osmo_asciidoc_escape(), VTY_NEWLINE, and vty_out().
Referenced by asciidoc_osmo_stat_item_group_handler().
|
static |
References asciidoc_rate_ctr_handler(), osmo_asciidoc_escape(), VTY_NEWLINE, and vty_out().
Referenced by DEFUN().
|
static |
References osmo_asciidoc_escape(), VTY_NEWLINE, and vty_out().
Referenced by asciidoc_rate_ctr_group_handler().
|
static |
References config_write_stats_reporter(), VTY_NEWLINE, and vty_out().
Referenced by osmo_stats_vty_add_cmds().
|
static |
References stats_class_strs, VTY_NEWLINE, and vty_out().
Referenced by config_write_stats().
DEFUN | ( | cfg_stats_reporter_local_ip | , |
cfg_stats_reporter_local_ip_cmd | , | ||
"local-ip ADDR" | , | ||
"Set the IP address to which we bind locally\n""IP Address\n" | |||
) |
References set_srep_parameter_str().
DEFUN | ( | cfg_no_stats_reporter_local_ip | , |
cfg_no_stats_reporter_local_ip_cmd | , | ||
"no local-ip" | , | ||
NO_STR"Set the IP address to which we bind locally\n" | |||
) |
References set_srep_parameter_str().
DEFUN | ( | cfg_stats_reporter_remote_ip | , |
cfg_stats_reporter_remote_ip_cmd | , | ||
"remote-ip ADDR" | , | ||
"Set the remote IP address to which we connect\n""IP Address\n" | |||
) |
References set_srep_parameter_str().
DEFUN | ( | cfg_stats_reporter_remote_port | , |
cfg_stats_reporter_remote_port_cmd | , | ||
"remote-port <1-65535>" | , | ||
"Set the remote port to which we connect\n""Remote port number\n" | |||
) |
References set_srep_parameter_int().
DEFUN | ( | cfg_stats_reporter_mtu | , |
cfg_stats_reporter_mtu_cmd | , | ||
"mtu <100-65535>" | , | ||
"Set the maximum packet size\n""Size in byte\n" | |||
) |
References set_srep_parameter_int().
DEFUN | ( | cfg_no_stats_reporter_mtu | , |
cfg_no_stats_reporter_mtu_cmd | , | ||
"no mtu" | , | ||
NO_STR"Set the maximum packet size\n" | |||
) |
References set_srep_parameter_int().
DEFUN | ( | cfg_stats_reporter_prefix | , |
cfg_stats_reporter_prefix_cmd | , | ||
"prefix PREFIX" | , | ||
"Set the item name prefix\n""The prefix string\n" | |||
) |
References set_srep_parameter_str().
DEFUN | ( | cfg_no_stats_reporter_prefix | , |
cfg_no_stats_reporter_prefix_cmd | , | ||
"no prefix" | , | ||
NO_STR"Set the item name prefix\n" | |||
) |
References set_srep_parameter_str().
DEFUN | ( | cfg_stats_reporter_level | , |
cfg_stats_reporter_level_cmd | , | ||
"level (global|peer|subscriber)" | , | ||
"Set the maximum group level\n""Report global groups only\n""Report global and network peer related groups\n""Report | global, | ||
peer | , | ||
and subscriber groups\n" | |||
) |
References CMD_WARNING, osmo_stats_vty2srep(), stats_class_strs, VTY_NEWLINE, and vty_out().
DEFUN | ( | cfg_stats_reporter_enable | , |
cfg_stats_reporter_enable_cmd | , | ||
"enable" | , | ||
"Enable the reporter\n" | |||
) |
References CMD_SUCCESS, CMD_WARNING, osmo_stats_vty2srep(), VTY_NEWLINE, and vty_out().
DEFUN | ( | cfg_stats_reporter_disable | , |
cfg_stats_reporter_disable_cmd | , | ||
"disable" | , | ||
"Disable the reporter\n" | |||
) |
References CMD_SUCCESS, CMD_WARNING, osmo_stats_vty2srep(), VTY_NEWLINE, and vty_out().
DEFUN | ( | cfg_stats_reporter_statsd | , |
cfg_stats_reporter_statsd_cmd | , | ||
"stats reporter statsd" | , | ||
CFG_STATS_STR CFG_REPORTER_STR"Report to a STATSD server\n" | |||
) |
References CFG_STATS_NODE, CMD_SUCCESS, CMD_WARNING, vty::index, vty::node, VTY_NEWLINE, and vty_out().
DEFUN | ( | cfg_stats_interval | , |
cfg_stats_interval_cmd | , | ||
"stats interval <1-65535>" | , | ||
CFG_STATS_STR"Set the reporting interval\n""Interval in seconds\n" | |||
) |
References CMD_SUCCESS, CMD_WARNING, VTY_NEWLINE, and vty_out().
DEFUN | ( | cfg_no_stats_reporter_statsd | , |
cfg_no_stats_reporter_statsd_cmd | , | ||
"no stats reporter statsd" | , | ||
NO_STR CFG_STATS_STR CFG_REPORTER_STR"Report to a STATSD server\n" | |||
) |
References CMD_SUCCESS, CMD_WARNING, VTY_NEWLINE, and vty_out().
DEFUN | ( | cfg_stats_reporter_log | , |
cfg_stats_reporter_log_cmd | , | ||
"stats reporter log" | , | ||
CFG_STATS_STR CFG_REPORTER_STR"Report to the logger\n" | |||
) |
References CFG_STATS_NODE, CMD_SUCCESS, CMD_WARNING, vty::index, vty::node, VTY_NEWLINE, and vty_out().
DEFUN | ( | cfg_no_stats_reporter_log | , |
cfg_no_stats_reporter_log_cmd | , | ||
"no stats reporter log" | , | ||
NO_STR CFG_STATS_STR CFG_REPORTER_STR"Report to the logger\n" | |||
) |
References CMD_SUCCESS, CMD_WARNING, VTY_NEWLINE, and vty_out().
DEFUN | ( | show_stats | , |
show_stats_cmd | , | ||
"show stats" | , | ||
SHOW_STR | SHOW_STATS_STR | ||
) |
References CMD_SUCCESS, and vty_out_statistics_full().
DEFUN | ( | show_stats_level | , |
show_stats_level_cmd | , | ||
"show stats level (global|peer|subscriber)" | , | ||
SHOW_STR SHOW_STATS_STR"Set the maximum group level\n""Show global groups only\n""Show global and network peer related groups\n""Show | global, | ||
peer | , | ||
and subscriber groups\n" | |||
) |
References CMD_SUCCESS, stats_class_strs, and vty_out_statistics_partial().
DEFUN | ( | show_stats_asciidoc_table | , |
show_stats_asciidoc_table_cmd | , | ||
"show asciidoc counters" | , | ||
SHOW_STR"Asciidoc generation\n""Generate table of all registered counters\n" | |||
) |
|
static |
References vty_out_context::max_level, osmo_stat_item_handler(), vty_out_context::prefix, vty_out_context::vty, VTY_NEWLINE, and vty_out().
Referenced by vty_out_statistics_partial().
|
static |
References vty_out_context::prefix, vty_out_context::vty, VTY_NEWLINE, and vty_out().
Referenced by osmo_stat_item_group_handler(), and vty_out_stat_item_group().
|
static |
References CFG_STATS_NODE, vty::index, and vty::node.
Referenced by DEFUN(), set_srep_parameter_int(), and set_srep_parameter_str().
void osmo_stats_vty_add_cmds | ( | ) |
Add stats related commands to the VTY Call this once during your application initialization if you would like to have stats VTY commands enabled.
References CFG_STATS_NODE, CONFIG_NODE, config_write_stats(), install_element(), install_element_ve(), install_node(), and vty_install_default().
|
static |
References CMD_SUCCESS, CMD_WARNING, osmo_stats_vty2srep(), VTY_NEWLINE, and vty_out().
Referenced by DEFUN().
|
static |
References CMD_SUCCESS, CMD_WARNING, osmo_stats_vty2srep(), VTY_NEWLINE, and vty_out().
Referenced by DEFUN().
void vty_out_stat_item_group | ( | struct vty * | vty, |
const char * | prefix, | ||
struct osmo_stat_item_group * | statg | ||
) |
print a stat item group to given VTY
[in] | vty | The VTY to which it should be printed |
[in] | prefix | Any additional log prefix ahead of each line |
[in] | statg | Stat item group to be printed |
References osmo_stat_item_handler(), vty_out_context::vty, VTY_NEWLINE, and vty_out().
struct cmd_node cfg_stats_node |
|
static |
Referenced by config_write_stats_reporter(), and DEFUN().