]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: stats: implement dump stats-file CLI
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 28 Mar 2024 13:53:52 +0000 (14:53 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 26 Apr 2024 08:20:57 +0000 (10:20 +0200)
commite74148fb7c10a3d1a2ecdf930cc8f1cb9a760a34
tree6937ed0b0f4d33bd84c88e42c1558ce2171e8b15
parent83281303f69291d4df9b3e40ee8d098b6b3a3dd9
MEDIUM: stats: implement dump stats-file CLI

Define a new CLI command "dump stats-file" with its handler
cli_parse_dump_stat_file(). It will loop twice on proxies_list to dump
first frontend and then backend side. It reuses the common function
stats_dump_stat_to_buffer(), using STAT_F_BOUND to restrict on the
correct side.

A new module stats-file.c is added to regroup function specifics to
stats-file. It defines two main functions :
* stats_dump_file_header() to generate the list of column list prefixed
  by the line context, either "#fe" or "#be"
* stats_dump_fields_file() to generate each stat lines. Object without
  GUID are skipped. Each stat entry is separated by a comma.

For the moment, stats-file does not support statistics modules. As such,
stats_dump_*_line() functions are updated to prevent looping over stats
module on stats-file output.
Makefile
doc/management.txt
include/haproxy/stats-file.h [new file with mode: 0644]
src/stats-file.c [new file with mode: 0644]
src/stats.c