|
|
@@ -0,0 +1,32 @@
|
|
|
+#!/usr/bin/env python3
|
|
|
+
|
|
|
+from collections.abc import Iterable
|
|
|
+
|
|
|
+from cmk.server_side_calls.v1 import (
|
|
|
+ HostConfig,
|
|
|
+ SpecialAgentCommand,
|
|
|
+ SpecialAgentConfig,
|
|
|
+ noop_parser,
|
|
|
+)
|
|
|
+
|
|
|
+
|
|
|
+def _agent_arguments(
|
|
|
+ params,
|
|
|
+ host_config: HostConfig,
|
|
|
+) -> Iterable[SpecialAgentCommand]:
|
|
|
+
|
|
|
+ address = host_config.address
|
|
|
+
|
|
|
+ if not address:
|
|
|
+ return
|
|
|
+
|
|
|
+ yield SpecialAgentCommand(
|
|
|
+ command_arguments=[address],
|
|
|
+ )
|
|
|
+
|
|
|
+
|
|
|
+special_agent_p1 = SpecialAgentConfig(
|
|
|
+ name="p1",
|
|
|
+ parameter_parser=noop_parser,
|
|
|
+ commands_function=_agent_arguments,
|
|
|
+)
|