Creating a second webpage

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
nathanplatt
Posts: 267
Joined: Thu May 07, 2015 4:59 am

Creating a second webpage

Post by nathanplatt »

Hi Guys/Girls,

We currently use a RPi to display the map on a TV screen in HO, I'm trying to create a new page that will only show the map, I don't ant the details on the left hand to show this screen is for quick display purposes only, I do the management from my own PC.

I was trying to create another page and point the display at this but every time I try the map doesn't show. Any ideas how I can do this? Currently i have the map frame showing with the details on the left.

Also I'll like to make the map viewable by unauthorised people, can I do this, and if so, how?

Nathan
User avatar
rhassing
Posts: 416
Joined: Sat Oct 05, 2013 10:29 pm
Location: Netherlands

Re: Creating a second webpage

Post by rhassing »

You could open http://<hostname>/nagios/cgi-bin/statusmap.cgi?host=all for the map only (without the rest on the left).
Rob Hassing
Image
nathanplatt
Posts: 267
Joined: Thu May 07, 2015 4:59 am

Re: Creating a second webpage

Post by nathanplatt »

That does get rid of the frame on the right, but I just want a page that shows the map only.
User avatar
rhassing
Posts: 416
Joined: Sat Oct 05, 2013 10:29 pm
Location: Netherlands

Re: Creating a second webpage

Post by rhassing »

Maybe the newer version (depending on your Nagios version)

http://<hostname>/nagios/map.html?host=all
Rob Hassing
Image
nathanplatt
Posts: 267
Joined: Thu May 07, 2015 4:59 am

Re: Creating a second webpage

Post by nathanplatt »

I'm running 4.1.0rc1, this is bit i don't want to see;

Network Map for All Hosts
Last Updated: Wed Oct 14 13:03:24 2015
Nagios® Core™ 4.1.0rc1 - www.nagios.org
Updated every 10 seconds
Logged in as nagiosadmin
View Status Detail For All Hosts
View Status Overview For All Hosts
User avatar
rhassing
Posts: 416
Joined: Sat Oct 05, 2013 10:29 pm
Location: Netherlands

Re: Creating a second webpage

Post by rhassing »

Maybe you can check the html code of the map.html file and try to comment out what you don't want to see.
Rob Hassing
Image
nathanplatt
Posts: 267
Joined: Thu May 07, 2015 4:59 am

Re: Creating a second webpage

Post by nathanplatt »

I was considering that but I need to have that viewable on 1 PC but not on another one... i just want the RPi to have the map only, and every other PC looking normal
User avatar
rhassing
Posts: 416
Joined: Sat Oct 05, 2013 10:29 pm
Location: Netherlands

Re: Creating a second webpage

Post by rhassing »

The file could be copied to another directory. For each directory you van setup a different .htaccess file.
You could even have the .htaccess file redirect a certain ip address to the adjusted file, but that could be a bit more complicated.
Rob Hassing
Image
nathanplatt
Posts: 267
Joined: Thu May 07, 2015 4:59 am

Re: Creating a second webpage

Post by nathanplatt »

So would i need to duplicate the share folder , if so how would i tell Apache that its a different site? Could I not just create another index page and call it something else, directing the RPi to that page instead?
User avatar
rhassing
Posts: 416
Joined: Sat Oct 05, 2013 10:29 pm
Location: Netherlands

Re: Creating a second webpage

Post by rhassing »

nathanplatt wrote:So would i need to duplicate the share folder , if so how would i tell Apache that its a different site? Could I not just create another index page and call it something else, directing the RPi to that page instead?
As I said:
You could even have the .htaccess file redirect a certain ip address to the adjusted file, but that could be a bit more complicated.

The answer might be found here:
http://stackoverflow.com/questions/9911 ... e-htaccess

You could create a rule that certain ip addresses redirect to a different url or file.

In a normal installation you would have /var/www/html as your default DocumnetRoot for Apache. If you copy just the adjusted map.html file in this directory should be enough.
Rob Hassing
Image
Locked