Decreasing configuration file verbosity on satellite host

Is there any way of avoiding the verbosity and minimizing amount text needed to set up each service and CheckCommand?

I have icinga2 setup with central master server and few hosts with icinga2 agents, connecting via 5665 tcp to the master server.

On one of the agent hosts I’ll have plenty of custom, not-reusable services defined as below. Each with unique command and arguments:

object CheckCommand "custom1" {
  command = [ "/usr/local/checks/custom1/check.sh"]
  arguments={"-w"="10","-c"= "20" }
}
apply Service "custom1" {
  import "generic-service"
  check_command = "custom1"
  assign where host.name == NodeName
}



object CheckCommand "custom2" {
  command = [ "/usr/local/checks/custom2/another_check.sh"]
  arguments={"-x"="1","-y"= "12" }
}
apply Service "custom2" {
  import "generic-service"
  check_command = "custom2"
  assign where host.name == NodeName
}

In the ideal world i’d like to express it similarly to nrpe’s syntax - in as terse form as possible:

Service "custom1" {
  command = [ "/usr/local/checks/custom2/another_check.sh"]
  arguments={"-w"="10","-c"= "20" }
}

Service "custom2" {
  command = [ "/usr/local/checks/custom2/another_check.sh"]
  arguments={"-x"="1","-y"= "12" }
}

Thanks a lot!