Comments (11)
Updated by tgelf on 2015-03-03 15:26:55 +00:00
Hi Mathias,
what is your base Icinga Web 2 url? Are you running it at the root (/) of a dedicated domain? If so, you must configure PNP4Nagios to run at an URL different from /pnp4nagios as it would collide with /pnp4nagios from this Icinga Web 2 module.
Cheers,
Thomas
from icingaweb2-module-pnp.
Updated by tgelf on 2015-03-03 15:28:25 +00:00
- Status changed from New to Feedback
- Assigned to set to mathiasaerts
from icingaweb2-module-pnp.
Updated by mathiasaerts on 2015-03-03 16:08:29 +00:00
tgelf wrote:
Hi Mathias,
what is your base Icinga Web 2 url? Are you running it at the root (/) of a dedicated domain? If so, you must configure PNP4Nagios to run at an URL different from /pnp4nagios as it would collide with /pnp4nagios from this Icinga Web 2 module.
Cheers,
Thomas
Hi Thomas,
Thanks for your quick reply!
I was indeed running Icingaweb2 in the root of my domain. I changed my apache config so that it is now running in the default location (/icingaweb2).
Unfortunately, this did not solve my issue. The small graphs are still displayed, but clicking them returns a "Server error: Service not found" error (I did change the file I mentioned above back to default).
If I understand correctly from your explanation, the module should be accessible on /icingaweb2/pnp4nagios. However, this is not the case (This results in a "Page not found" error).
Best regards,
Mathias
from icingaweb2-module-pnp.
Updated by tgelf on 2015-03-03 16:16:12 +00:00
mathiasaerts wrote:
If I understand correctly from your explanation, the module should be accessible on /icingaweb2/pnp4nagios.
That's partially correct. The module occupies /icingaweb2/pnp4nagios in your current configuration, but it has no own "base url" as there is nothing "generic" it could show. That explains this issue:
However, this is not the case (This results in a "Page not found" error).
When you click on a small icon, this should open a link like this one:
/icingaweb2/pnp4nagios?host=localhost&srv=ping&view=3
That URL builds nothing but a very simple iFrame and will load the "real" PNP4Nagios url as follows:
/pnp4nagios/graph?host=localhost&srv=ping&view=3
Works fine for me - but this does by no way mean that we are bug-free ;) So please, dig deeper we'll find a solution for you.
Cheers,
Thomas
from icingaweb2-module-pnp.
Updated by mathiasaerts on 2015-03-03 16:40:39 +00:00
Thanks for your feedback!
Clicking the small graph, it does indeed point to a url like
/icingaweb2/pnp4nagios?host=localhost&srv=ping&view=3
However, the page opened in the iFrame does not redirect to
/pnp4nagios/graph?host=localhost&srv=ping&view=3
When I open this url directly, this is the "Page not found" error I was talking about.
Opening the URL /pnp4nagios/graph... directly does work and points to the working pnp4nagios page.
Best regards,
Mathias
from icingaweb2-module-pnp.
Updated by tgelf on 2015-03-03 16:45:27 +00:00
mathiasaerts wrote:
Clicking the small graph, it does indeed point to a url like
/icingaweb2/pnp4nagios?host=localhost&srv=ping&view=3
Could you please open such link, show the HTML source code in the browser, search for id="col1" and paste me it's HTML? Should be just a div and an iFrame.
Regards,
Thomas
from icingaweb2-module-pnp.
Updated by mathiasaerts on 2015-03-03 16:57:39 +00:00
Aha! Thanks for your insanely fast reply :D it was redirecting to a wrong url.
When I was looking for a fix for the issue I had earlier, I made some changes in IndexController.php as well I forgot about. My bad..
After changing this back, everything does work as expected. Thanks again for your feedback!
If I would like to run icinga2 in the root of my domain, and have to change the default pnp4nagios url, do I also have to point the module to the new pnp4nagios url somehow?
Best regards,
Mathias
from icingaweb2-module-pnp.
Updated by tgelf on 2015-03-03 17:02:56 +00:00
mathiasaerts wrote:
Aha! Thanks for your insanely fast reply :D
You're welcome!
My bad..
NP, glad that it works!
If I would like to run icinga2 in the root of my domain, and have to change the default pnp4nagios url, do I also have to point the module to the new pnp4nagios url somehow?
Correct. Please find instructions for how to tell the module about your new URL at /icingaweb2/pnp4nagios/config :)
Cheers,
Thomas
from icingaweb2-module-pnp.
Updated by mathiasaerts on 2015-03-04 09:00:24 +00:00
Correct. Please find instructions for how to tell the module about your new URL at /icingaweb2/pnp4nagios/config :)
Using the information on this page, I created a config file in /etc/icingaweb2/modules/pnp4nagios/config.ini containing the following:
[pnp4nagios]
config_dir = /etc/pnp4nagios
base_url = /p4n
I also changed my Icinga web 2 base url back to / and the base url for pnp4nagios to /p4n.
Both urls work separately, however the iframe still tries to open /pnp4nagios/graph?host...
It seems like the IndexController is not using the right base url. After changing
$baseUrl = rtrim($this->Config()->get('pnp4nagios', 'base_url', '/pnp4nagios'), '/');
to the following (based on baseUrl used in the Grapher class):
$cfg = $this->Config()->module('pnp4nagios')->getSection('pnp4nagios');
$baseUrl = rtrim($cfg->get('base_url', '/pnp4nagios'), '/');
It does work as expected.
No idea if this is caused by an error on my side or not..?
Best regards,
Mathias
from icingaweb2-module-pnp.
Updated by mfriedrich on 2015-11-20 12:32:35 +00:00
- Project changed from 58 to PNP
from icingaweb2-module-pnp.
Updated by tgelf on 2017-01-02 18:01:04 +00:00
- Status changed from Feedback to Resolved
- Assigned to deleted
mathiasaerts
Closing this issue, should work fine since a long time right now.
from icingaweb2-module-pnp.
Related Issues (20)
- [dev.icinga.com #10725] Error on line 111 of library/Pnp/ProvidedHook/Grapher.php HOT 3
- [dev.icinga.com #10834] twice as many thumbnails as normal HOT 13
- [dev.icinga.com #10863] Show graphs only when data are avialable and wanted HOT 6
- [dev.icinga.com #11233] Extra miniature graph images HOT 4
- [dev.icinga.com #11613] double representation in Icinga2 with PNP HOT 4
- [dev.icinga.com #11703] Allow Access to PNP via module but deny direct access? HOT 3
- [dev.icinga.com #11725] PNP preview w/out module permission HOT 9
- [dev.icinga.com #13763] Possibility to have Icingaweb2 and PNP on different servers HOT 4
- [Feature Request] Set Username+PW for Autologin HOT 1
- Broken thumbnails and incorrect link HOT 1
- Permissions: Forward Icinga Web 2 auth to PNP HOT 4
- Icingaweb2 service page not showing pnp thumbnail HOT 7
- PNP_CONFIG_FILE is not supported
- Thumbnails only show first datasource
- Permissions: No way to grant access to PNP
- Direct link to Service Overview
- Allow to link to special pages
- Function get_magic_quotes_runtime() is deprecated HOT 1
- Dependency of Module does not match existing Icingaweb version HOT 4
- pnp module for icingaweb2 does not work anymore after a package update (no more graphs in icingaweb2) HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from icingaweb2-module-pnp.