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
Viewing graphs in external web application
-
- Posts: 1128
- Joined: Wed Mar 03, 2010 12:38 pm
- Location: St. Paul, MN, USA
Re: Viewing graphs in external web application
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
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
-
- Posts: 58
- Joined: Wed May 19, 2010 1:27 pm
Re: Viewing graphs in external web application
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!
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!
-
- Posts: 58
- Joined: Wed May 19, 2010 1:27 pm
Re: Viewing graphs in external web application
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?
-
- Posts: 4380
- Joined: Mon Jun 14, 2010 10:21 am
Re: Viewing graphs in external web application
....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.
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.
-
- Posts: 1128
- Joined: Wed Mar 03, 2010 12:38 pm
- Location: St. Paul, MN, USA
Re: Viewing graphs in external web application
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.