要解决此问题,我们可以使用以下修复。
{{ range service "mysql_slave.mysql" "any" }} {{ if eq .Node "database-1" }} host_name {{.Node}} command check_nrpe!check_procs_1 {{else}} host_name {{.Node}} command check_nrpe!check_procs_2 {{end}} {{end}}