Plugin template?

As this script is more an classic active check then a checkmk check.
You cannot use the classic way with check parameters and then the checkmk check.

Take a look at the “check_tcp” checkmk/checks/check_tcp at 1.6.0 · Checkmk/checkmk · GitHub
“check_tcp” is only a checkmk plugin making the correct active check syntax for your monitoring core.
The monitoring core then is running your script.

And the options from WATO for this active check.

There the definition
def _valuespec_active_checks_tcp():
and

rulespec_registry.register(
    HostRulespec(
        group=RulespecGroupActiveChecks,
        match_type="all",
        name="active_checks:tcp",
        valuespec=_valuespec_active_checks_tcp,
    ))

If you write your own definition then it is the easiest way to take the complete import block from the start of this file :slight_smile: