aboutsummaryrefslogtreecommitdiffstats
path: root/src/vty/stats_vty.c
AgeCommit message (Collapse)AuthorFilesLines
2016-06-15vty: Fix documentation of 'show asciidoc counters' VTY commandHarald Welte1-1/+1
VTY documentations strings follow a certain structure, and we need to follow that to make the interactive help work. Change-Id: I0bb0bda68dbbf9995338ec555ff99d73a223162c Reviewed-on: https://gerrit.osmocom.org/276 Reviewed-by: Harald Welte <laforge@gnumonks.org> Tested-by: Harald Welte <laforge@gnumonks.org>
2016-06-14add vty call show asciidoc: generate a documentation for countersAlexander Couzens1-0/+142
For each counter group a ascii doc table is generated containing all single counter with a reference to a section to add additional information to the counter Change-Id: Ia8af883167e5ee631059299b107ea83c8bbffdfb Reviewed-on: https://gerrit.osmocom.org/70 Reviewed-by: Harald Welte <laforge@gnumonks.org> Tested-by: Harald Welte <laforge@gnumonks.org>
2015-11-07stats: Document the level in show stats level optionsHolger Hans Peter Freyther1-0/+1
Potentially Fixes: <command id='show stats level (global|peer|subscriber)'> <param name='subscriber' doc='(null)' />
2015-08-22stats/vty: Add selective show stats commandJacob Erlbeck1-0/+15
Currently there is only the 'show stats' command which shows all counter and stat_item values. This can lead to many lines of output if there are per-subscriber rate counters. The new command added by this commit allows it to only show groups of a certain level (class_id), similar to the 'level' configuration command for stats reporter. The new command is show stats level (global|peer|subscriber) Sponsored-by: On-Waves ehf
2015-11-02stats: Fix handling of the no mtu commandHolger Hans Peter Freyther1-1/+1
For the atoi we need to pass the val as a string. This means we need to write "0" which then gets parsed to 0. [src/vty/stats_vty.c:90]: (error) Possible null pointer dereference: val
2015-11-02stats: Limit reporting by class idJacob Erlbeck1-0/+37
This commit adds class_id fields to the rate_ctr and stat_item group descriptions. The stats reporter code is extended to only process groups whose class_id does not exceed a per reporter max_class level. If the class_id is not set, the code assumes 'global' for groups with idx == 0 and 'subscriber' otherwise. The following vty command is added to config-stats: level (global|peer|subscriber) Set the maximum group level Sponsored-by: On-Waves ehf
2015-11-02stats: Add osmo_ name prefix to identifiersJacob Erlbeck1-40/+40
Since the the stat_item and stats functions and data types are meant to be exported, they get an osmo_ prefix. Sponsored-by: On-Waves ehf [hfreyther: Prepended the enum values too. This was requested by Jacob]
2015-10-29stats: Add log reporterJacob Erlbeck1-0/+49
This reporter passes the measurement values to the logging subsystem as DSTATS (which is currently DLGLOBAL) level INFO messages. Sponsored-by: On-Waves ehf
2015-10-29stats: Make net config optionalJacob Erlbeck1-12/+15
To support reporters without network configuration, this commit introduces the have_net_config flag to provide corresponding error messages. Sponsored-by: On-Waves ehf
2015-10-29stats: Add missing mtu command to 'write' outputJacob Erlbeck1-0/+3
Currently the config_write_stats_reporter function does not output the mtu value, which is fixed by this commit. Sponsored-by: On-Waves ehf
2015-10-29stats: Support statsd Multi-Metric PacketsJacob Erlbeck1-0/+19
If the MTU is given, combine several messages into a single UDP packet until the limit is reached. Flush all reporters after the values have been scanned. New vty commands (node config-stats): mtu <100-65535> Enable multi-metric packets and set the maximum packet size (in byte) no mtu Disable multi-metric packets Note that single messages that are longer than the given MTU (minus 28 octets protocol overhead) will be dropped. Sponsored-by: On-Waves ehf
2015-10-29stats: Implement timer based reportingJacob Erlbeck1-13/+21
This calls stats_flush in regular intervals which polls the statistical values and calls the active reporters when values have changed. Sponsored-by: On-Waves ehf
2015-10-29stats/vty: Add stats configurationJacob Erlbeck1-1/+260
This commit provides stats configuration similar to the log configuration. The following vty commands are added to the config node: stats reporter statsd Create/Modify a statsd reporter no stats reporter statsd Remove a statsd reporter To actually configure a reporter, the config-stats node is entered when the "stats reporter" command has succeeded. The following new vty commands are available there: local-ip ADDR Set the IP address to which we bind locally no local-ip Do not bind to a certain IP address remote-ip ADDR Set the remote IP address to which we connect remote-port <1-65535> Set the remote port to which we connect prefix PREFIX Set the item/counter name prefix no prefix Do not use a prefix enable Enable the reporter disable Disable the reporter Sponsored-by: On-Waves ehf
2015-10-29stats/vty: Add stats_vty.cJacob Erlbeck1-0/+52
This file will contain the VTY code related to statistics. This commit adds a minimal file with just as single VTY command: - show stats This command shows all statistical values To enable this and future commands, the main program needs to call stats_vty_add_cmds(). Sponsored-by: On-Waves ehf