Removing icinga director

hi guys,

may I ask if there are any steps to properly remove icinga director? below is the current environment:
OS: CentOS 6.8
icingaweb 2.3.4
director - 1.6.2
monitoring - 2.3.4

thanks!

  • Disable the module
  • Purge the module from /usr/share/icingaweb2/modules/director
  • Purge configuration from /etc/icingaweb2/modules/director
  • Drop the director database in MySQL
  • Delete the director config package from Icinga 2’s REST API

Cheers,
Michael

2 Likes

Shouldn’t this be /etc/icingaweb2/modules/director?

Small dummy question, as I have never used the package deletion via API before:
Does this only remove the packages (stored under /var/lib/icinga2/api/packages, correct?) or do the other folders under /var/lib/icinga2/api/ also get removed?

1 Like

Yep, you’re right. Little tired today, writing a release blogpost actually.

The reason why I have pointed to the REST API call - it safely removes everything needed, and the user shouldn’t fiddle with /var/lib/icinga2 at all. This may result in unexpected behaviour for the daemon and only is an advanced step.

1 Like

Thanks @dnsmichi!

Will this require a restart of the icinga services?

Deleting the config package should trigger a restart of Icinga 2, that’s enough.

Hello I just found this post and I am struggling with removing director.

  1. I disabled the module
  2. should I delete the while directory “director” in /usr/share/icingaweb2/modules ?
  3. which configariton in /usr/share/icingaweb2/modules/director needs do be deleted ?
    I am a bit confused.

my folder /usr/share/icingaweb2/modules/director looks like this:
image
what is meant by purge the module and the configuration from here?

  1. I tried to drop the database (postgresql) but I can’t delete the director table in postgres
    I use >> drop database director and nothing happnens.

  2. When i try to remove from Rest Api with curl
    curl -k -s -u root:xxx -X DELETE -H 'Accept: application/json' 'https://localhost:5665/v1/config/packages/director'
    I just get the error message:
    {"error":500.0,"status":"Failed to delete package 'director'."}[root@xxxxx modules]#

and when I check my logs I still get these logs

Jan 12 14:09:22 xxx systemd: icinga-director.service: main process exited, code=exited, status=3/NOTIMPLEMENTED
Jan 12 14:09:22 xxx systemd: Failed to start Icinga Director - Monitoring Configuration.
Jan 12 14:09:22 xxx systemd: Unit icinga-director.service entered failed state.
Jan 12 14:09:22 xxx systemd: icinga-director.service failed.

There is no config under /usr/share/icingaweb2/modules, there was a mistake in the post. I corrected it with my next post (and his post now as well)

So remove the director folder from /etc/icingaweb2/modules and /usr/share/icingaweb2/modules

The director service will also have to be removed. This was not available (afaik) at the time of the original post.

1 Like

thank you that worked for me now

Hi all!

I have a couple of questions related to this topic.

Are these steps still valid with newer versions of Icinga2 and Director?

Regarding configurations that have been created using Icinga Director, where can we find the Icinga2 configuration when changes need to be made? Is it located under /var/lib/icinga2/api … or somewhere else?

For example, if we’ve used Icinga Director to define a service set or service template, is it possible to edit this service set or service template through a configuration file on the server after we have removed director?

Thanks a lot.

Hello :slight_smile:

Yes, these steps should still work.

The zones folder there is where you will find your configuration based on the zones hierarchy of the masters /etc/icinga2/[conf.d/zones.d] folders as well as what you configured via the director.

If you are doing the steps mentioned above I don’t think there will be anything left from the Directors config, so make a backup before! Maybe also do a backup of the Director database. That’s where is initially stores all config and then sends it to the master via the API on config deployment.

1 Like

Thank you for feedback. I will try this first in test env and check if this is actually simple as it sounds :smiley: . Will leave feedback here as well.

Cheers!