Initial commit: LAN Checker
Network health monitoring script with MQTT reporting for Home Assistant. - Ping, HTTP, and SNMP checkers - MQTT Discovery for automatic entity creation - Configurable check intervals Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
21
checkers/base.py
Normal file
21
checkers/base.py
Normal file
@@ -0,0 +1,21 @@
|
||||
from abc import ABC, abstractmethod
|
||||
from dataclasses import dataclass
|
||||
from typing import Any
|
||||
|
||||
|
||||
@dataclass
|
||||
class CheckResult:
|
||||
success: bool
|
||||
message: str
|
||||
response_time: float | None = None
|
||||
details: dict[str, Any] | None = None
|
||||
|
||||
|
||||
class BaseChecker(ABC):
|
||||
def __init__(self, name: str, config: dict):
|
||||
self.name = name
|
||||
self.config = config
|
||||
|
||||
@abstractmethod
|
||||
def check(self) -> CheckResult:
|
||||
pass
|
||||
Reference in New Issue
Block a user