Director new setup import

This forum was archived to /woltlab and is now in read-only mode.
  • We're currently using Nagios for my monitoring needs, but with all the manual setup work, we're looking at moving to Icinga2 with director. In the lab, I have a brand new CentOS 7 VM with Icinga2, Icingaweb2, and Director setup, but I seem to be having a problem with the director kickstart import.


    To backup just a bit, this setup is brand new. I followed the steps on the official Icinga install guide to a tee, including all the SELinux stuff. When I first ran into this problem, I assumed I did something wrong during setup, so I wiped out everything, and reinstalled. And I've still got the same problem. Everything else seems to work properly. I can access the web interface just fine and the default host and its services are checking properly. I just can't get started with director.


    My issue is this: when I run the kickstart wizard, it only imports the commands. It doesn't import the default host, any of the host groups, any of the services, templates, etc. It only imports the commands. I hope there's some minor thing I'm missing here, but I can't get them to import. When I create the, for example, host groups manually, then it won't apply the configuration because the host groups already exist. I know enough from Nagios that I could go in a delete all the default configuration to get around this problem, but then it feels like I'm missing something. Shouldn't I be able to edit these default configurations though director?


    I hope you guys can help me, either by steering me in the right direction, or by adjusting my expectations here.


    Thanks!

  • if you are going to use only the director, remove everyting under conf.d expect the api-users.conf. Then you can create the Host for the master in the Director and everything is good to go.


    You could also import the Host etc via the CoreAPI Import.

    Linux is dead, long live Linux


    Remember to NEVER EVER use git repositories in a productive environment if you CAN NOT control them

  • You could also import the Host etc via the CoreAPI Import.

    This is a good hint, and I think I'm on the right path, but I'm trying this, and I'm still running in to problems.


    After reading through the Import and Sync docs on the Director git page, I knew I needed to create both an import and a sync to make this work. First, I created an import for the hosts via CoreAPI, but as soon as I tried to import, I get the error: "This Import Source failed when last checked at 2017-12-23 10:38:36: The group "linux-servers" doesn't exists." Got it: I need to import my host groups first!


    Now, I create an import for my host groups. Import is successful, and the preview tab shows exactly what I'd expect: linux-servers and windows-servers. Now, I create a sync rule, assign the appropriate sync properties, and it looks like I'm in business. Now, when I check the host groups, I'm showing both linux-servers and windows-servers. This is where I run into problems though: when I deploy the changes, it fails, because: "Error: Object 'linux-servers' of type 'HostGroup' re-defined...".


    When I checked back on the created hostgroups in Director, I also realized that it doesn't look like everything is importing correctly. When I create the sync properties, even though I only show "object_name" as an import variable, I was able to use custom expression to get the display name to sync. However, I cannot get the "assign_filter" to sync properly.


    At this point, I'm wondering if my expectations for Director are wrong. In our current setup, we use NagioSQL to manage the config files. What I'm really looking for from director is a similar capacity, plus the ability to do automatic imports and API driven changes, etc.


    In order to achieve this, do I need to do a one-time import of everything, and then delete the files in conf.d? Or is there a nuance I'm missing here?