Smart Proxy Icinga Monitoring

Problem:
cannot get Monitoring Proxy to work after following documents, instead i get the following each time I try to provision a node with Monitoring Proxy selected
Failed to create a monitoring object allan-redshaw.xxx.net: ERF12-4778 [ProxyAPI::ProxyException]: Unable to create monitoring host object for allan-redshaw.xxx.net ([RestClient::NotFound]: 404 Not Found) for proxy https://hmjump.xxx.net:8443/monitoring and Failed to undo update compute oVirt-Compute-Resource (oVirt)
Expected outcome:
expect it to work and node having monitoring tab and also showing up in icingaweb2
Foreman and Proxy versions:

Foreman and Proxy plugin versions:
1.24.2
Distribution and version:
CentOS 7.7
Other relevant data:
/var/log/icinga2/icinga2.log

[2020-03-31 22:16:38 -0400] critical/ApiListener: Client TLS handshake failed (from [192.168.11.17]:44374): Operation canceled
[2020-03-31 22:16:39 -0400] critical/ApiListener: Client TLS handshake failed (from [192.168.11.17]:44376): Operation canceled
[2020-03-31 22:16:40 -0400] critical/ApiListener: Client TLS handshake failed (from [192.168.11.17]:44378): Operation canceled
[2020-03-31 22:16:41 -0400] critical/ApiListener: Client TLS handshake failed (from [192.168.11.17]:44380): Operation canceled
[2020-03-31 22:16:42 -0400] critical/ApiListener: Client TLS handshake failed (from [192.168.11.17]:44382): Operation canceled
[2020-03-31 22:16:43 -0400] critical/ApiListener: Client TLS handshake failed (from [192.168.11.17]:44384): Operation canceled
[2020-03-31 22:16:44 -0400] critical/ApiListener: Client TLS handshake failed (from [192.168.11.17]:44386): Operation canceled
[2020-03-31 22:16:45 -0400] critical/ApiListener: Client TLS handshake failed (from [192.168.11.17]:44388): Operation canceled
[2020-03-31 22:16:46 -0400] critical/ApiListener: Client TLS handshake failed (from [192.168.11.17]:44390): Operation canceled
[2020-03-31 22:16:47 -0400] critical/ApiListener: Client TLS handshake failed (from [192.168.11.17]:44392): Operation cancel

/var/log/foreman-proxy/proxy.log

usr/share/gems/gems/logging-2.2.2/lib/logging/diagnostic_context.rb:474:in `call'
/usr/share/gems/gems/logging-2.2.2/lib/logging/diagnostic_context.rb:474:in `block in create_with_logging_context'
2020-03-31T22:25:17  [E] Error while monitoring: Permission denied - /etc/foreman-proxy/monitoring/foreman.key
/usr/share/gems/gems/smart_proxy_monitoring-0.1.2/lib/smart_proxy_monitoring_icinga2/icinga2_client.rb:99:in `read'
/usr/share/gems/gems/smart_proxy_monitoring-0.1.2/lib/smart_proxy_monitoring_icinga2/icinga2_client.rb:99:in `key'
/usr/share/gems/gems/smart_proxy_monitoring-0.1.2/lib/smart_proxy_monitoring_icinga2/icinga2_client.rb:119:in `certificate_request?'
/usr/share/gems/gems/smart_proxy_monitoring-0.1.2/lib/smart_proxy_monitoring_icinga2/icinga2_client.rb:54:in `events_socket'
/usr/share/gems/gems/smart_proxy_monitoring-0.1.2/lib/smart_proxy_monitoring_icinga2/icinga2_api_observer.rb:22:in `block in monitor'
/usr/share/gems/gems/smart_proxy_monitoring-0.1.2/lib/smart_proxy_monitoring_icinga2/icinga2_api_observer.rb:19:in `loop'
/usr/share/gems/gems/smart_proxy_monitoring-0.1.2/lib/smart_proxy_monitoring_icinga2/icinga2_api_observer.rb:19:in `monitor'
/usr/share/gems/gems/smart_proxy_monitoring-0.1.2/lib/smart_proxy_monitoring_icinga2/icinga2_api_observer.rb:58:in `block in do_start'
/usr/share/gems/gems/logging-2.2.2/lib/logging/diagnostic_context.rb:474:in `call'
/usr/share/gems/gems/logging-2.2.2/lib/logging/diagnostic_context.rb:474:in `block in create_with_logging_context'

At a lost as to what is missing. Would really like to get this working… Any assistance is appreciated

Perhaps @TimoGoebel knows more.

He doesn’t, but perhaps @Dirk knows something.

1 Like

I have somewhere on my ToDo list to verify the Plugin works still after the major rewrite of the networking components of Icinga 2 with 2.11, but I did not find the time yet.

From the logs I see the error:

2020-03-31T22:25:17  [E] Error while monitoring: Permission denied - /etc/foreman-proxy/monitoring/foreman.key

Perhaps fixing this is enough? I would guess the files are owned by root and other has no read access to the key, giving it to foreman-proxy as the owner would solve it then.

I tried changing to different permission and still didn’t fix. Last change was to make that key file 0775. The permission denied error went away but the bigger issue is still there.

Unable to save * Failed to create a monitoring object node1.xxx.net: ERF12-8936 [ProxyAPI::ProxyException]: Unable to create monitoring host object for node1.xxx.net ([RestClient::NotFound]: 404 Not Found) for proxy https://hmjump.xxx.net:8443/monitoring

  • Failed to undo update compute oVirt-Compute-Resource (oVirt) instance node1.xxx.net: Ovirt client returned an error: Network interface name is already in use

The ovirt issue would be obvious so i am not concerned about it. I think it is because this failed.
FYI, I am not trying using the Puppet Forge icinga2 module and getting the same issues.
If there is a workaround or some ideas of what to tweak I would like to give that a try. Thanks.

NOTE:FYI, I am not trying = FYI, I am now using …