details of section traefik_http_components cleaned up

This commit is contained in:
Ralf Mellis 2025-05-04 11:33:46 +02:00
parent 28bcd00368
commit 32e5b9e194

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python3
# pylint: disable=missing-module-docstring, unused-argument,
# pylint: disable=missing-module-docstring, unused-argument, consider-using-f-string
# pylint: disable=missing-function-docstring, line-too-long
from pprint import pprint
@ -115,6 +115,7 @@ def check_traefik_http_components(params, section) -> CheckResult:
levels_upper=levels_max_routers,
label="Number of HTTP routers",
notice_only=True,
render_func=lambda v: "%.0f" % v,
)
yield from check_levels(
metric_name="traefik_num_http_services",
@ -123,6 +124,7 @@ def check_traefik_http_components(params, section) -> CheckResult:
levels_upper=levels_max_services,
label="Number of HTTP services",
notice_only=True,
render_func=lambda v: "%.0f" % v,
)
yield from check_levels(
metric_name="traefik_num_http_middlewares",
@ -131,6 +133,7 @@ def check_traefik_http_components(params, section) -> CheckResult:
levels_upper=levels_max_middlewares,
label="Number of HTTP middlewares",
notice_only=True,
render_func=lambda v: "%.0f" % v,
)