Icinga Director not Deploy Correctly

  • Hi,

    Good Morning, is my first post here, so thanks first for help me.


    I'm starting in the world of monitoring, I want to migrate the oldest platform in Icinga 1 to Icinga 2 and make a re-organization of all hosts and services.


    I'm installed Icinga2,Icingaweb2 and Icinga Director. I'was installed all and when go to Icinga Director and make the first deploy works nice. But I create a Host Template and then a host following the instructions from Icinga and when press Deploy every times appear a cross and not apply the changes.


    Have the pre-requesites all checked.

    SELinux and Firewalld disabled.

    Also in /var/lib/icinga2/lib/zones have the folder clear.

    I was reinstalled few times and not worked.

    Have the enviroment in CentOS7.


    Can anyone help me?


    Best Regards.

    Alex

  • can you show us what the error message of the director is? if you click on the deployment in the director it should give you a lengthy error message.

    Linux is dead, long live Linux


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

  • Hi Kevin,

    On Icinga Director --> Deployments show this. (I don't see the error box)





    Here have the activity log from Icinga Director.





    Don't see any part of Errors. But i was created a host, and in the Host part can't appear the new host.


    Thanks for the help!


    Kind Regards

  • strange, the moment you click on the failed deploy there should be a new panel on the right side, that shows you more informations about the deployment

    Linux is dead, long live Linux


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

  • Hi Alex,


    if you click on the deployment itself you should get a deployment details page. The log excerpt in there will pretty much exactly tell you what Icinga2 does not like about your config :).

    See screenshot for an example:

  • Actually Kevin.Honka and log1c I have the same problem with host deployment, but when I click on the deployment failed error message, it doesn't open a window to the right like I would expect, and so I cannot see whatever error report that normally would appear.


    deploy fail error not appearing:



    The post was edited 1 time, last by SSJBlue ().

  • take a look at your log, if there are any errors showing in them. this is not the normal behavior and I would expect some PHP Error to be shown.

    Linux is dead, long live Linux


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

  • Hey Goku ;),


    are you using the "real" v1.3.1 of the Director? Or did you clone/pull the current Director master from git?

    I'm asking because I don't have this problem with v1.3.1 neither v1.3.2 in my testing environment and you seem to have a different version, because of the "info blobs" on the bottom of the director panel.


    I couldn't find any bug reports on this though(quick check), so it might not be related to the version.

  • Hey Goku ;),


    are you using the "real" v1.3.1 of the Director? Or did you clone/pull the current Director master from git?

    I did pull the current Director version from the master on git...Do you think using the version from here: https://github.com/Icinga/icin…ector/releases/tag/v1.3.1 would be any different? I haven't found a solution yet as to why I can neither deploy hosts or read deployment error codes.

    take a look at your log, if there are any errors showing in them. this is not the normal behavior and I would expect some PHP Error to be shown.

    Where would I find that log? In /var/log/icingaweb2? Icinga2, Web2, and Director are installed on a CentOS 7 server, but I haven't found any logs relating to Web2 or its Director module.


    **Edit**
    I was able to pull up this error message "Fatal error: Cannot use ipl\Html\Util as Util because the name is already in use in /usr/share/icingaweb2/modules/director/library/Director/StartupLogRenderer.php on line 7":



    Icinga2 version is 2.6.3:

    icinga2 - The Icinga 2 network monitoring daemon (version: v2.6.3)


    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-514.26.1.el7.x86_64

    Architecture: x86_64


    Build information:

    Compiler: GNU 4.8.5

    Build host: unknown

    The post was edited 1 time, last by SSJBlue ().

  • Follow-up:


    So I found this related thread ( https://github.com/Icinga/icin…dule-director/issues/1057 ) based on the StartupLogRenderer.php error message, so I updated php to version 5.6 and installed opcache following this guide ( https://zedt.eu/tech/linux/ena…php-5-6-opcache-centos-7/ ) and it fixed that deploy error from startuplogrenderer.php, and now it spits out this error message:

    Code
    1. information/cli: Icinga application loader (version: r2.7.0-1)
    2. information/cli: Loading configuration file(s).
    3. critical/config: Error: Object 'generic-host' of type 'Host' re-defined: in [stage]/zones.d/director-global/host_templates.conf: 1:0-1:27; previous definition: in /etc/icinga2/conf.d/templates.conf: 14:1-14:28
    4. Location: in [stage]/zones.d/director-global/host_templates.conf: 1:0-1:27
    5. [stage]/zones.d/director-global/host_templates.conf(1): template Host "generic-host" { ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    6. [stage]/zones.d/director-global/host_templates.conf(2): check_command = "hostalive"
    7. [stage]/zones.d/director-global/host_templates.conf(3): max_check_attempts = "3"




  • Edit your icinga2.conf and remove the conf.d inclusion.


    Code
    1. //include_recursive "conf.d"

    Then restart Icinga 2 and start a new deployment.

  • Edit your icinga2.conf and remove the conf.d inclusion.


    Code
    1. //include_recursive "conf.d"

    Then restart Icinga 2 and start a new deployment.

    That worked! Thanks! I have full deployment now, and hosts are starting to ping.