I have setup Icinga2, Icingaweb2, icingadirector and graphite/grafana on the same host.
This works. But now i have two questions:
is it correct, that I don’t find my master in icingaweb – Icinga-Director – Hosts? So I can’t add any new service for my master?
In graphana for a dashboard i find the variable $icinga_master. Do you know where I find this to set? Grafana find my master and my Host, but not when I use $icinga_master
Hi
The master is either listed as “localhost” or with the device internal IP.
if you are unsure if it is defined, run in the CLI
icinga2 daemon -C
That should give you a list of all the object (summed) you have defined and if there is an issue in any part of the configuration it will indicate to it.
Thank you. Sorry I’m not completly sure if you meean the command for the variable or for my question why I don’t see the Master under Icinga-Director. So I try to write the answer.
Under Icingaweb2 --> Icinga-Director --> Hosts I have only my added host and not my Master.
Under Icingaweb2 --> Overview and hosts I find my master.
With icinga2 daemon -C i don’t see the icinga_master
@rsx you mean the File /etc/icinga2/conf.d/hosts.conf? This is with the default settings and not with the host Name. Givs a way to add this in the director with the exists services?
Yes, these conf files are just examples and it’s recommended to not use them especially if you use the director.
To fix it just remove or comment out
include_recursive “conf.d”
in your /etc/icinga2/icinga2.conf, reload icinga2 and then start adding your master to the director as well as the services. Please keep in mind that you should not configure services for every single hosts (as in Nagios/Icinga 1) but use the apply concept instead.
@rsx great. Only that i understand.
When i comment out, my hosts is not listet longer. Now I must add the host manually and add all the services manually in director? That is no problem.
EDIT: Sorry I don’t have see the the second part. You have answered this. Thank you
Do you have an idea for the variable $icinga_master from grafite where I can set this?
@rsx sorry my fail. I mean grafana. When I go to grafana and import the dashboard 5009, there is a variable $icinga_master. But this don’t work. I must change the value with my master host. So i had the hope that I can set this variable $icinga_master
One question for add the new Host (Icinga 2 Master). When I comment out and insert the new host, I get the error “Unable to detect your Icinga 2 Core version” on push my changes
yes
I have comment out the line and restart icinga. Now my Icinga2 Master is not longer listet in the Overview.
After this. I go to Icinga Direcetor and add Host wit my dns name. After this a roll out my changes. Now I get this error
One question for add the new Host (Icinga 2 Master).
With icinga2 daemon -C I geht two warnings, but I don’t know why the service is not ok.
[2020-02-26 10:49:35 +0100] warning/ApplyRule: Apply rule 'Service - Icinga 2 Server - Hostalive' (in /var/lib/icinga2/api/packages/director/2c544f07-bd74-4a39-963c-c6c9ae58f512/zones.d/director-global/service_apply.conf: 1:0-1:52) for type 'Service' does not match anywhere!
[2020-02-26 10:49:35 +0100] warning/ApplyRule: Apply rule 'Service - Icinga 2 Server - Ping 4' (in /var/lib/icinga2/api/packages/director/2c544f07-bd74-4a39-963c-c6c9ae58f512/zones.d/director-global/service_apply.conf: 12:1-12:50) for type 'Service' does not match anywhere!
I have reinstall, and have uncomment the conf files before I have installed the director. Now it works.
I geht in icingaweb2 under Icinga Director this hint:
Your DB schema (migration #170) is newer than your code base. Downgrading Icinga Director is not supported and might lead to unexpected problems.
I think this is only a information and can be ignored, or givs a change to disable this?