Compare commits

...

3 Commits

22 changed files with 10 additions and 4 deletions

View File

@@ -13,12 +13,12 @@ If the Traefik dashboard reports any critical state, the appropriate service goe
Services Overview:
![Services Overview](Traefik-Services-Overview.png)
![Services Overview](images/Traefik-Services-Overview.png)
Traefik Info Details:
![Info Details](Traefik-Info-Details.png)
![Info Details](images/Traefik-Info-Details.png)
Traefik HTTP Components Details:
![HTTP Components Details](Traefik-HTTPComponents-Details.png)
![HTTP Components Details](images/Traefik-HTTPComponents-Details.png)

View File

Before

Width:  |  Height:  |  Size: 84 KiB

After

Width:  |  Height:  |  Size: 84 KiB

View File

Before

Width:  |  Height:  |  Size: 65 KiB

After

Width:  |  Height:  |  Size: 65 KiB

View File

Before

Width:  |  Height:  |  Size: 103 KiB

After

Width:  |  Height:  |  Size: 103 KiB

BIN
mkp/Traefik-0.2.0.mkp Normal file

Binary file not shown.

View File

@@ -2,6 +2,7 @@
# pylint: disable=missing-module-docstring, unused-argument,
# pylint: disable=missing-function-docstring, line-too-long
import datetime
import time
@@ -24,6 +25,9 @@ def get_state_upper(
levels: tuple[int | float, int | float], value: int | float
) -> State:
"""returns OK/WARN/CRIT depending on the given parameters"""
if levels is None:
# a rule with no levels set is active, assume OK state
return State.OK
warn, crit = levels
if value >= crit:
return State.CRIT
@@ -62,6 +66,9 @@ def check_traefik_info(params, section) -> CheckResult:
"""the check function"""
_level_type, levels = params["levels_traefik_agent_execution_time"]
codename: str = section["codename"]
if codename == "":
# docker hardened image
codename = "DHI"
version: str = section["version"]
startdate: str = section["startdate"]
startdate_seconds_since_epoch: int = section["startdate_seconds_since_epoch"]
@@ -71,7 +78,6 @@ def check_traefik_info(params, section) -> CheckResult:
agent_version: str = section["agent_version"]
agent_runtime: float = round(section["agent_runtime"], 1)
state: State = get_state_upper(levels=levels, value=agent_runtime)
yield Metric(
name="traefik_agent_execution_time",
value=agent_runtime,