我在 centos7 上使用 icinga v2.3.9
在配置 EventCommand 对象时,
[2018-12-14 12:34:03 +0000] information/ConfigItem: Committing config items
[2018-12-14 12:34:03 +0000] critical/config: Error: Required attribute is missing: Object 'restart_service' (Type: 'EventCommand') at /etc/icinga2/zones.d/global-templates/eventcommands.conf:2 -> Attribute 'execute'
[2018-12-14 12:34:03 +0000] critical/config: 1 error
[root@server icinga2]# cat zone.d/global-templates/eventcommands.conf
object EventCommand "restart_service" {
command = [ PluginDir + "/restart_service" ]
arguments = {
"-s" = "$service.state$"
"-t" = "$service.state_type$"
"-a" = "$service.check_attempt$"
"-S" = "$restart_service$"
"-H" = "$host.name$"
}
vars.restart_service = "$procs_command$"
}
}
我错过了什么吗,这个配置适用于 v2.10.2-1