You need to add the field to the command config and set it as the value of your -d
argument.
Example:
object CheckCommand "haproxy_state" {
import "plugin-check-command"
command = [ PluginDir + "/check_haproxy.rb" ]
timeout = 1m
arguments += {
"-P" = {
required = true
value = "$haproxy_password$"
}
"-U" = {
required = true
value = "$haproxy_user$"
}
"-c" = {
required = false
value = "$haproxy_critical$"
}
"-u" = {
required = true
value = "$haproxy_url$"
}
"-w" = {
required = false
value = "$haproxy_warning$"
}
}
}
Looks like this in the Director:
Because you are overriding the check command somewhere. Did you import multiple templates anywhere?
also please take a look at this guide for post formatting
Code snippets with some indentations and some highlighting are much easier to read