API config management & HA


I’ve configured icinga in HA and I’m configuring my clients using configuration management creating packages and stages via API. The files are stored in /var/lib/icinga2/api/packag es/zones.d/master/ and this is ok, and at the same time, the objects host, zone, endpoint and services are copied to /var/lib/icinga2/api/zones/master/machine1/. In backend curl I define zones.d/master as default directory.

But when I delete a configuration management package (via curl), It deletes the package but doesn’t delete the files located in /var/lib/icinga2/api/zones/master/machine1.

My environment:
master1 and master2: ubuntu 16.04, icinga2

Any help is appreciated


Not deleting respective not ignoring deleted zones is a bug and will be tackled with 2.11.

I’m wondering about the path though, /var/lib/icinga2/api/packages/zones.d/master/ should read as /var/lib/icinga2/api/packages/PACKAGENAME/zones.d/master/ - that’s the internal default storage for packages. During cluster config sync, everything registered from packages and /etc/icinga2/zones.d will be copied to /var/lib/icinga2/api/zones.


Hi Michael.

You are right about the path. I forgot write “PACKAGENAME”. Sorry about that.

Thanks for the clarification. I saw the configuration in two places and now I understand it. :slight_smile:

I’ll wait for 2.11.