Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ICINGA2 issue with Zone and Satellite #25

Open
bmx0r opened this issue Mar 7, 2019 · 6 comments
Open

ICINGA2 issue with Zone and Satellite #25

bmx0r opened this issue Mar 7, 2019 · 6 comments

Comments

@bmx0r
Copy link

bmx0r commented Mar 7, 2019

Hi,
I setup a monitoring proxy to target a icinga2 master that belongs to "ZoneA" when I deploy a host, he is created in "ZoneA" in icinga2 and visible in the GUI (icingaweb).
For a different network zone I use a Icinga2 satellite that belongs to "ZoneB".

When I deploy a host in this ZoneB, thru the previously mention monitoring proxy, foreman seems to assign the ZoneA.

Therefore I create another monitoring proxy pointing to my Icinga2 SAtellite in ZoneB, here i can see that the host is created, i can even see that he is checked (thru the foreman sync status) but when I look at my icingaweb2 the host does not show up...

According to the following issue it might be normal: Icinga/icinga2#6052

Maybe I miss something obvious,... maybe we could pass the zone as a parameter from foreman? (i'm keen to make a PR if someone show me where it should be added, I'm not a ruby fan :p )

Maybe it is related to my icingaweb2 config?

Any help would be really appreciate

@dgoetz
Copy link
Member

dgoetz commented Mar 7, 2019

If I understand it correctly, the problem is you create the host in a different zone than master. Sync is only top-down in the hierarchy so from master to satellite.
So what you would need is the possibility to set different templates (one without zone or the master zone and another with satellite zone), but unfortunately this is not implemented yet. The smart proxy could handle it but there is no GUI for it: theforeman/foreman_monitoring#18

@bmx0r
Copy link
Author

bmx0r commented Mar 7, 2019

Thanks for this fast answer, indeed I didn't thought that I could workaround this by defining the zone in another icinga Host template.
About the GUI... IMHO it should be "just" getting a host(group) variable, if you point we where in the code it should be done, i might have a look at it but maybe it is more something relate to the plugin than the proxy?

@dgoetz
Copy link
Member

dgoetz commented Mar 8, 2019

I am still not very familiar with the UI part, so perhaps @timogoebel can help here.
I think for setting this on host or hostgroup it would need an additional tab, which allows to set the template and additional parameters to be send to the smart proxy.

@bmx0r
Copy link
Author

bmx0r commented Mar 19, 2019

I also find this: https://github.com/theforeman/foreman_monitoring/blob/master/app/models/concerns/foreman_monitoring/host_extensions.rb
in monitoring_attributes it seems that the theforeman_monitoring is gathering attribute ans set them to the host, which are then posted to the proxy somehow...

@bmx0r
Copy link
Author

bmx0r commented Mar 26, 2019

I don't think i have the skills to create a PR :/
I also find this : https://github.com/theforeman/smart_proxy_monitoring/blob/master/lib/smart_proxy_monitoring_icinga2/monitoring_icinga2_main.rb#L105
Which make me think the proxy is ready and I should be able to add a Host Parameters called "templates"
But i guess this host parameters must be added here first : https://github.com/theforeman/foreman_monitoring/blob/master/app/models/concerns/foreman_monitoring/host_extensions.rb#L56

maybe by adding something like this
:owner_name => owner.try(:name), :templates => templates.try(:to_s),

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants