Nagios secondary development: "Drawing service diagrams by group"

Source: Internet
Author: User
Tags saltstack

Nagios secondary development: "Drawing service diagrams by group"
Background:
Nagios3.2.0 has integrated nagios, saltstack, and Thinkphp. Based on integration, secondary development is carried out to add functions such as grouping and plotting, asset management, and server batch management. The Thinkphp framework is used for asset addition, deletion, modification, and query. The grouping plot is used to write the grouping page separately and call the pnp interface. The server Batch Management relies on the powerful APIs of saltstack, such:

Figure 1 plot by Business Group

Figure 2 Asset Management and server Batch Management
The above system has been applied to the online environment. Next we will describe "Draw service diagrams by group" as a secondary development based on nagios 4.1.1.

I. Requirements
Draw a service diagram by group

II,

Figure 3 grouping check box

Figure 4 plotting by Business Group
Iii. Implementation Process
1) modify the original nagios status. cgi file and add the check box and the js Code that is fully selected.
2) switch to the pnp4nagios installation directory, add the graphview. php file, and append the php code for grouping and plotting.

Iv. Summary
1) Compared with the secondary development of nagios3.2.0, the implementation of the grouping and plotting function only depends on nagios + pnp4nagios and does not use thinkphp for grouping.
2) with the development of nagios3.2.0, you can directly modify the source code when modifying nagios4.1.1 again, reducing the complexity and accelerating the project progress.
4) no matter which kind of open-source software, as long as you carefully study your business needs, there will always be a bright spot!

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.