[Pkg-nagios-changes] [pkg-nagios] r1728 - in nagios3/trunk/debian: . php php/includes

Alexander Wirt formorer at alioth.debian.org
Sat Sep 5 08:14:49 UTC 2009


Author: formorer
Date: 2009-09-05 08:14:44 +0000 (Sat, 05 Sep 2009)
New Revision: 1728

Added:
   nagios3/trunk/debian/php/
   nagios3/trunk/debian/php/config.inc.php
   nagios3/trunk/debian/php/includes/
   nagios3/trunk/debian/php/includes/utils.inc.php
   nagios3/trunk/debian/php/index.php
   nagios3/trunk/debian/php/main.php
   nagios3/trunk/debian/php/side.php
Modified:
   nagios3/trunk/debian/NEWS
   nagios3/trunk/debian/README.Debian
   nagios3/trunk/debian/rules
Log:
Add php frontend


Modified: nagios3/trunk/debian/NEWS
===================================================================
--- nagios3/trunk/debian/NEWS	2009-09-04 13:23:00 UTC (rev 1727)
+++ nagios3/trunk/debian/NEWS	2009-09-05 08:14:44 UTC (rev 1728)
@@ -1,3 +1,13 @@
+nagios3 (3.2.0-1) unstable; urgency=low
+
+  I decided to remove the php frontend included with 3.2.0 and replace 
+  it with the old html frontend. Its my personal oppinion that php should
+  not be used for administrational and security sensitive tasks. Also the new
+  frontend looks exactly the same as the old. If you really want the php 
+  frontend look into README.Debian for instructions. 
+
+ -- Alexander Wirt <formorer at debian.org>  Sat, 05 Sep 2009 10:05:23 +0200
+
 nagios3 (3.0.6-4) unstable; urgency=low
 
   The homedirectory of the nagios user moved to /var/lib/nagios

Modified: nagios3/trunk/debian/README.Debian
===================================================================
--- nagios3/trunk/debian/README.Debian	2009-09-04 13:23:00 UTC (rev 1727)
+++ nagios3/trunk/debian/README.Debian	2009-09-05 08:14:44 UTC (rev 1728)
@@ -12,7 +12,13 @@
 
 	pkg-nagios-devel at lists.alioth.debian.org
 
