]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: stats: don't output internal proxies (PR_CAP_INT)
authorWilliam Lallemand <wlallemand@haproxy.org>
Wed, 28 Jul 2021 15:45:18 +0000 (17:45 +0200)
committerWilliam Lallemand <wlallemand@haproxy.org>
Wed, 28 Jul 2021 15:45:18 +0000 (17:45 +0200)
Disable the output of the statistics of internal proxies (PR_CAP_INT),
wo we don't rely only on the px->uuid > 0. This will allow to hide more
cleanly the internal proxies in the stats.

src/stats.c

index 9891469ea7ebd68a0e948644267b9560818785b8..71e81c7fa20f7be98f2b4f68b8d08e52d51a3b6f 100644 (file)
@@ -3620,7 +3620,8 @@ static int stats_dump_proxies(struct stream_interface *si,
                 * Also skip disabled proxies unless they are still holding active sessions.
                 * This change allows retrieving stats from "old" proxies after a reload.
                 */
-               if ((!px->disabled || px->served > 0) && px->uuid > 0 && (px->cap & (PR_CAP_FE | PR_CAP_BE))) {
+               if ((!px->disabled || px->served > 0) && px->uuid > 0 &&
+                   (px->cap & (PR_CAP_FE | PR_CAP_BE)) && !(px->cap & PR_CAP_INT)) {
                        if (stats_dump_proxy_to_buffer(si, htx, px, uri) == 0)
                                return 0;
                }