Hide host and all its services if down

Is it possible to hide or at least make host and its service uncritical (unknown?)?
That would be a fantastic feature!

Hi and welcome,

there are some possabilties:

apply Service "disk" {
  zone = "master"
  import "generic-service"
  check_command = "disk"
  vars.disk_local = "true"
  vars.disk_wfree = 10
  vars.disk_cfree = 5
  command_endpoint = host.name
  assign where host.state == Up

why does this not work?

i dont want to do anything on the GUI. just in the configs.
also i dont want to filter for a host_NAME, but host_STATE. this isn’t even available as keyword!

Ok, then I misunderstood your question. I never saw an option for this in the config, so I don’t know if this is is possible (now).

however, it should be mentioned that - if you decide to configure dashboards - you can use runtime macros like host.state or service.state look here for details: Monitoring Basics - Icinga 2

i dont understand how this can be adapted to my problem… maybe someone can explain or give me the config lines? thanks!