icingaweb2-module-pnp icon indicating copy to clipboard operation
icingaweb2-module-pnp copied to clipboard

[dev.icinga.com #13763] Possibility to have Icingaweb2 and PNP on different servers

Open icinga-migration opened this issue 8 years ago • 4 comments
trafficstars

This issue has been migrated from Redmine: https://dev.icinga.com/issues/13763

Created by tontonitch on 2016-12-25 22:52:01 +00:00

Assignee: (none) Status: New Target Version: (none) Last Update: 2017-01-03 09:03:13 +00:00 (in Redmine)


Hi, Currently, the Icinga Web 2 Module for PNP seems to work only when having the PNP software on the same server. It would be nice to be able to have PNP running on a different server, for exemple in a clustered Icinga2/Icingaweb2 environment. Best regards, Yannick


Relations:

icinga-migration avatar Dec 25 '16 22:12 icinga-migration

Updated by tgelf on 2017-01-02 16:26:05 +00:00

  • Relates set to 8582

icinga-migration avatar Jan 02 '17 16:01 icinga-migration

Updated by ClemensBW on 2017-01-03 09:03:13 +00:00

Hello, you can change the base_url at /etc/icingaweb2/modules/pnp4nagios/config.ini:

[pnp4nagios]
config_dir = "/etc/pnp4nagios"
base_url = "https://monitoring.domain.tld/pnp4nagios"

and hack, if you like your apache config with a rewrite rule for the other server (here as https reverse proxy):

SSLProxyEngine On
ProxyPass /pnp4nagios https://pnpserver.domain2.tld/pnp4nagios
ProxyPassReverse /pnp4nagios https://pnpserver.domain2.tld/pnp4nagios

Now you can reach your pnp4nagios with https://monitoring.domain.tld/pnp4nagios (your default icingaweb2 server), but the source is https://pnpserver.domain2.tld/pnp4nagios (your pnp server)

icinga-migration avatar Jan 03 '17 09:01 icinga-migration

This would need updated methods to check if there is actually performance data in PNP.

Currently the module accesses the XML files locally. Could we do this by HTTP?

lazyfrosch avatar Aug 15 '17 08:08 lazyfrosch

Unfortunately there's no http api. There is a draft somewhere which exposes metrics for the Grafana data fetcher, but I doubt it has been released or merged yet. I don't think that it exposes everything you need from the XMLs too.

https://github.com/lingej/pnp-metrics-api

dnsmichi avatar Aug 15 '17 08:08 dnsmichi