diff --git a/hbd/client/plugin.py b/hbd/client/plugin.py index 9c5b22f..1dcd04c 100644 --- a/hbd/client/plugin.py +++ b/hbd/client/plugin.py @@ -29,7 +29,7 @@ class Plugin(ABC): description: Human-readable description interval: Collection interval in seconds (0 for InfoPlugin = collect once) enabled: Whether plugin is active (can be disabled via config) - skip_reason: Optional[str] = None # Set before returning False from initialize() so loader logs INFO not WARNING + skip_reason: Set by plugin before returning False from initialize(); causes loader to log INFO instead of WARNING. """ name: str = "" diff --git a/hbd/client/plugins/nagios_runner.py b/hbd/client/plugins/nagios_runner.py index 64301f6..804418e 100644 --- a/hbd/client/plugins/nagios_runner.py +++ b/hbd/client/plugins/nagios_runner.py @@ -78,12 +78,6 @@ class NagiosRunnerPlugin(MonitorPlugin): self.timeout: int = config.get("timeout", 30) if config else 30 self.shell: bool = config.get("shell", True) if config else True self.interval = config.get("interval", 300) if config else 300 - - # Validate commands - if not self.commands: - self.logger.info( - "No Nagios commands configured. Add 'nagios_runner.commands' to config." - ) async def initialize(self) -> bool: """Initialize the Nagios runner plugin. @@ -95,7 +89,6 @@ class NagiosRunnerPlugin(MonitorPlugin): if not self.commands: self.skip_reason = "no commands configured (add nagios_runner.commands to config)" - self.logger.info("No Nagios commands configured") return False self.logger.info(f"Configured to run {len(self.commands)} Nagios plugin(s)")