Problem with adding clients to Icinga2

This forum was archived to /woltlab and is now in read-only mode.
  • Hello! :)

    I have very strange problem after I added Director module to my Icinga2. I follow this tutorial http://www.itzgeek.com/how-tos…into-icinga-2-server.html

    Here is the configuration of my Master (zones.conf):



    * Generated by Icinga 2 node setup commands


    * on 2017-04-19 18:26:11 +0300


    */



    object Endpoint "dev_nagios" {


    host = "*****"


    }



    object Zone "master" {


    endpoints = [ "dev_nagios" ]


    }




    object Zone "director-global" {


    global = true


    }


    Here is the configuration of my Client node:

    /*


    * Generated by Icinga 2 node setup commands


    * on 2017-04-24 09:48:46 -0400


    */



    object Endpoint "master" {


    host = "192.168.4.186"


    port = "5665"


    }



    object Zone "master" {


    endpoints = [ "master" ]


    }



    object Endpoint NodeName {


    }



    object Zone ZoneName {


    endpoints = [ NodeName ]


    parent = "master"


    }


    When I enter this command ''icinga2 node list", it shows me only the host without the services:

    Node 'debian1' (last seen: Mon Apr 24 16:48:20 2017).


    And also the Icingaweb Is looks like this:[Blocked Image: https://ibb.co/jgsvwQ]

    https://ibb.co/jgsvwQ


    Can someone help me with the configuration ?

    I also cant find a command or manual way to delete any nodes configurations from Master?

    If everything works fine, just don't touch it ! :)

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

    • At the master, you are missing the client endpoint and client zone (Replace NodeName and ZoneName with the values found in the clients constants.conf )
    • At the client, you are missing the director-global zone.


    The post was edited 3 times, last by sru ().

  • I have edited the Master and Client zones.conf, but when try to restart Icinga2 service, I get this error:



    Code
    1. information/cli: Icinga application loader (version: r2.6.3-1)
    2. information/cli: Loading configuration file(s).
    3. critical/config: Error: Object 'debian1' of type 'Endpoint' re-defined: in /etc/icinga2/repository.d/endpoints/debian1.conf: 1:0-1:24; previous def$
    4. Location: in /etc/icinga2/repository.d/endpoints/debian1.conf: 1:0-1:24
    5. /etc/icinga2/repository.d/endpoints/debian1.conf(1): object Endpoint "debian1" {
    6. ^^^^^^^^^^^^^^^^^^^^^^^^^
    7. /etc/icinga2/repository.d/endpoints/debian1.conf(2): }
    8. /etc/icinga2/repository.d/endpoints/debian1.conf(3):

    If everything works fine, just don't touch it ! :)

  • If everything works fine, just don't touch it ! :)

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

  • So I have to use only icinga2 node wizard comand and edit the zones.conf files ?

    If everything works fine, just don't touch it ! :)

  • Yes.

    But in the moment you have the mess in /etc/icinga2/repository.d - if you find a line in icinga2.conf that includes that directory,

    it may be wise to comment it out:


    Code: icinga2.conf
    1. ...
    2. /**
    3. * The repository.d directory contains all configuration objects
    4. * managed by the 'icinga2 repository' CLI commands.
    5. */
    6. //include_recursive "repository.d"
    7. ...
  • I configured it with verry nice technique.

    Firstly I generated Master PKI:

    Code
    1. icinga node wizard

    After that I added a host template and a host from Icinga Director, executed the generated script from Agent tab. Sometimes when the hostname on the client have UpperCase and LowerCase letters, generates fake PKI. So i generate manual ticket.

    If everything works fine, just don't touch it ! :)