浏览代码

Added exclusion option for sections

Michael Honkoop 2 月之前
父节点
当前提交
fe7f478492
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      plugins/edirectory_monitor/server_side_calls/special_agent_edirectory_monitor.py

+ 5 - 1
plugins/edirectory_monitor/server_side_calls/special_agent_edirectory_monitor.py

@@ -15,6 +15,7 @@ from cmk.server_side_calls.v1._utils import Secret
 
 
 class Params(BaseModel):
 class Params(BaseModel):
     check_tls: bool | None = None
     check_tls: bool | None = None
+    exclude_sections: str | None = None
     user: str
     user: str
     password: Secret
     password: Secret
 
 
@@ -26,7 +27,10 @@ def commands_function(params: Params, host_config: HostConfig) -> Iterator[Speci
         params.password.unsafe(),
         params.password.unsafe(),
     ]
     ]
     if params.check_tls is not None and params.check_tls is True:
     if params.check_tls is not None and params.check_tls is True:
-        command_arguments += ["--verify_tls"]
+        command_arguments += ["--verify-tls"]
+    
+    if params.exclude_sections:
+        command_arguments += ["--exclude=" + params.exclude_sections]
 
 
     yield SpecialAgentCommand(command_arguments=command_arguments)
     yield SpecialAgentCommand(command_arguments=command_arguments)