LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-02-2011, 11:00 AM   #1
junust
Member
 
Registered: Jul 2008
Location: Israel Ramat Gan
Distribution: CentOs 5.3, SuSe 11.1, Solaris 9, Slackware 13
Posts: 81

Rep: Reputation: 15
nagios web GUI change default page


When you first access Nagios, it displays the Home page (the Nagios Core version and check for updates page). I would like to have a way to change the default page to either the Tactical Overview display or the Services display.

This question was asked here, but not answered


http://ideas.nagios.org/a/dtd/13466-3955


So, is there a way to accomplish this

Thanks
 
Old 06-02-2011, 12:42 PM   #2
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,278

Rep: Reputation: 148Reputation: 148
Make the changes on nagios index page to display first page as Tactical Overview
 
1 members found this post helpful.
Old 06-02-2011, 04:38 PM   #3
junust
Member
 
Registered: Jul 2008
Location: Israel Ramat Gan
Distribution: CentOs 5.3, SuSe 11.1, Solaris 9, Slackware 13
Posts: 81

Original Poster
Rep: Reputation: 15
@kirukan

Do you really tried to do this before you answering my question, or it is just for the posts count ?




P.S
without any intent to hurt
 
Old 06-04-2011, 01:50 AM   #4
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,278

Rep: Reputation: 148Reputation: 148
Quote:
Originally Posted by junust View Post
@kirukan

Do you really tried to do this before you answering my question, or it is just for the posts count ?
I don't wanna do chilly things to increase count(If i am, such person at the moment my post count will be more than two thousands or more ). If you wish just go through all of my post how many times I replied Nagios & SNMP related threads and a small information I had integrated Nagios hundreds more time in my work environment.
 
Old 03-27-2012, 01:06 PM   #5
richardlynch
LQ Newbie
 
Registered: Oct 2003
Posts: 8

Rep: Reputation: 0
Quote:
Originally Posted by junust View Post
When you first access Nagios, it displays the Home page (the Nagios Core version and check for updates page). I would like to have a way to change the default page to either the Tactical Overview display or the Services display.

This question was asked here, but not answered


http://ideas.nagios.org/a/dtd/13466-3955


So, is there a way to accomplish this

Thanks
To be more specific for kirukan's answer, which is completely correct and reasonable:
In your /usr/share/nagios/htdocs/index.php file (yours may be somewhere else [1]) there is a line like this:
$corewindow="main.php";

Change it to this:
(or even add it below, to document your over-ride of the default)
$corewindow="cgi-bin/tac.cgi";

[1] To find your nagios index.php, something like this should work:
locate index.php | grep nagios
 
Old 03-27-2012, 01:09 PM   #6
richardlynch
LQ Newbie
 
Registered: Oct 2003
Posts: 8

Rep: Reputation: 0
Quote:
Originally Posted by junust View Post
When you first access Nagios, it displays the Home page (the Nagios Core version and check for updates page). I would like to have a way to change the default page to either the Tactical Overview display or the Services display.

This question was asked here, but not answered


http://ideas.nagios.org/a/dtd/13466-3955


So, is there a way to accomplish this

Thanks
PS
A similar change in side.php in the HTML A link tag would change the "Home" link in the left-hand side, if you so desire.
 
Old 05-26-2015, 06:39 PM   #7
hariboukis
LQ Newbie
 
Registered: May 2015
Posts: 1

Rep: Reputation: Disabled
Graceful solution:

To specify a different page than the home page, use the URL line. Start off with:

YOUR_DOMAIN_NAME/?corewindow=

...then add the link to the page you want to open in the frame:

/nagios/cgi-bin/status.cgi?host=all

So you end up with something like:

YOUR_DOMAIN_NAME/?corewindow=/nagios/cgi-bin/status.cgi?host=all

You can find the page names from the left hand menu in nagios. Just look at what they reference, and extract the end part of that address.

No code modified.

Cheers!
 
Old 07-31-2016, 01:49 AM   #8
aagaag
Member
 
Registered: Aug 2014
Posts: 40

Rep: Reputation: Disabled
In my Nagios (version 4.1.1) there is no such line in index.php. Instead, the php reads:
Code:
<?php
// Allow specifying main window URL for permalinks, etc.
$url = 'main.php';

if (isset($_GET['corewindow'])) {

	// The default window url may have been overridden with a permalink...
	// Parse the URL and remove permalink option from base.
	$a = parse_url($_GET['corewindow']);

	// Build the base url.
	$url = htmlentities($a['path']).'?';
	$url = (isset($a['host'])) ? $a['scheme'].'://'.$a['host'].$url : '/'.$url;

	$query = isset($a['query']) ? $a['query'] : '';
	$pairs = explode('&', $query);
	foreach ($pairs as $pair) {
		$v = explode('=', $pair);
		if (is_array($v)) {
			$key = urlencode($v[0]);
			$val = urlencode(isset($v[1]) ? $v[1] : '');
			$url .= "&$key=$val";
		}
	}
}

$this_year = '2015';
?>
if I change
Code:
$url = 'main.php'; # this was the original line
to:
Code:
$url = 'cgi-bin/status.cgi?hostgroup=all&style=hostdetail';
browsing nagios results in a "403 Forbidden" error in the main window.
 
Old 06-05-2019, 05:35 AM   #9
ASHOKROYAL
LQ Newbie
 
Registered: Jun 2019
Posts: 2

Rep: Reputation: Disabled
Angry to change home page of Nagios

I would suggest dont make any changes in intex.php please go through below link its apache problem

https://stackoverflow.com/questions/...d-of-executing
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to change nagios default logo rajiv.patil82 Linux - Software 2 03-09-2011 06:07 AM
Using nagios to check user login on web page venuwin Linux - Software 5 01-25-2009 07:11 AM
How to change default Apache page? flamesrock Linux - Software 3 11-29-2004 05:31 PM
how to change apache default page yenonn Linux - Networking 3 08-17-2004 10:27 PM
I cant change the default test page in apache server to add my page.y nhemapriya Linux - Newbie 3 05-13-2004 12:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration