object CheckCommand "check_tcp_wild" {
import "ipv4-or-ipv6"
command = [ PluginDir + "/check_tcp " + "$tcp_args$" ]
vars.tcp_args = "$tcp_args$"
}
apply Service "Puppet Server 8140" {
import "generic-service"
check_command = "check_tcp_wild"
vars.tcp_args = "-H puppetserver.domain.tld -p 8140"
}
Edit: One solution I came up with is:
object CheckCommand "check_tcp_wild" {
import "plugin-check-command"
import "ipv4-or-ipv6"
command = PluginDir + "/check_tcp" + " " + "$tcp_args$"
vars.tcp_args = "$tcp_args$"
}
apply Service "Puppet Server 8140" {
import "generic-service"
check_command = "check_tcp_wild"
vars.tcp_args = ["-H", "puppetserver.domain.tld", "-p", "8140"]
}
Untested, but this should work: