1

是否可以将变量传递给display_nameIcinga2 配置,例如用于服务:

apply Service for (disk_name => config in host.vars.disks) to Host {
  import "generic-service"
  vars = vars + config
  display_name = "disk" //TODO: pass hdd name?
  check_command = "disk"
}
4

1 回答 1

2

是的。

apply Service for (disk_name => config in host.vars.disks) to Host {
  import "generic-service"
  vars = vars + config
  display_name = disk_name
  check_command = "disk"
}
于 2017-03-10T05:53:36.890 回答