Nagios two Development (ii)---Nagios and nagiosql merger and trade-offs

Source: Internet
Author: User
Tags php source code php template

Nagios doing the front desk

I analyzed the pros and cons of Nagios and Nagiosql, based on previous experience and exploration. decided to use Nagios as the monitoring data display layer, temporarily called the "foreground". The nagiosql is the configuration layer of the monitor body, which is called "backstage" temporarily. In short, the backend is a server-side configuration and the foreground is used to view the results.

This takes you to the left-hand menu bar on the Nagios page to merge it with the left-hand menu bar of Nagiosql, where you can now trade off your business needs.

The left menu bar on the Nagios page is shown in Figure 1.3

Friends who need real-time knowledge of Nagios can access the demo:http://nagioscore.demos.nagios.com/of Nagios official website

Nagiosql doing backstage

By investigating Nagios and Nagiosql, my advice was to merge Nagios's related pages into Nagiosql's main framework. Both are developed with PHP, but I am the PHP 0 basis, then learn while selling. For Nagios source code analysis, from index.php (this page first page) The source code is as follows,

[PHP]View Plaincopyprint?
    1. < Frameset cols=  style= >  
    2. <frame src=  name=  frameborder=  style= >  
    3. <frame src=  name=" main "  frameborder=" 0 "  style= >  

lines 45th and 46 understand that the left and right pages are displayed through an IFRAME.

Thus the side.php source code is analyzed, the source code is as follows:

[PHP]View Plaincopyprint?
  1. <?php
  2. include_once (DirName (__file__). '/includes/utils.inc.php ');
  3. $link _target="main";
  4. ?>
  5. <! DOCTYPE HTML public "-//W3C//DTD HTML 4.0 transitional//en">
  6. <meta name="ROBOTS" content="NOINDEX, NOFOLLOW">
  7. <meta http-equiv=' content-type ' content=' text/html;charset=utf-8 '>
  8. <TITLE>Nagios</TITLE>
  9. <link href="stylesheets/common.css" type="Text/css " rel="stylesheet" >
  10. <body Class=' NavBar '>
  11. <!--<div class="Navbarlogo">-->
  12. <!--<a href="http://www.nagios.org" target="_blank"><img src="Images/sblogo.png " border=" 0 " alt="Nagios"></a>-->
  13. <!--</div>-->
  14. <!--<div class="Navsection">-->
  15. <!--<div class="Navsectiontitle"> Common </div>-->
  16. <!--<div class="Navsectionlinks">-->
  17. <!--<ul class="Navsectionlinks">-->
  18. <!--<li><a href="main.php" target= "<?php echo $link _target;? >> Home </a></li>-->

4th, 31 line, clear the Click menu, the right areaTarget Controlthe information displayed.

And the nagiosql of the source of the analysis, is completely confused. Because Nagiosql introduced templates (later article analysis). This becomes the main reason to merge Nagios into Nagiosql.

Because of the CGI problem (later in the article), we tried to split the nagiosql into the Nagios page, but tried unsuccessfully because we did not understand the it.php template (later article analysis).


Please mention the source when the friends reprint, because I am in order to better facilitate everyone to discuss with me. Thank you, sir.

Comments and suggestions: [email protected]

Nagios two Development (ii)---Nagios and nagiosql merger and trade-offs

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.