added section udp_components

This commit is contained in:
2025-05-04 13:10:23 +02:00
parent 0e8142e19c
commit 0cf9285726
7 changed files with 293 additions and 4 deletions

View File

@@ -7,6 +7,8 @@ from cmk.graphing.v1 import Title
from cmk.graphing.v1.metrics import Color, DecimalNotation, Metric, Unit
from cmk.graphing.v1.perfometers import Closed, FocusRange, Perfometer
# info section
metric_traefik_agent_execution_time = Metric(
# "name" must be exactly the "metric_name" within the check function
name="traefik_agent_execution_time",
@@ -15,6 +17,7 @@ metric_traefik_agent_execution_time = Metric(
color=Color.DARK_ORANGE,
)
# HTTP section
metric_traefik_num_http_routers = Metric(
name="traefik_num_http_routers",
title=Title("Number of HTTP routers"),
@@ -44,6 +47,7 @@ metric_traefik_percent_http_components_not_ok = Metric(
color=Color.DARK_RED,
)
# TCP section
metric_traefik_num_tcp_routers = Metric(
name="traefik_num_tcp_routers",
title=Title("Number of TCP routers"),
@@ -65,7 +69,6 @@ metric_traefik_num_tcp_middlewares = Metric(
color=Color.LIGHT_RED,
)
metric_traefik_percent_tcp_components_not_ok = Metric(
name="traefik_percent_tcp_components_not_ok",
title=Title("Percent of TCP components in not OK state"),
@@ -73,7 +76,30 @@ metric_traefik_percent_tcp_components_not_ok = Metric(
color=Color.DARK_RED,
)
# UDP section
metric_traefik_num_udp_routers = Metric(
name="traefik_num_udp_routers",
title=Title("Number of UDP routers"),
unit=Unit(DecimalNotation("")),
color=Color.LIGHT_GREEN,
)
metric_traefik_num_udp_services = Metric(
name="traefik_num_udp_services",
title=Title("Number of UDP services"),
unit=Unit(DecimalNotation("")),
color=Color.LIGHT_BLUE,
)
metric_traefik_percent_udp_components_not_ok = Metric(
name="traefik_percent_udp_components_not_ok",
title=Title("Percent of UDP components in not OK state"),
unit=Unit(DecimalNotation("%")),
color=Color.DARK_RED,
)
# Perfometers
perfometer_traefik_agent_execution_time = Perfometer(
name="traefik_agent_execution_time",
focus_range=FocusRange(Closed(0), Closed(100)),