]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: stats: hide some columns in output
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 17 Apr 2024 09:12:27 +0000 (11:12 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 26 Apr 2024 08:20:57 +0000 (10:20 +0200)
commit168301411dcbd07a8c386e1f8e3d0809fc0a457e
tree5f9bffbe6759d9ee67aef21834af7e326e4f4612
parenta7810b7be66565da508867250bb5cf6f2790d8c2
MINOR: stats: hide some columns in output

Metric style stats can be automatically calculate since the introduction
of metric_generate() when using "struct stat_col" as input. This would
allow to centralize statistics generation. However, some stats are not
outputted under specific condition. For example, health check failures
on a server are only reported if checks are active.

To support this, define a new function metric_hide(). It is called by
metric_generate(). If true, it will skip metric calcuation and return an
empty field value instead. This allows to define "stat_col" metrics and
calculate them with metric_generate() but hiding them under certain
circumstances.
src/stats.c