Posts by svojmajstor

This forum was archived to /woltlab and is now in read-only mode.


    I am little bit confused regarding api-users.conf file. What is the function of it?

    Where should it be?

    Is it the same like every other object?


    OK, I know I could do that.

    But I thought since the file was mentioned more than few times in this thread and the thread is partially about that certain file, it would be more convenient to have an answer here to be clear where is the file people are talking about.

    I think that it would be much simpler to give an straight answer than raising a new thread in this case.


    Maybe you should provide more information, did you check logs? do you create host via Director as well?

    What do you men by:


    I recently installed the latest version of Icinga, and later you say: I would like to upgrade my Icinga 1 environment to this new setup.

    Which version do you actually use?

    Thanks for all the answers, I just realized that i had the mistake in the configuration. I had services.conf file and the ssh.conf file which obviously caused this. I have deleted ssh.conf and inserted in services.conf "assign where "workstations" in" and now it looks fine.

    Thank you very much all

    OK, you are right. I can use that and when I try there are some weird things happening:

    So, I have two PCs with the "server_type: desktop" custom var assigned on both. Furthermore I have

    hostgroup called "workstations" which contain PC_1 and PC_2 as you already know right.

    Group conf:

    1. object HostGroup "workstations" {
    2. display_name = "Workstations"
    3. assign where host.vars.server_type == "desktop"
    4. }

    So when I do as you said:

    1. object ServiceGroup "ssh" {
    2. display_name = "ssh"
    3. assign where "workstations" in
    4. }

    This is what I see in the servicegroup tab on web interface:

    There are Ping services running for group "workstations", but why do I see Ping services here?

    Thank you for the answer, i see there are many options.

    I have another question. Is it possible to assign the service to the hosts through the hostgroup?

    I did not see anything in the documentation, maybe I missed it.

    I have tried something like:

    1. apply Service "SSH" to Host {
    2. display_name = "SSH Test"
    3. check_command = "ssh"
    4. assign where == "workstations"
    5. }

    Thank you again for your time :)


    I am deploying Icinga2 Via Puppet with Hiera. I have a question regarding groups: How can i assign more hosts to certain group without using attribute "os" and not using attribute "groups" at every host? I have tried to create group called workstations and assign "os==Linux", but in the web interface the group is not called workstations, but Linux Servers (I guess it's about default values). I figured out that i can assign '' and If I use this code it works but what if I have 50 hosts and want them in the certain group? The list under assign would take 50 lines, I guess there is a better one :)

    1. icinga2::object::hostgroup:
    2. workstations:
    3. display_name: 'workstations'
    4. target: '/etc/icinga2/conf.d/workstations.conf'
    5. assign:
    6. - ' == A1'
    7. - ' == A2'

    On the puppet language file /etc/icinga2/conf.d/workstations looks like this:

    1. # This file is managed by Puppet. DO NOT EDIT.
    2. object HostGroup "workstations" {
    3. display_name = "workstations"
    4. assign where == "A1"
    5. assign where == "A2"
    6. }

    if any further documentation/explanation needed, please just say.

    Appreciate any suggestions, ideas.


    I have tested PHP, have installed php7.0-mcrypt, after that i got a few new error messages:

    ... I have tried to change the ports and it is still the same error. Should i change something else?

    Any ideas are very welcome...

    Yes, it is the PHP problem. After creating a info.php file in /var/www/html, when i try to reach the page i see this:

    1. <?php
    2. phpinfo();
    3. ?>

    But apache2 logs nothing:

    Any Ideas how to find the error?

    I have installed Icinga2 version r2.6.2-1 and Icingaweb2 version 2.4.1 on Ubuntu 16.04. (Puppet 4.9) After the Installation i get this error message in the web interface:

    1. <?php
    2. /*! Icinga Web 2 | (c) 2014 Icinga Development Team | GPLv2+ */
    3. require_once '/usr/share/php/Icinga/Application/webrouter.php';

    I have checked Icinga2 logs:

    Apache2 logs:

    1. [Wed Mar 29 19:57:00.006642 2017] [core:notice] [pid 16731:tid 139628752156544] AH00094: Command line: '/usr/sbin/apache2'
    2. [Wed Mar 29 21:21:52.142434 2017] [mpm_event:notice] [pid 16731:tid 139628752156544] AH00491: caught SIGTERM, shutting down
    3. [Wed Mar 29 21:21:53.401936 2017] [mpm_event:notice] [pid 3478:tid 139744287557504] AH00489: Apache/2.4.18 (Ubuntu) configured -- resuming normal operations
    4. [Wed Mar 29 21:21:53.402073 2017] [core:notice] [pid 3478:tid 139744287557504] AH00094: Command line: '/usr/sbin/apache2'
    5. [Wed Mar 29 21:21:54.939963 2017] [mpm_event:notice] [pid 3478:tid 139744287557504] AH00493: SIGUSR1 received. Doing graceful restart
    6. [Wed Mar 29 21:21:54.950393 2017] [mpm_event:notice] [pid 3478:tid 139744287557504] AH00489: Apache/2.4.18 (Ubuntu) configured -- resuming normal operations
    7. [Wed Mar 29 21:21:54.950417 2017] [core:notice] [pid 3478:tid 139744287557504] AH00094: Command line: '/usr/sbin/apache2'
    8. [Wed Mar 29 21:30:44.324674 2017] [mpm_event:notice] [pid 3478:tid 139744287557504] AH00491: caught SIGTERM, shutting down
    9. [Wed Mar 29 21:30:45.514307 2017] [mpm_event:notice] [pid 4681:tid 140711895021440] AH00489: Apache/2.4.18 (Ubuntu) configured -- resuming normal operations
    10. [Wed Mar 29 21:30:45.514444 2017] [core:notice] [pid 4681:tid 140711895021440] AH00094: Command line: '/usr/sbin/apache2'

    I have a list of php modules installed which i will attach to save the space here.

    Any other documentation if needed I will gladly upload.

    Appreciate any try to help. Thanks

    I think that the classes are on the good spot, because it is installed and I am able to login into web interface just after the installation. (Well, I have to import mysql schema for Icingaweb2 manually, because it is not handled by Puppet for now ). After I login there is nothing enabaled + backend database is not chosen (obviously because there is no backends.ini file). I maybe found workaround for now, but still I want to realize what caused my issues.

    Regarding roles and profiles, I might take a deeper look into it, thanks for the advice.

    what do you mean by included? Do you mean that monitoring module should be included as the class itself ?

    like in:

    1. classes:
    2. - icinga2
    3. - ntp
    4. - icingaweb

    Otherwise, yes, i have tried different things with for ex. (THAT WAS DESPERATE MOVE):

    1. icingaweb2::mod::monitoring: :transport: 'local'
    2. icingaweb2::mod::monitoring: :transport_path: 'path to icinga cmd'

    Another thing I have realized is that all of three files: backends.ini, config.ini, commandstransports.ini from the module icingaweb2 were not created at all ?

    module part:

    1. $monitoring_mod_files = [
    2. "${::icingaweb2::config_dir}/modules/monitoring/backends.ini",
    3. "${::icingaweb2::config_dir}/modules/monitoring/config.ini",
    4. "${::icingaweb2::config_dir}/modules/monitoring/commandtransports.ini",
    5. ]

    Sure, modules: icinga-icinga2 (v1.1.1), icinga-icingaweb2 (v1.0.4), puppet version 4.9.4, module monitoring: Version: 2.4.1


    1. ---
    2. :backends:
    3. - yaml
    4. :yaml:
    5. :datadir: "/etc/puppetlabs/code/environments/production/hieradata"
    6. :hierarchy:
    7. - "nodes/%{::trusted.certname}"
    8. - common

    /etc/puppetlabs/code/environments/production/manifests/site.pp file contains: "If anything else is needed in purpose to help me please just note and I will add it"



    I have realized that it might be connected with the further issue: when I have started icingaweb2 and logged in through web interface, all modules were disabled and I was able to enable it only manually but not with puppet. I have tried different variations, but i could not get it enabled. I have tried something like this on

    1. icingaweb2::mod::monitoring::transport_host: 'localhost'
    2. icingaweb2::mod::monitoring::transport_port: 'port number'
    3. icingaweb2::mod::monitoring::transport_username: 'name'
    4. icingaweb2::mod::monitoring::transport_password: 'pass'

    Thanks for help, I appreciate it

    Hello, I have a problem with configuring command transport. I am using Icinga2, icingaweb2 via puppet (latest releases). OS: Ubuntu 16.04. I am doing all the configuration through yaml file (with Hiera). All needed modules are installed (web interface works fine), but the only thing which i can not configure is transport. Error message from web interface:

    In my yaml file i tried something like this:

    1. icingaweb2::mod::monitoring::transport: 'local' ## I have tried some things even though they are stetted by default
    2. icingaweb2::mod::monitoring::transport_path: '/run/icinga2/cmd/icinga2.cmd'
    3. icingaweb2::mod::monitoring::transport_port: '80'
    4. icingaweb2::mod::monitoring::transport_host: ''

    The thing is i now that i could manually create or copy the needed file, but i need to do it via puppet (with Hiera).

    Appreciate any help