object CheckCommand "2742-macro-command" { import "plugin-check-command" command = "echo UPTIME: $icinga.uptime$ SERVICES warn: $icinga.num_services_warning$ crit: $icinga.num_services_critical$ unknown: $icinga.num_services_unknown$ ackd: $icinga.num_services_acknowledged$ HOST: down: $icinga.num_hosts_down$ unreachable: $icinga.num_hosts_unreachable$" } object HostGroup "2742-windows-servers"{ display_name = "2742-windows-servers" assign where match("2742-*", host.name) } apply Service "2742-macro-test" { import "test-generic-service" check_command = "2742-macro-command" assign where match("2742-*", host.name) } object Host "2742-server" { import "test-generic-host" address = "192.168.1.5", }