+Replacing the html frontend with php  
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
+To replace the html frontend with the php frontend just copy 
+/usr/share/doc/nagios3-common/examples/php/* to /usr/share/nagios3/htdocs
+and take care that your webserver executes index.php before index.html.
+
 Upgrading from Nagios 1 or Nagios 2 
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 Nagios 1, Nagios 2 and Nagios 3 are independent packages. You can have both

Added: nagios3/trunk/debian/php/config.inc.php
===================================================================
--- nagios3/trunk/debian/php/config.inc.php	                        (rev 0)
+++ nagios3/trunk/debian/php/config.inc.php	2009-09-05 08:14:44 UTC (rev 1728)
@@ -0,0 +1,20 @@
+<?php
+//
+
+
+$cfg['cgi_config_file']='/etc/nagios3/cgi.cfg';  // location of the CGI config file
+
+$cfg['cgi_base_url']='/cgi-bin/nagios3';
+
+
+// FILE LOCATION DEFAULTS
+$cfg['main_config_file']='/etc/nagios3/nagios.cfg';  // default location of the main Nagios config file
+$cfg['status_file']='/var/lib/nagios3/status.dat'; // default location of Nagios status file
+$cfg['state_retention_file']='/var/lib/nagios3/retention.dat'; // default location of Nagios retention file
+
+
+
+// utilities
+require_once(dirname(__FILE__).'/includes/utils.inc.php');
+
+?>

Added: nagios3/trunk/debian/php/includes/utils.inc.php
===================================================================
--- nagios3/trunk/debian/php/includes/utils.inc.php	                        (rev 0)
+++ nagios3/trunk/debian/php/includes/utils.inc.php	2009-09-05 08:14:44 UTC (rev 1728)
@@ -0,0 +1,473 @@
+<?php
+// HELPER UTILITIES
+
+require_once(dirname(__FILE__).'/../config.inc.php');
+
+function get_update_information(){
+	global $cfg;
+	
+	// initialize array
+	$updateinfo=array(
+		"found_update_info" => false,
+		"update_checks_enabled" => true,
+		"last_update_check" => "",
+		"update_available" => false,
+		"update_version" => "",
+		);
+	
+	// first read CGI config file to determine main file location
+	$ccfc=read_cgi_config_file();
+	//print_r($ccfc);
+	
+	// read main config file to determine file locations
+	if(isset($ccf['main_config_file']))
+		$mcf=$ccf['main_config_file'];
+	else
+		$mcf="";
+	$mcfc=read_main_config_file($mcf);
+	//print_r($mcfc);
+
+	if(isset($mcf['status_file']))
+		$sf=$mcf['status_file'];
+	else
+		$sf="";
+
+	if(isset($mcf['state_retention_file']))
+		$rf=$mcf['state_retention_file'];
+	else
+		$rf="";
+
+
+	///////////////////////////////////////////////
+	// GET PROGRAM VARIABLES FROM MAIN CONFIG  FILE
+	///////////////////////////////////////////////
+	
+	// are update checks enabled?
+	if(isset($mcfc['check_for_updates']) && $mcfc['check_for_updates']=="0")
+		$updateinfo["update_checks_enabled"]=false;
+		
+
+	/////////////////////////////////////////
+	// DETERMINE UPDATE INFO FROM STATUS FILE
+	/////////////////////////////////////////
+	
+	// read status file (just first few lines)
+	$sfc=read_status_file($sf,50);
+	//print_r($sfc);
+	//exit();
+	
+	// last update time
+	if(isset($sfc['info']['last_update_check'])){
+		$updateinfo["last_update_check"]=$sfc['info']['last_update_check'];
+		$updateinfo["found_update_info"]=true;
+		}
+	
+	// update available
+	if(isset($sfc['info']['update_available'])){
+		if($sfc['info']['update_available']=="1")
+			$updateinfo["update_available"]=true;
+		else
+			$updateinfo["update_available"]=false;
+		}
+	
+	// update version
+	if(isset($sfc['info']['new_version'])){
+		$updateinfo["update_version"]=$sfc['info']['new_version'];
+		}
+		
+	// did we find update information in the status file? if so, we're done
+	if($updateinfo["found_update_info"]==true)
+		return $updateinfo;
+
+
+	////////////////////////////////////////////
+	// DETERMINE UPDATE INFO FROM RETENTION FILE
+	////////////////////////////////////////////
+	
+	// Nagios might be shutdown (ie, no status file), so try and read data from the retention file
+
+	// read retentiion file (just first few lines)
+	$rfc=read_retention_file($rf,50);
+	//print_r($rfc);
+	//exit();
+	
+	// last update time
+	if(isset($rfc['info']['last_update_check'])){
+		$updateinfo["last_update_check"]=$rfc['info']['last_update_check'];
+		$updateinfo["found_update_info"]=true;
+		}
+	
+	// update available
+	if(isset($rfc['info']['update_available'])){
+		if($rfc['info']['update_available']=="1")
+			$updateinfo["update_available"]=true;
+		else
+			$updateinfo["update_available"]=false;
+		}
+	
+	// update version
+	if(isset($rfc['info']['new_version'])){
+		$updateinfo["update_version"]=$rfc['info']['new_version'];
+		}
+		
+	
+	return $updateinfo;
+	}
+	
+
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////
+// FILE PROCESSING FUNCTIONS
+////////////////////////////////////////////////////////////////////////////////////////////////
+
+// reads variables from main config file
+function read_main_config_file($thefile=""){
+	global $cfg;
+	
+	$contents=array();
+	
+	// file name can be overridden from default
+	if(isset($thefile) && $thefile!="")
+		$fname=$thefile;
+	else
+		$fname=$cfg['main_config_file'];
+		
+	// open main config file for reading...
+	if(($fh=@fopen($fname,'r'))!=FALSE){
+		// read all lines in the config file
+		while(!feof($fh)){
+			$s=fgets($fh);
+			
+			// skip comments
+			if($s[0]=='#')
+				continue;
+				
+			// skip blank lines
+			// TODO - is this necessary?
+			
+			// split comments out from config
+			$s2=explode(";",$s);
+				
+			// get var/val pairs
+			$v=explode("=",$s2[0]);
+			
+			if(isset($v[0]) && isset($v[1])){
+
+				// trim var/val pairs
+				$v[0]=trim($v[0]);
+				$v[1]=trim($v[1]);
+
+				// allow for multiple values for some variables...
+				$arr=false;
+				if(!strcmp($v[0],"cfg_file"))
+					$arr=true;
+				else if(!strcmp($v[0],"cfg_dir"))
+					$arr=true;
+					
+				if($arr==true)
+					$contents[$v[0]][] = $v[1];
+				else
+					$contents[$v[0]] = $v[1];
+				}
+			}
+		fclose($fh);
+		}
+
+	return $contents;
+	}
+	
+	
+// reads variables from cgi config file
+function read_cgi_config_file($thefile=""){
+	global $cfg;
+	
+	$contents=array();
+	
+	// file name can be overridden from default
+	if(isset($thefile) && $thefile!="")
+		$fname=$thefile;
+	else
+		$fname=$cfg['cgi_config_file'];
+		
+	// open cgi config file for reading...
+	if(($fh=@fopen($fname,'r'))!=FALSE){
+		// read all lines in the config file
+		while(!feof($fh)){
+			$s=fgets($fh);
+			
+			// skip comments
+			if($s[0]=='#')
+				continue;
+				
+			// skip blank lines
+			// TODO - is this necessary?
+			
+			// split comments out from config
+			$s2=explode(";",$s);
+				
+			// get var/val pairs
+			$v=explode("=",$s2[0]);
+			
+			if(isset($v[0]) && isset($v[1])){
+
+				// trim var/val pairs
+				$v[0]=ltrim(rtrim($v[0]));
+				$v[1]=ltrim(rtrim($v[1]));
+
+				// do not allow for multiple values
+				$contents[$v[0]] = $v[1];
+				}
+			}
+		fclose($fh);
+		}
+
+	return $contents;
+	}
+	
+	
+
+// reads status file
+function read_status_file($thefile="",$maxlines=0){
+	global $cfg;
+	
+	$contents=array(
+		"info" => array(),
+		"programstatus" => array(),
+		"hoststatus" => array(),
+		"servicestatus" => array(),
+		"contactstatus" => array()
+		);
+		
+	$statustype="unknown";
+	$current_host=0;
+	$current_service=0;
+	$current_contact=0;
+	
+	// file name can be overridden from default
+	if(isset($thefile) && $thefile!="")
+		$fname=$thefile;
+	else
+		$fname=$cfg['status_file'];
+		
+	// open file for reading...
+	$x=0;
+	if(($fh=@fopen($fname,'r'))!=FALSE){
+		// read all lines
+		while(!feof($fh)){
+
+			$x++;
+			if($maxlines>0 && $x>$maxlines)
+				break;
+
+			$s=fgets($fh);
+			
+			// skip comments
+			if($s[0]=='#')
+				continue;
+				
+			// trim lines
+			$s=ltrim(rtrim($s));
+				
+			// skip blank lines
+			if($s=="")
+				continue;
+			
+			// we are in a new type of status data or new entry
+			if(!strcmp($s,"info {")){
+				$statustype="info";
+				continue;
+				}
+			else if(!strcmp($s,"programstatus {")){
+				$statustype="programstatus";
+				continue;
+				}
+			else if(!strcmp($s,"hoststatus {")){
+				$statustype="hoststatus";
+				$current_host++;
+				continue;
+				}
+			else if(!strcmp($s,"servicestatus {")){
+				$statustype="servicestatus";
+				$current_service++;
+				continue;
+				}
+			else if(!strcmp($s,"contactstatus {")){
+				$statustype="contactstatus";
+				$current_contact++;
+				continue;
+				}
+				
+			// we just ended an entry...
+			else if(!strcmp($s,"}")){
+				$statustype="unknown";
+				continue;
+				}
+				
+			// get/split var/val pairs
+			$v=explode("=",$s);
+			$var="";
+			$val="";
+			if(isset($v[0]) && isset($v[1])){
+				// trim var/val pairs
+				$var=ltrim(rtrim($v[0]));
+				$val=ltrim(rtrim($v[1]));
+				}
+				
+			// INFO AND PROGRAM STATUS 
+			if($statustype=="info" || $statustype=="programstatus"){
+				$contents[$statustype][$var]=$val;
+				continue;
+				}
+			// HOST STATUS
+			else if($statustype=="hoststatus"){
+				$contents[$statustype][$current_host][$var]=$val;
+				continue;
+				}
+			
+			// SERVICE STATUS
+			else if($statustype=="servicestatus"){
+				$contents[$statustype][$current_service][$var]=$val;
+				continue;
+				}
+			
+			// CONTACT STATUS
+			else if($statustype=="contactstatus"){
+				$contents[$statustype][$current_contact][$var]=$val;
+				continue;
+				}
+			}
+		fclose($fh);
+		}
+		
+	$contents["total_hosts"]=$current_host;
+	$contents["total_services"]=$current_service;
+	$contents["total_contacts"]=$current_contact;
+
+	return $contents;
+	}
+
+
+
+
+// reads retention file
+function read_retention_file($thefile="",$maxlines=0){
+	global $cfg;
+	
+	$contents=array(
+		"info" => array(),
+		"program" => array(),
+		"host" => array(),
+		"service" => array(),
+		"contact" => array()
+		);
+		
+	$datatype="unknown";
+	$current_host=0;
+	$current_service=0;
+	$current_contact=0;
+	
+	// file name can be overridden from default
+	if(isset($thefile) && $thefile!="")
+		$fname=$thefile;
+	else
+		$fname=$cfg['state_retention_file'];
+
+	// open file for reading...
+	$x=0;
+	if(($fh=@fopen($fname,'r'))!=FALSE){
+		// read all lines
+		while(!feof($fh)){
+
+			$x++;
+			if($maxlines>0 && $x>$maxlines)
+				break;
+
+			$s=fgets($fh);
+			
+			// skip comments
+			if($s[0]=='#')
+				continue;
+				
+			// trim lines
+			$s=ltrim(rtrim($s));
+				
+			// skip blank lines
+			if($s=="")
+				continue;
+
+			// we are in a new type of status data or new entry
+			if(!strcmp($s,"info {")){
+				$datatype="info";
+				continue;
+				}
+			else if(!strcmp($s,"program {")){
+				$datatype="program";
+				continue;
+				}
+			else if(!strcmp($s,"host {")){
+				$datatype="host";
+				$current_host++;
+				continue;
+				}
+			else if(!strcmp($s,"service {")){
+				$datatype="service";
+				$current_service++;
+				continue;
+				}
+			else if(!strcmp($s,"contact {")){
+				$datatype="contact";
+				$current_contact++;
+				continue;
+				}
+				
+			// we just ended an entry...
+			else if(!strcmp($s,"}")){
+				$datatype="unknown";
+				continue;
+				}
+				
+			// get/split var/val pairs
+			$v=explode("=",$s);
+			$var="";
+			$val="";
+			if(isset($v[0]) && isset($v[1])){
+				// trim var/val pairs
+				$var=ltrim(rtrim($v[0]));
+				$val=ltrim(rtrim($v[1]));
+				}
+				
+			// INFO AND PROGRAM STATUS 
+			if($datatype=="info" || $datatype=="program"){
+				$contents[$datatype][$var]=$val;
+				continue;
+				}
+			// HOST STATUS
+			else if($datatype=="host"){
+				$contents[$datatype][$current_host][$var]=$val;
+				continue;
+				}
+			
+			// SERVICE STATUS
+			else if($datatype=="service"){
+				$contents[$datatype][$current_service][$var]=$val;
+				continue;
+				}
+			
+			// CONTACT STATUS
+			else if($datatype=="contact"){
+				$contents[$datatype][$current_contact][$var]=$val;
+				continue;
+				}
+			}
+		fclose($fh);
+		}
+		
+	$contents["total_hosts"]=$current_host;
+	$contents["total_services"]=$current_service;
+	$contents["total_contacts"]=$current_contact;
+
+	return $contents;
+	}
+
+?>
\ No newline at end of file

Added: nagios3/trunk/debian/php/index.php
===================================================================
--- nagios3/trunk/debian/php/index.php	                        (rev 0)
+++ nagios3/trunk/debian/php/index.php	2009-09-05 08:14:44 UTC (rev 1728)
@@ -0,0 +1,29 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
+
+<html>
+<head>
+<meta name="ROBOTS" content="NOINDEX, NOFOLLOW">
+<title>Nagios</title>
+<link rel="shortcut icon" href="images/favicon.ico" type="image/ico">
+</head>
+
+<frameset cols="180,*">
+<frame src="side.php" name="side" frameborder="0">
+<frame src="main.php" name="main" frameborder="0">
+
+<noframes>
+<!-- This page requires a web browser which supports frames. --> 
+<h2>Nagios</h2>
+<p align="center">
+<a href="http://www.nagios.org/">www.nagios.org</a><br>
+Copyright (c) 1999-2009 Ethan Galstad<br>
+</p>
+<p>
+<i>Note: These pages require a browser which supports frames</i>
+</p>
+</noframes>
+
+</frameset>
+
+</html>
+

Added: nagios3/trunk/debian/php/main.php
===================================================================
--- nagios3/trunk/debian/php/main.php	                        (rev 0)
+++ nagios3/trunk/debian/php/main.php	2009-09-05 08:14:44 UTC (rev 1728)
@@ -0,0 +1,78 @@
+<?php
+include_once(dirname(__FILE__).'/includes/utils.inc.php');
+
+?>
+
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+<HTML>
+
+<HEAD>
+<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
+<TITLE>Nagios</TITLE>
+<LINK REL='stylesheet' TYPE='text/css' HREF='stylesheets/common.css'>
+</HEAD>
+
+<BODY id="splashpage">
+
+
+<div id="mainbrandsplash">
+<div id="mainlogo">
+<a href="http://www.nagios.org/" target="_blank"><img src="images/logofullsize.png" border="0" alt="Nagios" title="Nagios"></a>
+</div>
+</div>
+
+<div id="currentversioninfo">
+<div class="product">Nagios<sup><span style="font-size: small;">&reg;</span></sup> Core<sup><span style="font-size: small;">&trade;</span></sup></div>
+<div class="version">Version 3.2.0</div>
+<div class="releasedate">August 12, 2009</div>
+<div class="checkforupdates"><a href="http://www.nagios.org/checkforupdates/?version=3.2.0&product=nagioscore" target="_blank">Check for updates</a></div>
+<div class="whatsnew"><a href="docs/whatsnew.html">Read what's new in Nagios Core 3</a></div>
+</div>
+
+
+<div id="updateversioninfo">
+<?php
+	$updateinfo=get_update_information();
+	//print_r($updateinfo);
+	//$updateinfo['update_checks_enabled']=false;
+	//$updateinfo['update_available']=true;
+	if($updateinfo['update_checks_enabled']==false){
+?>
+		<div class="updatechecksdisabled">
+		<div class="warningmessage">Warning: Automatic Update Checks are Disabled!</div>
+		<div class="submessage">Disabling update checks presents a possible security risk.  Visit <a href="http://www.nagios.org/" target="_blank">nagios.org</a> to check for updates manually or enable update checks in your Nagios config file.</a></div>
+		</div>
+<?php
+		}
+	else if($updateinfo['update_available']==true){
+?>
+		<div class="updateavailable">
+		<div class="updatemessage">A new version of Nagios is available!</div>
+		<div class="submessage">Visit <a href="http://www.nagios.org/" target="_blank">nagios.org</a> to download Nagios <?php echo $updateinfo['update_version'];?>.</div>
+		</div>
+<?php
+		}
+?>
+</div>
+
+
+<div id="mainfooter">
+<div id="maincopy">Copyright &copy; 2009 Nagios Core Development Team and Community Contributors.<br>Copyright &copy; 1999-2009 Ethan Galstad.<br>See the THANKS file for more information on contributors.</div>
+<div CLASS="disclaimer">
+Nagios Core is licensed under the GNU General Public License and is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.  Nagios, Nagios Core and the Nagios logo are trademarks, servicemarks, registered trademarks or registered servicemarks owned by Nagios Enterprises, LLC.  Usage of the Nagios marks are governed by our <A href="http://www.nagios.org/legal/trademarkpolicy/">trademark policy</a>.
+</div>
+<div class="logos">
+<a href="http://www.nagios.com/" target="_blank"><img src="images/NagiosEnterprises-whitebg-112x46.png" width="112" height="46" border="0" style="padding: 0 20px 0 0;" title="Nagios Enterprises"></a>  
+
+<a href="http://www.nagios.org/" target="_blank"><img src="images/weblogo1.png" width="102" height="47" border="0" style="padding: 0 40px 0 40px;" title="Nagios.org"></a>
+
+<a href="http://sourceforge.net/projects/nagios"><img src="images/sflogo.png" width="88" height="31" border="0" alt="SourceForge.net Logo" /></a>
+</div>
+</div> 
+
+
+</BODY>
+</HTML>
+

Added: nagios3/trunk/debian/php/side.php
===================================================================
--- nagios3/trunk/debian/php/side.php	                        (rev 0)
+++ nagios3/trunk/debian/php/side.php	2009-09-05 08:14:44 UTC (rev 1728)
@@ -0,0 +1,127 @@
+<?php
+include_once(dirname(__FILE__).'/includes/utils.inc.php');
+
+$link_target="main";
+?>
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+<html>
+
+<head>
+<meta name="ROBOTS" content="NOINDEX, NOFOLLOW">
+<TITLE>Nagios</TITLE>
+<link href="stylesheets/common.css" type="text/css" rel="stylesheet">
+</head>
+
+<body class='navbar'>
+
+
+
+<div class="navbarlogo">
+<a href="http://www.nagios.org" target="_blank"><img src="images/sblogo.png" border="0" alt="Nagios"></a>
+</div>
+
+<div class="navsection">
+<div class="navsectiontitle">General</div>
+<div class="navsectionlinks">
+<ul class="navsectionlinks">
+<li><a href="main.php" target="<?php echo $link_target;?>">Home</a></li>
+<li><a href="docs/" target="<?php echo $link_target;?>">Documentation</a></li>
+</ul>
+</div>
+</div>
+
+
+<div class="navsection">
+<div class="navsectiontitle">Current Status</div>
+<div class="navsectionlinks">
+<ul class="navsectionlinks">
+<li><a href="<?php echo $cfg["cgi_base_url"];?>/tac.cgi" target="<?php echo $link_target;?>">Tactical Overview</a></li>
+<li><a href="<?php echo $cfg["cgi_base_url"];?>/statusmap.cgi?host=all" target="<?php echo $link_target;?>">Map</a></li>
+<li><a href="<?php echo $cfg["cgi_base_url"];?>/status.cgi?hostgroup=all&amp;style=hostdetail" target="<?php echo $link_target;?>">Hosts</a></li>
+<li><a href="<?php echo $cfg["cgi_base_url"];?>/status.cgi?host=all" target="<?php echo $link_target;?>">Services</a></li>
+<li>
+<a href="<?php echo $cfg["cgi_base_url"];?>/status.cgi?hostgroup=all&amp;style=overview" target="<?php echo $link_target;?>">Host Groups</a>
+<ul>
+<li><a href="<?php echo $cfg["cgi_base_url"];?>/status.cgi?hostgroup=all&amp;style=summary" target="<?php echo $link_target;?>">Summary</a></li>
+<li><a href="<?php echo $cfg["cgi_base_url"];?>/status.cgi?hostgroup=all&amp;style=grid" target="<?php echo $link_target;?>">Grid</a></li>
+</ul>
+</li>
+<li>
+<a href="<?php echo $cfg["cgi_base_url"];?>/status.cgi?servicegroup=all&amp;style=overview" target="<?php echo $link_target;?>">Service Groups</a>
+<ul>
+<li><a href="<?php echo $cfg["cgi_base_url"];?>/status.cgi?servicegroup=all&amp;style=summary" target="<?php echo $link_target;?>">Summary</a></li>
+<li><a href="<?php echo $cfg["cgi_base_url"];?>/status.cgi?servicegroup=all&amp;style=grid" target="<?php echo $link_target;?>">Grid</a></li>
+</ul>
+</li>
+<li>
+<a href="<?php echo $cfg["cgi_base_url"];?>/status.cgi?host=all&amp;servicestatustypes=28" target="<?php echo $link_target;?>">Problems</a>
+<ul>
+<li>
+<a href="<?php echo $cfg["cgi_base_url"];?>/status.cgi?host=all&amp;servicestatustypes=28" target="<?php echo $link_target;?>">Services</a> (<a href="<?php echo $cfg["cgi_base_url"];?>/status.cgi?host=all&amp;type=detail&amp;hoststatustypes=3&amp;serviceprops=42&amp;servicestatustypes=28" target="<?php echo $link_target;?>">Unhandled</a>)
+</li>
+<li>
+<a href="<?php echo $cfg["cgi_base_url"];?>/status.cgi?hostgroup=all&amp;style=hostdetail&amp;hoststatustypes=12" target="<?php echo $link_target;?>">Hosts</a> (<a href="<?php echo $cfg["cgi_base_url"];?>/status.cgi?hostgroup=all&amp;style=hostdetail&amp;hoststatustypes=12&amp;hostprops=42" target="<?php echo $link_target;?>">Unhandled</a>)
+</li>
+<li><a href="<?php echo $cfg["cgi_base_url"];?>/outages.cgi" target="<?php echo $link_target;?>">Network Outages</a></li>
+</ul>
+</li>
+</ul>
+</div>
+
+
+<div class="navbarsearch">
+<form method="get" action="<?php echo $cfg["cgi_base_url"];?>/status.cgi" target="<?php echo $link_target;?>">
+<fieldset>
+<legend>Quick Search:</legend>
+<input type='hidden' name='navbarsearch' value='1'>
+<input type='text' name='host' size='15' class="NavBarSearchItem">
+</fieldset>
+</form>
+</div>
+
+</div>
+
+
+<div class="navsection">
+<div class="navsectiontitle">Reports</div>
+<div class="navsectionlinks">
+<ul class="navsectionlinks">
+<li><a href="<?php echo $cfg["cgi_base_url"];?>/avail.cgi" target="<?php echo $link_target;?>">Availability</a></li>
+<li><a href="<?php echo $cfg["cgi_base_url"];?>/trends.cgi" target="<?php echo $link_target;?>">Trends</a></li>
+
+<li>
+<a href="<?php echo $cfg["cgi_base_url"];?>/history.cgi?host=all" target="<?php echo $link_target;?>">Alerts</a>
+<ul>
+<li><a href="<?php echo $cfg["cgi_base_url"];?>/history.cgi?host=all" target="<?php echo $link_target;?>">History</a></li>
+<li><a href="<?php echo $cfg["cgi_base_url"];?>/summary.cgi" target="<?php echo $link_target;?>">Summary</a></li>
+<li><a href="<?php echo $cfg["cgi_base_url"];?>/histogram.cgi" target="<?php echo $link_target;?>">Histogram</a></li>
+</ul>
+</li>
+<li><a href="<?php echo $cfg["cgi_base_url"];?>/notifications.cgi?contact=all" target="<?php echo $link_target;?>">Notifications</a></li>
+<li><a href="<?php echo $cfg["cgi_base_url"];?>/showlog.cgi" target="<?php echo $link_target;?>">Event Log</a></li>
+</ul>
+</div>
+</div>
+
+
+<div class="navsection">
+<div class="navsectiontitle">System</div>
+<div class="navsectionlinks">
+<ul class="navsectionlinks">
+<li><a href="<?php echo $cfg["cgi_base_url"];?>/extinfo.cgi?type=3" target="<?php echo $link_target;?>">Comments</a></li>
+<li><a href="<?php echo $cfg["cgi_base_url"];?>/extinfo.cgi?type=6" target="<?php echo $link_target;?>">Downtime</a></li>
+<li><a href="<?php echo $cfg["cgi_base_url"];?>/extinfo.cgi?type=0" target="<?php echo $link_target;?>">Process Info</a></li>
+<li><a href="<?php echo $cfg["cgi_base_url"];?>/extinfo.cgi?type=4" target="<?php echo $link_target;?>">Performance Info</a></li>
+<li><a href="<?php echo $cfg["cgi_base_url"];?>/extinfo.cgi?type=7" target="<?php echo $link_target;?>">Scheduling Queue</a></li>
+<li><a href="<?php echo $cfg["cgi_base_url"];?>/config.cgi" target="<?php echo $link_target;?>">Configuration</a></li>
+</ul>
+</div>
+</div>
+
+
+
+
+</BODY>
+</HTML>

Modified: nagios3/trunk/debian/rules
===================================================================
--- nagios3/trunk/debian/rules	2009-09-04 13:23:00 UTC (rev 1727)
+++ nagios3/trunk/debian/rules	2009-09-05 08:14:44 UTC (rev 1728)
@@ -142,7 +142,7 @@
 	dh_installchangelogs -i
 	dh_install           -i
 	dh_installinit 	     --name nagios3 -- defaults 30 18
-	dh_installexamples   -i
+	dh_installexamples   -pnagios3-common debian/php 
 	# and now set up the "nagios1 version" of the apache2.conf
 	sed -e 's,^#\(ScriptAlias /cgi-bin/nagios /usr/lib/cgi-bin/nagios3\),\1,' \
 	    -e 's,^#\(ScriptAlias /nagios/cgi-bin /usr/lib/cgi-bin/nagios3\),\1,' \




More information about the Pkg-nagios-changes mailing list