Giter Club home page Giter Club logo

Comments (11)

icinga-migration avatar icinga-migration commented on May 28, 2024

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.

icinga-migration avatar icinga-migration commented on May 28, 2024

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.

icinga-migration avatar icinga-migration commented on May 28, 2024

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.

icinga-migration avatar icinga-migration commented on May 28, 2024

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.

icinga-migration avatar icinga-migration commented on May 28, 2024

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

but rather looks like this:

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.

icinga-migration avatar icinga-migration commented on May 28, 2024

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.

icinga-migration avatar icinga-migration commented on May 28, 2024

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.

icinga-migration avatar icinga-migration commented on May 28, 2024

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.

icinga-migration avatar icinga-migration commented on May 28, 2024

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.

icinga-migration avatar icinga-migration commented on May 28, 2024

Updated by mfriedrich on 2015-11-20 12:32:35 +00:00

  • Project changed from 58 to PNP

from icingaweb2-module-pnp.

icinga-migration avatar icinga-migration commented on May 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.