Viewing graphs in external web application

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
r.jaynes
Posts: 58
Joined: Wed May 19, 2010 1:27 pm

Viewing graphs in external web application

Post by r.jaynes »

Howdy!

We have a customer support portal for some of our services, and as part of that we would like to provide graphs that are monitored in our Nagios XI. Are there resources (that I have missed) to do this, or would someone have a suggestion on how to proceed? Basically we want Customer X to login to their own portal, and view their network or server charts.

Thank you,

Ryan
tonyyarusso
Posts: 1128
Joined: Wed Mar 03, 2010 12:38 pm
Location: St. Paul, MN, USA
Contact:

Re: Viewing graphs in external web application

Post by tonyyarusso »

I can think of two ways to approach this:

1) Let them just log into XI and look at stuff directly. The way user permissions work they will only see the hosts & services they have been given access to. This is explained in more detail in the document Multi-Tenancy With Nagios XI.

2) Link to images directly from a separate portal application. They are generated on the fly based on URL parameters, so for instance the 24-hour view of the Ping service on localhost here in the office can be accessed at http://192.168.5.57/nagiosxi//includes/ ... vice_id=86
Tony Yarusso
Technical Services
___
TIES
Web: http://ties.k12.mn.us/
r.jaynes
Posts: 58
Joined: Wed May 19, 2010 1:27 pm

Re: Viewing graphs in external web application

Post by r.jaynes »

Tony,

I didn't realize it would be so simple (in regards to #2). Are there any permissions problems with referencing the image directly?

Thank you!
r.jaynes
Posts: 58
Joined: Wed May 19, 2010 1:27 pm

Re: Viewing graphs in external web application

Post by r.jaynes »

It looks like there may be. When I try to browse to an image directly with out having previously logged in I get "Your session has timed out." Is there someway around this?
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Viewing graphs in external web application

Post by mguthrie »

....sort of...

It's a little bit of a hackjob since this feature isn't officially built into XI, but if you're ok with a workaround, you can access your pnp graphs by going to http://192.168.5.80/nagios/pnp/index.php?host=localhost. This directory is protected by Apache's basic authentication, but you could create a dummy user for apache and put the login credentials in the url. However, it should be noted that user would have web access to anything under the nagios core directory.

XI uses session based authentication, and I know there's a workaround that too, but you'd have to write a custom PHP script to do it, and I couldn't tell you off hand how to do it.
tonyyarusso
Posts: 1128
Joined: Wed Mar 03, 2010 12:38 pm
Location: St. Paul, MN, USA
Contact:

Re: Viewing graphs in external web application

Post by tonyyarusso »

Ah, true, the authentication bit. You could also edit the Apache config to have a separate authentication realm that just grants access to the PNP directory I would think, and then you wouldn't have to worry about them having access to the rest of Nagios Core.
Tony Yarusso
Technical Services
___
TIES
Web: http://ties.k12.mn.us/
Locked