Another approach is to work with icinga objects directly using icinga’s DSL e.g. example1 or example2.