Exporting Service Apply Rules

I’ve been using the Configuration Baskets to migrate my configs to a new cluster. The only thing I cannot figure out is how to export the Service Apply Rules. Anyone have an idea how to do this?

Also, is it possible to export all hosts with their settings?

I don’t think baskets are the right thing for hosts.
The idea is to transfer settings and configurations, not concrete hosts and services.
I would recommend using service sets, as those also have apply rules and can be exported via baskets.

If you want to transfer concrete hosts then I would configure the origin system as DB director import source in the target system and pull the host objects this way.

I did this in an installation using director to configure icinga2. For apply services and for the hosts and other configurations not covered by the baskets, we used ansible and the telekom_mms.icinga_director collection, see: GitHub - telekom-mms/ansible-collection-icinga-director: An Ansible collection that contains modules to change objects in Icinga 2 using the director API.. You can get the configuration from the old icinga installation with the info-moduls and then configure the new one, using the query results.

1 Like