Realization of equipment Monitoring module

Source: Internet
Author: User

After one months of efforts, Fzaq's equipment monitoring module was finally completed. Because this piece by me is responsible for the design, the realization, the test, therefore to this piece of realization process to know more, here realizes the thought and everybody to share, hoped can help everybody progress.
First you need to prepare two servers (each with at least three network cards) and a notebook. One server as database server 1, and another as a database server 2, notebook as a display terminal.
Configure IP, database server 1 Configure local Area Connection 1IP to 172.22.51.171, configure local connection 2IP to 172.22.51.172, configure local connection 3IP to 10.0.0.1. Local Connection 1, 2 is used for external programs to access the native database program, local connection 3 is the heartbeat port, used to monitor the status of database server 2. Database server 2 Configures local Area Connection 1IP to 172.22.51.173, configure local connection 2IP to 172.22.51.174, configure local Area Connection 3 IP is 10.0.0.2.
Run daemon programs, ESB programs, C + + programs, and server information acquisition programs on two database servers, respectively. The daemon is used to monitor the running state of the other database server, start setting up Database server 1 master, and database server 2 as the standby machine. If the database server 1 has a single subnet, database server 1 writes the failure situation to the database itself, if the database server 1 has a dual network outage, database server 1 cannot write records to the database, the daemon on database server 1 sends fault information to the daemon on database server 2. The daemon on database server 2 sends a workstate of 2 to the ESB on this computer (2 for a two-wire network, 3 for a device power outage), the ESB puts the failure information of the database server 1 in the library, and pushes the message to the terminal care program, which receives the fault information of the ESB push. Modify the terminal's WCF address and restart the terminal program.
On the display page of the database server, the running state of the device is refreshed from the database with a timer, if the device is present but not running, the device color is gray, and if the device has a single network, the device color is yellow, and if the device is powered off or a dual network, the device color is red.

Test methods: Start the daemon on database server 1 and Database server 2, the ESB, C + +, server information acquisition module, database server 1 as host, and database server 2 as the standby machine.

Test Result: Disconnect a network cable from database server 1, the database server 1 icon that displays the page turns yellow, and appears green when plugged in. Disconnect two network cable from database server 1, the daemon on database server 1 shows the master to standby switch, the daemon on database server 2 shows the switchover from standby to master, and the database server 1 icon showing the page turns red.

Realization of equipment Monitoring module

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.