Traefik-CheckMK/graphing/graph_traefik.py

24 lines
832 B
Python

# pylint: disable=unused-import
"""graphing and metrics definitions"""
from cmk.graphing.v1 import Title
# from cmk.graphing.v1.graphs import Graph, MinimalRange
from cmk.graphing.v1.metrics import Color, DecimalNotation, Metric, Unit
from cmk.graphing.v1.perfometers import Closed, FocusRange, Perfometer
metric_traefik_agent_execution_time = Metric(
# "name" must be exactly the "metric_name" within the check function
name="traefik_agent_execution_time",
title=Title("Agent execution time"),
unit=Unit(DecimalNotation("ms")),
color=Color.DARK_ORANGE,
)
perfometer_traefik_agent_execution_time = Perfometer(
name="traefik_agent_execution_time",
focus_range=FocusRange(Closed(0), Closed(100)),
# "segments" must be exactly the name of the metric
segments=["traefik_agent_execution_time"],
)