Copy from "github.com/Icinga/icinga2".