Icinga / icingaweb2-module-director

The Director aims to be your new favourite Icinga config deployment tool. Director is designed for those who want to automate their configuration deployment and those who want to grant their “point & click” users easy access to the configuration.
https://icinga.com/docs/director/latest
GNU General Public License v2.0
413 stars 201 forks source link

Icinga Agent Zone creation Issue #1438

Open Wintermute2k6 opened 6 years ago

Wintermute2k6 commented 6 years ago

Expected Behavior

While creating a new Host and initial setting 'Agent' and and 'Accept Config' and 'Accept Commands' to 'yes'. screen1 During deployment there is in /var/lib/icinga2/api/zones/localhost.localdomain/director/agent_zones.conf
created with the following content.

cat agent_zones.conf object Zone "Dummy1" { parent = "localhost.localdomain" endpoints = [ "Dummy1" ] }

After the finished deployment this Object Zone is not available in the Cluster Zone Dropdown Menu of the Host itself or any other Host who wants to add the same 'Cluster Zone'.

screen2

Even when disabling the Agent Setting and manually adding the Zone via the Infrastructure Menu. And then Setting again the Agent Setting to 'Yes' will lead to an object re-defined Zone Error.

Change/Improvement

Agent-zone.conf should probably list the Zones in the Cluster Zone Drop Down Menu .

Current Behavior

agent_zones.conf Zones aren't listed as Members of the Cluster Zone Drop Down Menu.

Possible Solution

Adding them to the Cluster Zone Dropdown Menu.

Steps to Reproduce (for bugs)

  1. Empty Icinga2 Setup with Director and the required Databases.
  2. Create 1 Host via Director and Deploy it the the Settings from Screen1.
  3. After deployment try to choose from the the Cluster Zone Menu the agent zone which was create during the deployment in /var/lib/icinga2/api/zones/host/director/agent_zones.conf

Additional:

  1. Set Agent Flag on the Host to 'no'.
  2. Create Zone via the Infrastructure Menu.
  3. Deploy the Zone.
  4. Choose the newly added Zone in the Cluster Zone Dropdown Menu and set the Agent Flag again to 'Yes'.

Your Environment

Icinga 2 Version: icinga2 --version icinga2 - The Icinga 2 network monitoring daemon (version: r2.8.2-1)

Copyright (c) 2012-2017 Icinga Development Team (https://www.icinga.com/) License GPLv2+: GNU GPL version 2 or later http://gnu.org/licenses/gpl2.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

Application information: Installation root: /usr Sysconf directory: /etc Run directory: /run Local state directory: /var Package data directory: /usr/share/icinga2 State path: /var/lib/icinga2/icinga2.state Modified attributes path: /var/lib/icinga2/modified-attributes.conf Objects path: /var/cache/icinga2/icinga2.debug Vars path: /var/cache/icinga2/icinga2.vars PID path: /run/icinga2/icinga2.pid

System information: Platform: CentOS Linux Platform version: 7 (Core) Kernel: Linux Kernel version: 3.10.0-693.5.2.el7.x86_64 Architecture: x86_64

Build information: Compiler: GNU 4.8.5 Build host: unknown

Director Version: Tested with latest Master 6889c63a693fa3395a5bc7ff028c586f1501db5d & also with the release 1.4.3

Icingaweb2 Version: icingaweb2-2.5.1-1.el7.icinga.noarch and the Director Module.

Operating System and version: cat /etc/os-release NAME="CentOS Linux" VERSION="7 (Core)" ID="centos" ID_LIKE="rhel fedora" VERSION_ID="7" PRETTY_NAME="CentOS Linux 7 (Core)" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:centos:centos:7" HOME_URL="https://www.centos.org/" BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7" CENTOS_MANTISBT_PROJECT_VERSION="7" REDHAT_SUPPORT_PRODUCT="centos" REDHAT_SUPPORT_PRODUCT_VERSION="7"

Punkoivan commented 4 years ago

I am just wondering if this still valid? :) I assume that you need to:

  1. add zone manually via backend
  2. run director kickstart

it should do the trick.