Pending status for client zone in Three Level Configuration

This forum was archived to /woltlab and is now in read-only mode.
  • Hi collegian.
    where am I wrong?

    i wont use three level configuration: master, satellite, client
    client as windows server
    master and satellite - linux host

    in master on file zones.conf i add information about satellite host
    where am I wrong

    1. object Zone "global-templates" {
    2. global = true
    3. }
    4. object Zone "rds-netmon" {
    5. endpoints = [ "rds-netmon" ]
    6. parent = "it-netmon"
    7. }
    8. object Endpoint "rds-netmon" {
    9. host = "" //the master actively tries to connect to the client
    10. }

    satellite host cofigure to

    1. accept_config = true
    2. accept_commands = true

    in master host i create folder /etc/icinga2/zones.d/rds-netmon/
    where i create file for satellite and client

    client configuration file include information about zone and endpoint

    after restart service icinga on master
    files copy to satellite and in Icinga web i see zone, host and service satellite.

    for configuration windows client i use powershell script fron icinga director
    i edit script modificate information about parent zone and icinga2.config

    as result file icinga2.cong on client

    all service restart without errors

    on master in icinga web 2
    status for client zones as pending (

    where am I wrong,

  • Hi!

    The solution is very simple!

    Icinga2 does not know how often it should check your host or service. So basically you need to specify that. You can make a host/service template, use the existing "generic-host"/"generic-service" template or specify it manually for each host/service.

    If you change your DC host config like this, it will work:

    Regards, Anton.

  • Thank you reply Anton/
    it s realy simple solution
    I did it, but the problem remained

    in satellite icinga log

    warning/ApiListener: Discarding 'config update object' message from 'DC'.
    warning/TlsStream: TLS stream was disconnected.

    any idea?

  • I del sync file from master to sattellite

    and now in icinga web
    host up
    services (ping) pending

  • Thank you Anton

    I don't understand how it works (

    i create host and write in config file
    check_command = "hostalive"

    hostalive its alias to ping

    when in the icinga web the host alive (state UP) is the result of hostalive?
    where additional service ping?
    and why host is UP, service is PENDING?

  • I'm not sure if this is correct, but the host is not pending because you specified how often you want to check it (with generic-host template). Even if you are using ping for checkalive - that is a host check. The ping service probably does not have a generic-service template so icinga does not know when she should check the service.

    The part of learning icinga was a nightmare for me. I've spent so much time trying to set up a simple system like yours (master with satellite and clients). I even found a mistake in the documentation (which was corrected later on).

    In which folder you have your satellite host config file? It should be int master's folders inside of zones.d because satellite can not check itself so master should check satellite. All the hosts checked by satellite host should be in satellite's folder inside of zones.d.

    I will post here a basic config for master, satellite client. I have it working on my test virtual machines.

    Regards, Anton.

  • Hi.

    This part was the one i missed so much in the documetation - working config. Here is a simplest master, satellite, client setup.

    To make everything work connect the master with satellite with icinga2 node wizard. Then connect the client1 with satellite (When being asked for the master endpoint providing CSR auto-signing capabilities, please add the master node which holds the CA and has the ApiListener feature configured and enabled. The parent endpoint must still remain the satellite endpoint name.).

    When everything is connected - modify this files in your default icinga installation.

    Master files:

    Satellite config files

    Client1 config

    And basicaly that's all the config needed! All the checks are executed, nothing is pending and you can start adding your services and hosts. I hope this will help you!

    Regards, Anton

  • Anton, thank you so much for the detailed and thorough reply. configuration files are the same, but the services still in state pending.
    Moreover, the addition of new services does not lead to an increase in Icinga Web.
    I'll try to disable the zone Icinga director for the satellite and see what has changed.
    I will give you your configuration files, and maybe your "fresh eyes" will find an invisible fault.

  • Hi.

    Yes, post all your config here and i will hava a look.

    Try to remove all the files from folder /var/lib/icinga2/api/ in master and satellite.

    Also make sure that the api setting for accept commands and accept config is enabled on satellite!

    Regards, Anton.

  • Hi Anton,
    I deleted the files and folders from the specified directory and the result is strange, but all in order

    Server name - it-netmon
    Icinga 2.5
    Icinga Web 2.4
    Icinga Director 1.2

    Icinga Director manage local maste host & services

    Server name - rds-netmon
    accept commands and accept config is enabled
    local configuration disable

    Server name - DC
    accept commands and accept config is enabled
    local configuration disable

    master config file

    root@it-netmon:~# tree /etc/icinga2/zones.d/
    ├── global-templates
    │ ├── satellite.conf
    │ └── templates-services.conf
    ├── rds-netmon
    │ ├── DC.conf
    │ ├── hosts.conf
    │ ├── iwc-exchange01.conf
    │ ├── rds-netmon-services.conf
    │ ├── sp01.conf
    │ └── sql01.conf
    └── README

    satelline host configuration file

    Code: host.conf
    1. object Host "rds-netmon" {
    2. import "satellite-host"
    3. check_command = "hostalive"
    4. display_name = "Хост мониторинга сервера RDS"
    5. address = ""
    6. vars.client_endpoint = name //follows the convention that host name == endpoint name
    7. vars.os_name = "Linux Ubuntu 16.04"
    8. }

    satellite service conf file copy icinga localhost service conf file

    client conf file

    Configuration files on satellite server

    root@rds-netmon:~# tree /var/lib/icinga2/api/zones/
    ├── global-templates
    │ └── _etc
    │ ├── satellite.conf
    │ └── templates-services.conf
    └── rds-netmon
    └── _etc
    ├── DC.conf
    ├── hosts.conf
    ├── iwc-exchange01.conf
    ├── rds-netmon-services.conf
    ├── sp01.conf
    └── sql01.conf

    4 directories, 8 files

    root@rds-netmon:~# icinga2 feature list
    Enabled features: api checker command mainlog

    Configuration file Client

    a strange result check on master icinga web about which I wrote above

    Service CPU Load
    Plugin output
    execvpe(/usr/lib/nagios/plugins/check_load.exe) failed: No such file or directory

  • Hi!

    Sorry for a late reply, i've been on holidays!

    The first thing that is not correct is the place where you have you host.conf satellite file. It should be in zones.d/it-netmon/ and also all the related files to the satellite should be there (rds-netmon-satellite.conf). Satellite can not monitor itself, so master should do it! That's why you shold place that config in master zone folder.

    Can you show satellite-host and satellite-service template? Is it in zones.d/global-templates/satellite.conf ?

    I would also reccomend to clean the directory /var/lib/icinga2/api/ in all your servers.

    Regarding this error:

    execvpe(/usr/lib/nagios/plugins/check_load.exe) failed: No such file or directory

    Did the file exist on the monitored host? Also looks like the variable host.vars.remote_client is not defined in any host!

    Check that config and give it a try!

    By the way, I'm Russian, where are you from? Looks like you speak russian!

    Regards, Anton.

  • Hi Anton,
    С новым Годом Вас и спасибо что помогаете.

    I'm from Russia too, I'm not sure that the transition to the Russian language allowed to or correct on this forum.

    all satellite and client configuration files include in directory call as satelline host

    root@it-netmon:~# ls -la /etc/icinga2/zones.d
    total 20
    drwxr-xr-x 4 root root 4096 дек. 21 23:17 .
    drwxr-x--- 9 nagios nagios 4096 дек. 21 23:17 ..
    drwxr-xr-x 2 root root 4096 дек. 29 20:28 global-templates
    drwxr-xr-x 3 root root 4096 дек. 29 21:43 rds-netmon
    -rw-r--r-- 1 root root 133 сент. 1 08:53 README

    I understand what the problem is ).
    you are at the beginning of our communication correctly drew attention to the templates, but then I misinterpreted your advice

    satellite-host and satellite-service template i take from /etc/icinga2/conf.d
    in this file nothing information about check.

    i copy file with generic templates in global-templates folder and write import this templates to satellite file.

    Code: templates-generic.conf
    1. template Host "generic-host" {
    2. max_check_attempts = 3
    3. check_interval = 1m
    4. retry_interval = 30s
    5. check_command = "hostalive"
    6. }

    Code: tmplates-satellite.conf
    1. template Host "satellite-host" {
    2. import "generic-host"
    3. vars.notification["mail"] = {
    4. groups = [ "IT" ]
    5. }
    6. }

    after restart icinga service on master, CPU check work correct.
    it resolve one problem

    i run
    icinga2 object list --type Service --name "DC*"

    Object 'DC!ping4' of type 'Service':
    % declared in '/etc/icinga2/conf.d/services.conf', lines 26:1-26:21
    * __name = "DC!ping4"
    * action_url = ""
    * check_command = "ping4"
    % = modified in '/etc/icinga2/conf.d/services.conf', lines 29:3-29:25
    * check_interval = 60
    % = modified in '/etc/icinga2/zones.d/global-templates/templates-generic.conf', lines 12:3-12:21

    Object 'DC!CPU Load ' of type 'Service':
    % declared in '/etc/icinga2/zones.d/rds-netmon/DCconf', lines 21:1-21:25
    * __name = "DC!CPU Load "
    * action_url = ""
    * check_command = "load-windows"
    % = modified in '/etc/icinga2/zones.d/rds-netmon/DC.conf', lines 23:3-23:32
    * check_interval = 60
    % = modified in '/etc/icinga2/zones.d/global-templates/templates-generic.conf', lines 12:3-12:21

    I think that after the transfer of the service description in a global-templates folder - everything is working fine!

    BR, Pavel

    The post was edited 3 times, last by orsa: formating text ().