CN109428914A - Monitoring method and device, storage medium, processor - Google Patents

Monitoring method and device, storage medium, processor Download PDF

Info

Publication number
CN109428914A
CN109428914A CN201710740576.5A CN201710740576A CN109428914A CN 109428914 A CN109428914 A CN 109428914A CN 201710740576 A CN201710740576 A CN 201710740576A CN 109428914 A CN109428914 A CN 109428914A
Authority
CN
China
Prior art keywords
address
parsing result
distributor
server
log
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201710740576.5A
Other languages
Chinese (zh)
Other versions
CN109428914B (en
Inventor
高阳
刘凯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Gridsum Technology Co Ltd
Original Assignee
Beijing Gridsum Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Gridsum Technology Co Ltd filed Critical Beijing Gridsum Technology Co Ltd
Priority to CN201710740576.5A priority Critical patent/CN109428914B/en
Publication of CN109428914A publication Critical patent/CN109428914A/en
Application granted granted Critical
Publication of CN109428914B publication Critical patent/CN109428914B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/54Presence management, e.g. monitoring or registration for receipt of user log-on information, or the connection status of the users
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/069Management of faults, events, alarms or notifications using logs of notifications; Post-processing of notifications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network

Abstract

The invention discloses a kind of monitoring methods and device, storage medium, processor.Wherein, this method comprises: whether there is preset content in monitoring objective log, wherein preset content is for indicating the operation that distributor carries out server;In the case where occurring preset content in target journaling, target journaling is parsed, parsing result is obtained;Parsing result is sent to distributor, so that distributor executes one or more of following operation according to parsing result: updating the data information in CMDB database, send circular mail, record log.The present invention solves in the prior art can not be in time on monitoring server the technical issues of offline situation.

Description

Monitoring method and device, storage medium, processor
Technical field
The present invention relates to internet areas, in particular to a kind of monitoring method and device, storage medium, processor.
Background technique
Web services high availability scheme can be done using keepalived+lvs.Business needs to configure the rear end Duo Tai web services, They are placed in the configuration of same group of virtual IP address by this framework, if there is one of real server (Real Server, abbreviation rs) it is unavailable, framework will be automatically offline by the rs, and the overall service to guarantee virtual IP address is still available.
The automatically above offline of rs is by framework own schedule, and the framework is at present only when distributor role switching is (i.e. empty The drift of quasi- IP) when, it can be with mail notification related personnel, but the online or offline switching of rs, there is no informing mechanisms.Business Personnel need to understand in real time the operating status of the numerous rs in rear end, it is necessary to oneself manually implemented monitoring.This monitoring method exists Following problems:
The case where which is heavy, and not applicable rs service dynamic adjustment, and monitored item will often change;Lack rear end master The historical record of machine availability;Configuration management database (Configuration Management Database, abbreviation CMDB) There is the distribution information of cluster to record in system, if rs arbitrarily changes, will lead to CMDB data inaccuracy.
For above-mentioned problem, currently no effective solution has been proposed.
Summary of the invention
The embodiment of the invention provides a kind of monitoring methods and device, storage medium, processor, at least to solve existing skill It can not be in time on monitoring server the technical issues of offline situation in art.
According to an aspect of an embodiment of the present invention, provide a kind of monitoring method, comprising: in monitoring objective log whether There is preset content, wherein the preset content is for indicating the operation that distributor carries out cluster server;In the target In the case where occurring the preset content in log, the target journaling is parsed, parsing result is obtained;It is sent to the distributor The parsing result, so that the distributor executes one or more of following operation according to the parsing result: updating Data information, transmission circular mail, record log in configuration management database CMDB.
Further, the parsing result includes predetermined registration operation information, the first IP address and the second IP address, described in parsing Target journaling obtains parsing result, comprising: the preset content is stored as the predetermined registration operation information;It parses described default Content log content of the row obtains first IP address and second IP address, wherein first IP address is The IP address of first server, second IP address are Virtual Service IP address, and the distributor is to the first server Predetermined registration operation is carried out.
According to an aspect of an embodiment of the present invention, a kind of monitoring method is additionally provided, comprising: receive cluster server hair The parsing result sent, wherein the parsing result is that occur the feelings of preset content in the target journaling of the cluster server Parse what the target journaling obtained under condition;One or more of following operation is executed according to the parsing result: being updated Data information, transmission circular mail, record log in CMDB database.
Further, the parsing result includes predetermined registration operation information, the first IP address and the second IP address, wherein institute The IP address that the first IP address is first server is stated, second IP address is Virtual Service IP address, and distributor is to described First server has carried out predetermined registration operation, updates the data information in CMDB database according to the parsing result, comprising: link The CMDB database;Collection group records associated with second IP address are retrieved from the CMDB database;According to institute It states predetermined registration operation information and first IP address is added or is deleted from the collection group records.
Further, the parsing result includes predetermined registration operation information, the first IP address and the second IP address, according to described Parsing result record log, comprising: by the predetermined registration operation information, first IP address and second IP address filling the One default template, obtains the first log;First log is stored in local default mount directory.
Further, the parsing result includes predetermined registration operation information, the first IP address and the second IP address, according to described Parsing result sends circular mail, comprising: fills out the predetermined registration operation information, first IP address and second IP address Enter the second default template, is notified mail;The circular mail is sent to preset address.
According to an aspect of an embodiment of the present invention, a kind of monitoring device is additionally provided, comprising: monitoring unit, for supervising Whether there is preset content in control target journaling, wherein the preset content is for indicating that distributor carries out cluster server Operation;Resolution unit in the case where for the preset content occur in the target journaling, parses the target day Will obtains parsing result;Transmission unit, for sending the parsing result to the distributor, so that the distributor root One or more of following operation is executed according to the parsing result: being updated the data information in CMDB database, is sent notice Mail, record log.
Further, the parsing result includes predetermined registration operation information, the first IP address and the second IP address, the parsing Unit includes: storing sub-units, for the preset content to be stored as the predetermined registration operation information;Parsing subunit is used for Preset content log content of the row is parsed, obtains first IP address and second IP address, wherein described First IP address is the IP address of first server, and second IP address is Virtual Service IP address, and the distributor is to institute It states first server and has carried out predetermined registration operation.
According to an aspect of an embodiment of the present invention, a kind of monitoring device is additionally provided, comprising: receiving unit, for connecing Receive the parsing result that cluster server is sent, wherein the parsing result is gone out in the target journaling of the cluster server Parse what the target journaling obtained in the case where existing preset content;Execution unit, for according to the parsing result execute with One or more of lower operation: it updates the data information in CMDB database, send circular mail, record log.
Further, the parsing result includes predetermined registration operation information, the first IP address and the second IP address, wherein institute The IP address that the first IP address is first server is stated, second IP address is Virtual Service IP address, and distributor is to described First server has carried out predetermined registration operation, and the execution unit includes: link subelement, for linking the CMDB database; Subelement is retrieved, for retrieving collection group records associated with second IP address from the CMDB database;Operator Unit, for first IP address to be added or deleted from the collection group records according to the predetermined registration operation information.
According to an aspect of an embodiment of the present invention, a kind of storage medium is additionally provided, the storage medium includes storage Program, wherein described program executes above-mentioned monitoring method.
According to an aspect of an embodiment of the present invention, a kind of processor is additionally provided, the processor is used to run program, Wherein, above-mentioned monitoring method is executed when described program is run.
In embodiments of the present invention, preset content is for indicating the operation that distributor carries out server, in target journaling In there is preset content in the case where, parse target journaling, obtain parsing result, parsing result can indicate distributor to which A server is operated, and online operation or offline operation have been carried out, and sends parsing result to distributor, distributor connects After receiving parsing result, one or more of following operation is executed according to parsing result: updating the data in CMDB database Information sends circular mail, record log, has reached the technical effect of offline situation on timely monitoring server, and then solve It in the prior art can not be in time on monitoring server the technical issues of offline situation.
Detailed description of the invention
The drawings described herein are used to provide a further understanding of the present invention, constitutes a part of the invention, this hair Bright illustrative embodiments and their description are used to explain the present invention, and are not constituted improper limitations of the present invention.In the accompanying drawings:
Fig. 1 is a kind of flow chart of optional monitoring method according to an embodiment of the present invention;
Fig. 2 is the flow chart of another optional monitoring method according to an embodiment of the present invention;
Fig. 3 is the flow chart of another optional monitoring method according to an embodiment of the present invention;
Fig. 4 is a kind of schematic diagram of optional monitoring device according to an embodiment of the present invention;
Fig. 5 is the schematic diagram of another optional monitoring device according to an embodiment of the present invention.
Specific embodiment
In order to enable those skilled in the art to better understand the solution of the present invention, below in conjunction in the embodiment of the present invention Attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is only The embodiment of a part of the invention, instead of all the embodiments.Based on the embodiments of the present invention, ordinary skill people The model that the present invention protects all should belong in member's every other embodiment obtained without making creative work It encloses.
It should be noted that description and claims of this specification and term " first " in above-mentioned attached drawing, " Two " etc. be to be used to distinguish similar objects, without being used to describe a particular order or precedence order.It should be understood that using in this way Data be interchangeable under appropriate circumstances, so as to the embodiment of the present invention described herein can in addition to illustrating herein or Sequence other than those of description is implemented.In addition, term " includes " and " having " and their any deformation, it is intended that cover Cover it is non-exclusive include, for example, the process, method, system, product or equipment for containing a series of steps or units are not necessarily limited to Step or unit those of is clearly listed, but may include be not clearly listed or for these process, methods, product Or other step or units that equipment is intrinsic.
According to embodiments of the present invention, a kind of embodiment of monitoring method is provided, it should be noted that in the process of attached drawing The step of illustrating can execute in a computer system such as a set of computer executable instructions, although also, in process Logical order is shown in figure, but in some cases, it can be to be different from shown or described by sequence execution herein Step.
Embodiment 1
Fig. 1 is a kind of flow chart of optional monitoring method according to an embodiment of the present invention.This method is by server set What group executed.As shown in Figure 1, this method comprises the following steps:
Whether step S102 there is preset content in monitoring objective log, wherein preset content is for indicating distributor pair The operation that cluster server carries out.
Step S104 in the case where occurring preset content in target journaling, parses target journaling, obtains parsing result.
Step S106 sends parsing result to distributor, so that distributor executes in following operation according to parsing result One or more: update configuration management database CMDB in data information, send circular mail, record log.
Preset content indicates that distributor has carried out online operation or offline operation to server.Preset content can have two Kind: indicate that distributor has carried out the content of online operation to cluster server;Under indicating that distributor has carried out cluster server The content of line operation.
If occurring preset content in target journaling, illustrate that distributor has carried out online or offline switching to server Operation parses target journaling, is able to know which server distributor operates, parsing result can indicate to distribute Which server device operates, and has carried out online operation or offline operation to the server.
After obtaining parsing result, parsing result is sent to distributor.After distributor receives parsing result, distributor It is able to carry out one or more of following operation:
Distributor updates the data information in CMDB database according to parsing result.Data information in CMDB database can To include cluster mapping relations.Cluster mapping relations can be updated according to parsing result.
Distributor send circular mail to preset mail reception human hair according to parsing result.
For distributor according to parsing result record log, the log of record can show that current server is online or offline dynamic Make.
In embodiments of the present invention, preset content is for indicating the operation that distributor carries out server, in target journaling In there is preset content in the case where, parse target journaling, obtain parsing result, parsing result can indicate distributor to which A server is operated, and online operation or offline operation have been carried out, and sends parsing result to distributor, distributor connects After receiving parsing result, one or more of following operation is executed according to parsing result: updating the data in CMDB database Information sends circular mail, record log, solves that the prior art can not the technology of offline situation be asked on monitoring server in time Topic, has reached the technical effect of offline situation on timely monitoring server.
Optionally, parsing result includes predetermined registration operation information, the first IP address and the second IP address, parses target journaling, Obtain parsing result, comprising: preset content is stored as predetermined registration operation information;Preset content log of the row is parsed, is obtained First IP address and the second IP address, wherein the first IP address is the IP address of first server, and the second IP address is virtually to take Business IP address, distributor have carried out predetermined registration operation to first server.
Being distributed the online or offline server of device is first server, and predetermined registration operation is online operation or offline behaviour Make.
After obtaining parsing result, parsing result is sent to distributor.After distributor receives parsing result, distributor It is able to carry out one or more of following operation:
Distributor updates the data information in CMDB database according to parsing result.Data information in CMDB database can To include cluster mapping relations.Cluster mapping relations can be updated according to parsing result.Distributor active link [HTML] CMDB database, Corresponding collection group records are retrieved by the second IP address, if predetermined registration operation information indicate distributor to first server into It has gone online operation, then the first IP address has been added in data record;If predetermined registration operation information indicates distributor to first Server has carried out offline operation, then deletes the first IP address from data record.After directly having operated database in this way, Newest cluster mapping relations can be seen on the page of CMDB.
Distributor send circular mail to preset mail reception human hair according to parsing result.It is carried in circular mail The information of predetermined registration operation and the first IP address, in this way, after mail reception people receives circular mail, it can be according to predetermined registration operation Information know carried out it is online operation or offline operation, know distributor to which server according to the first IP address Predetermined registration operation is carried out, the information of the predetermined registration operation carried in circular mail and the first IP address are combined, it will be able to know Distributor has carried out handover operation to which server, and is able to know that and has carried out online operation or offline operation, Reach the technical effect of down status on timely monitoring server.
For distributor according to parsing result record log (following first logs), the log of record includes the switching of server Movement is online operation or offline operation, distributor have carried out handover operation to which server.Administrative staff are by looking into Read the log, it will be able to know the upper offline situation of server.
Citing is illustrated below:
/ var/log/keepalived.log file is read on cluster in real time, and whether is occurred in monitoring objective log The appearance of " Adding " (rear end is online) or " Removing " (rear end is offline) content.Include " Adding ", " Removing " Content is preset content.
If there is preset content, the content of appearance is stored as action first, such as " Adding " or " Removing ", " Adding ", " Removing " are predetermined registration operation information.Then the row log is parsed, with obtaining the IP in first [] number Address (Virtual Service IP address vip, i.e. the 2nd IP in location (address rs rsip, i.e. the first IP address) and second [] number Location) it stores, log example is as follows:
Removing service[10.200.40.161]:80from VS[121.52.220.89]:80
Three values can be stored by summarizing in memory, be respectively:
Action:<adding | removing>(predetermined registration operation information)
Rsip:xxxx (the first IP address)
Vip:xxxx (the second IP address)
Embodiment 2
Fig. 2 is the flow chart of another optional monitoring method according to an embodiment of the present invention.This method is by distributor It executes.As shown in Fig. 2, this method comprises the following steps:
Step S202 receives the parsing result that cluster server is sent, wherein parsing result is the mesh in cluster server Occur parsing what target journaling obtained in the case where preset content in mark log.
Step S204 executes one or more of following operation according to parsing result: updating the number in CMDB database It is believed that breath, transmission circular mail, record log.
Preset content indicates that distributor has carried out online operation or offline operation to server.Preset content can have two Kind: indicate that distributor has carried out the content of online operation to cluster server;Under indicating that distributor has carried out cluster server The content of line operation.
If occurring preset content in target journaling, illustrate that distributor has carried out online or offline switching to server Operation parses target journaling, is able to know which server distributor operates, parsing result can indicate to distribute Which server device operates, and has carried out online operation or offline operation to the server.
After obtaining parsing result, parsing result is sent to distributor.After distributor receives parsing result, distributor It is able to carry out one or more of following operation:
Distributor updates the data information in CMDB database according to parsing result.Data information in CMDB database can To include cluster mapping relations.Cluster mapping relations can be updated according to parsing result.
Distributor send circular mail to preset mail reception human hair according to parsing result.
For distributor according to parsing result record log, the log of record can show that current server is online or offline dynamic Make.
In embodiments of the present invention, preset content is for indicating the operation that distributor carries out server, in target journaling In there is preset content in the case where, parse target journaling, obtain parsing result, parsing result can indicate distributor to which A server is operated, and online operation or offline operation have been carried out, and sends parsing result to distributor, distributor connects After receiving parsing result, one or more of following operation is executed according to parsing result: updating the data in CMDB database Information sends circular mail, record log, solves that the prior art can not the technology of offline situation be asked on monitoring server in time Topic, has reached the technical effect of offline situation on timely monitoring server.
Optionally, parsing result includes predetermined registration operation information, the first IP address and the second IP address, and the first IP address is The IP address of one server, the second IP address are Virtual Service IP address, and distributor has carried out predetermined registration operation to first server, The data information in CMDB database is updated according to parsing result, comprising: link CMDB database;It is retrieved from CMDB database Collection group records associated with the second IP address;The first IP address is added from collection group records according to predetermined registration operation information Or it deletes.
Optionally, parsing result includes predetermined registration operation information, the first IP address and the second IP address, is remembered according to parsing result Record log, comprising: predetermined registration operation information, the first IP address and the second IP address are inserted into the first default template, obtained first Will;First log is stored in local default mount directory.
First log is stored in a local mount directory, this catalogue is a teleengineering support address, Suo Youfen The module is all disposed on hair device, and log path is all this teleengineering support address, then the cluster change journal of the whole network It has just all been stored in the same position, personnel can be supplied to and carry out united analysis.
This programme has been placed on distributor end for informing mechanism is monitored, and above and below distributor when the rs of line back end, not only can Mail notification is issued, rs can also be changed to real-time update into CMDB system, allow in CMDB the cluster status recorded more accurate, Variation history can also be stored to the Analysis of Policy Making that server availability is carried out for operation maintenance personnel.
Optionally, parsing result includes predetermined registration operation information, the first IP address and the second IP address, is sent out according to parsing result Send circular mail, comprising: predetermined registration operation information, the first IP address and the second IP address are inserted into the second default template, led to Know mail;Circular mail is sent to preset address.
Being distributed the online or offline server of device is first server, and predetermined registration operation is online operation or offline behaviour Make.
After obtaining parsing result, parsing result is sent to distributor.After distributor receives parsing result, distributor It is able to carry out one or more of following operation:
Distributor updates the data information in CMDB database according to parsing result.Data information in CMDB database can To include cluster mapping relations.Cluster mapping relations can be updated according to parsing result.Distributor active link [HTML] CMDB database, Corresponding collection group records are retrieved by the second IP address, if predetermined registration operation information indicate distributor to first server into It has gone online operation, then the first IP address has been added in data record;If predetermined registration operation information indicates distributor to first Server has carried out offline operation, then deletes the first IP address from data record.After directly having operated database in this way, Newest cluster mapping relations can be seen on the page of CMDB.
Distributor send circular mail to preset mail reception human hair according to parsing result.It is carried in circular mail The information of predetermined registration operation and the first IP address, in this way, after mail reception people receives circular mail, it can be according to predetermined registration operation Information know carried out it is online operation or offline operation, know distributor to which server according to the first IP address Predetermined registration operation is carried out, the information of the predetermined registration operation carried in circular mail and the first IP address are combined, it will be able to know Distributor has carried out handover operation to which server, and is able to know that and has carried out online operation or offline operation, Reach the technical effect of down status on timely monitoring server.
For distributor according to parsing result record log (following first logs), the log of record includes the switching of server Movement is online operation or offline operation, distributor have carried out handover operation to which server.Administrative staff are by looking into Read the log, it will be able to know the upper offline situation of server.
Citing is illustrated below:
/ var/log/keepalived.log file is read on cluster in real time, and whether is occurred in monitoring objective log The appearance of " Adding " (rear end is online) or " Removing " (rear end is offline) content.Include " Adding ", " Removing " Content is preset content.
If there is preset content, the content of appearance is stored as action first, such as " Adding " or " Removing ", " Adding ", " Removing " are predetermined registration operation information.Then the row log is parsed, with obtaining the IP in first [] number Address (Virtual Service IP address vip, i.e. the 2nd IP in location (address rs rsip, i.e. the first IP address) and second [] number Location) it stores, log example is as follows:
Removing service[10.200.40.161]:80from VS[121.52.220.89]:80
Three values can be stored by summarizing in memory, be respectively:
Action:<adding | removing>(predetermined registration operation information)
Rsip:xxxx (the first IP address)
Vip:xxxx (the second IP address)
Embodiment 3
In conjunction with Fig. 3 to the embodiment of the present invention includes 4 modules be illustrated.
Cluster log monitoring module
The module is deployed on cluster, real-time reading/var/log/keepalived.log file, and is monitored in log and be The no appearance for " Adding " (rear end is online) or " Removing " (rear end is offline) content occur, if there is first by appearance Content be stored as action, such as " Adding or " Removing " then parse the row log, obtain in first [] number Address (Virtual Service IP address vip) in IP address (rs address rsip) and second [] number stores, and total three below Module sends notice and data retrieval etc. and uses, and log example is as follows:
Removing service[10.200.40.161]:80from VS[121.52.220.89]:80
Three values can be stored by summarizing in memory, be respectively:
Action:<adding|removing>
Rsip:xxxx
Vip:xxxx
These three values are finally transmitted to three modules hereafter simultaneously.
Mail notification module
It is equally deployed on distributor, receives three values that module 1 transmits and write logical according to the template set in advance in advance Know mail, be sent to the pre-set mail reception people of program, this people can custom-configure, and be usually set to O&M people Member.
CMDB data update module
It is equally deployed on distributor, receives three values that module 1 transmits, active link [HTML] CMDB database passes through vip value Corresponding collection group records are retrieved, then judge the value of action variable, if it is adding, then record is changed, rip is added Into data record, if it is removing, then record is changed, rip is deleted from data record.Number has directly been operated in this way Newest cluster mapping relations can be seen behind library, on the page of CMDB.
Switch history module
It is equally deployed on distributor, receives three values that module 1 transmits and recorded according to the logging template set in advance The log of current online or offline movement, log number are as follows:
There is state change in the cluster of vip xxxx in [2017-03-06 12:00] Rsip xxxx:<action>
The log (above-mentioned first log) is stored in a local mount directory, this catalogue is a teleengineering support The module is all disposed on all distributors in location, and log path is all this teleengineering support address, then the cluster of the whole network Change journal has just all been stored in the same position, can be supplied to personnel and carry out united analysis.
This programme has been placed on distributor end for informing mechanism is monitored, and above and below distributor when the rs of line back end, not only can Mail notification is issued, rs can also be changed to real-time update into CMDB system, allow in CMDB the cluster status recorded more accurate, Variation history can also be stored to the Analysis of Policy Making that server availability is carried out for operation maintenance personnel.
Perfection of the present invention has been filled up keepalived+lvs and has been carried in balancing cluster, and rs goes up logical in offline process in the cluster Know/data record/switching log recording function.
The monitoring method of offer of the embodiment of the present invention, is a kind of mechanism of offline switching notice on Rs, and Rs is upper offline to be cut After changing, CMDB system can update data information at once, reach the technical effect of timely monitoring server switching state.
Embodiment 4
The embodiment of the invention also provides a kind of monitoring device, which is located on server cluster.The monitoring device is used Monitoring method in execution embodiment 1.Fig. 4 is a kind of schematic diagram of optional monitoring device according to an embodiment of the present invention, As shown in figure 4, the device includes: monitoring unit 10, resolution unit 20, transmission unit 30.
Monitoring unit 10, for whether there is preset content in monitoring objective log, wherein preset content divides for indicating The operation that hair device carries out server.
Resolution unit 20 in the case where for occurring preset content in target journaling, parses target journaling, is parsed As a result.
Transmission unit 30, for sending parsing result to distributor, so that distributor is following according to parsing result execution One or more of operation: it updates the data information in CMDB database, send circular mail, record log.
Optionally, parsing result includes predetermined registration operation information, the first IP address and the second IP address, and resolution unit 20 is wrapped It includes: storing sub-units, parsing subunit.Storing sub-units, for preset content to be stored as predetermined registration operation information.Parsing is single Member obtains the first IP address and the second IP address for parsing preset content log of the row, wherein the first IP address is The IP address of first server, the second IP address are Virtual Service IP address, and distributor has carried out default behaviour to first server Make.
The monitoring device includes processor and memory, above-mentioned monitoring unit 10, resolution unit 20, transmission unit 30 etc. In memory as program unit storage, above procedure unit stored in memory is executed by processor to realize phase The function of answering.
Include kernel in processor, is gone in memory to transfer corresponding program unit by kernel.Kernel can be set one Or more, the upper offline situation of monitoring server is carried out by adjusting kernel parameter.
Memory may include the non-volatile memory in computer-readable medium, random access memory (RAM) and/ Or the forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flashRAM), memory includes at least one storage Chip.
The embodiment of the invention provides a kind of storage mediums, are stored thereon with program, real when which is executed by processor The existing monitoring method.
The embodiment of the invention provides a kind of processor, the processor is for running program, wherein described program operation Monitoring method described in Shi Zhihang.
The embodiment of the invention provides a kind of equipment, equipment include processor, memory and storage on a memory and can The program run on a processor, processor perform the steps of when executing program
Whether there is preset content in monitoring objective log, wherein the preset content is for indicating distributor to service The operation that device carries out;In the case where there is the preset content in the target journaling, the target journaling is parsed, is solved Analyse result;The parsing result is sent to the distributor, so that the distributor is following according to parsing result execution One or more of operation: it updates the data information in CMDB database, send circular mail, record log.
The preset content is stored as the predetermined registration operation information;Preset content log of the row is parsed, is obtained To first IP address and second IP address, wherein first IP address is the IP address of first server, described Second IP address is Virtual Service IP address, and the distributor has carried out predetermined registration operation to the first server.
Equipment herein can be server, PC, PAD, mobile phone etc..
Present invention also provides a kind of computer program products, when executing on data processing equipment, are adapted for carrying out just The program of beginningization there are as below methods step:
Whether there is preset content in monitoring objective log, wherein the preset content is for indicating distributor to service The operation that device carries out;In the case where there is the preset content in the target journaling, the target journaling is parsed, is solved Analyse result;The parsing result is sent to the distributor, so that the distributor is following according to parsing result execution One or more of operation: it updates the data information in CMDB database, send circular mail, record log.
The preset content is stored as the predetermined registration operation information;Preset content log of the row is parsed, is obtained To first IP address and second IP address, wherein first IP address is the IP address of first server, described Second IP address is Virtual Service IP address, and the distributor has carried out predetermined registration operation to the first server.
Embodiment 5
The embodiment of the invention also provides a kind of monitoring device, which is located on distributor, and the monitoring device is for holding Monitoring method in row embodiment 2.Fig. 5 is the schematic diagram of another optional monitoring device according to an embodiment of the present invention, such as Shown in Fig. 5, which includes: receiving unit 40, execution unit 50.
Receiving unit 40, for receiving the parsing result of cluster server transmission, wherein parsing result is in cluster service Occur parsing what target journaling obtained in the case where preset content in the target journaling of device.
Execution unit 50, for executing one or more of following operation according to parsing result: updating CMDB database In data information, send circular mail, record log.
Optionally, parsing result includes predetermined registration operation information, the first IP address and the second IP address, and execution unit 50 wraps It includes: link subelement, retrieval subelement, operation subelement.Subelement is linked, for linking CMDB database.Subelement is retrieved, For retrieving collection group records associated with the second IP address from CMDB database.Subelement is operated, for according to default behaviour Make information and the first IP address is added or is deleted from collection group records.First IP address is the IP address of first server, Second IP address is Virtual Service IP address, and distributor has carried out predetermined registration operation to first server.
The monitoring device includes processor and memory, and above-mentioned receiving unit 40, execution unit 50 etc. are used as program Unit stores in memory, executes above procedure unit stored in memory by processor to realize corresponding function.
Include kernel in processor, is gone in memory to transfer corresponding program unit by kernel.Kernel can be set one Or more, the upper offline situation of monitoring server is carried out by adjusting kernel parameter.
Memory may include the non-volatile memory in computer-readable medium, random access memory (RAM) and/ Or the forms such as Nonvolatile memory, if read-only memory (ROM) or flash memory (flash RAM), memory include that at least one is deposited Store up chip.
The embodiment of the invention provides a kind of storage mediums, are stored thereon with program, real when which is executed by processor The existing monitoring method.
The embodiment of the invention provides a kind of processor, the processor is for running program, wherein described program operation Monitoring method described in Shi Zhihang.
The embodiment of the invention provides a kind of equipment, equipment include processor, memory and storage on a memory and can The program run on a processor, processor perform the steps of when executing program
Receive the parsing result that cluster server is sent, wherein the parsing result is the mesh in the cluster server Occur parsing what the target journaling obtained in the case where preset content in mark log;Following behaviour is executed according to the parsing result One or more of make: it updates the data information in CMDB database, send circular mail, record log.
Link the CMDB database;Cluster associated with second IP address is retrieved from the CMDB database Record;First IP address is added or is deleted from the collection group records according to the predetermined registration operation information.First IP address is the IP address of first server, and the second IP address is Virtual Service IP address, and distributor carries out first server Predetermined registration operation.
The predetermined registration operation information, first IP address and second IP address are inserted into the first default template, obtained To the first log;First log is stored in local default mount directory.
The predetermined registration operation information, first IP address and second IP address are inserted into the second default template, obtained To circular mail;The circular mail is sent to preset address.
Equipment herein can be server, PC, PAD, mobile phone etc..
Present invention also provides a kind of computer program products, when executing on data processing equipment, are adapted for carrying out just The program of beginningization there are as below methods step:
Receive the parsing result that cluster server is sent, wherein the parsing result is the mesh in the cluster server Occur parsing what the target journaling obtained in the case where preset content in mark log;Following behaviour is executed according to the parsing result One or more of make: it updates the data information in CMDB database, send circular mail, record log.
Link the CMDB database;Cluster associated with second IP address is retrieved from the CMDB database Record;First IP address is added or is deleted from the collection group records according to the predetermined registration operation information.First IP address is the IP address of first server, and the second IP address is Virtual Service IP address, and distributor carries out first server Predetermined registration operation.
The predetermined registration operation information, first IP address and second IP address are inserted into the first default template, obtained To the first log;First log is stored in local default mount directory.
The predetermined registration operation information, first IP address and second IP address are inserted into the second default template, obtained To circular mail;The circular mail is sent to preset address.
It should be understood by those skilled in the art that, embodiments herein can provide as method, system or computer program Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the application Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the application, which can be used in one or more, The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces The form of product.
The application is referring to method, the process of equipment (system) and computer program product according to the embodiment of the present application Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates, Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one The step of function of being specified in a box or multiple boxes.
In a typical configuration, calculating equipment includes one or more processors (CPU), input/output interface, net Network interface and memory.
Memory may include the non-volatile memory in computer-readable medium, random access memory (RAM) and/ Or the forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flashRAM).Memory is computer-readable medium Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method Or technology come realize information store.Information can be computer readable instructions, data structure, the module of program or other data. The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), moves State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable Programmable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM), Digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or other magnetic storage devices Or any other non-transmission medium, can be used for storage can be accessed by a computing device information.As defined in this article, it calculates Machine readable medium does not include temporary computer readable media (transitory media), such as the data-signal and carrier wave of modulation.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability It include so that the process, method, commodity or the equipment that include a series of elements not only include those elements, but also to wrap Include other elements that are not explicitly listed, or further include for this process, method, commodity or equipment intrinsic want Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including element There is also other identical elements in process, method, commodity or equipment.
It will be understood by those skilled in the art that embodiments herein can provide as method, system or computer program product. Therefore, complete hardware embodiment, complete software embodiment or embodiment combining software and hardware aspects can be used in the application Form.It is deposited moreover, the application can be used to can be used in the computer that one or more wherein includes computer usable program code The shape for the computer program product implemented on storage media (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) Formula.
The above is only embodiments herein, are not intended to limit this application.To those skilled in the art, Various changes and changes are possible in this application.It is all within the spirit and principles of the present application made by any modification, equivalent replacement, Improve etc., it should be included within the scope of the claims of this application.

Claims (10)

1. a kind of monitoring method characterized by comprising
Whether there is preset content in monitoring objective log, wherein the preset content is for indicating distributor to cluster service The operation that device carries out;
In the case where there is the preset content in the target journaling, the target journaling is parsed, parsing result is obtained;
The parsing result is sent to the distributor, so that the distributor executes following operation according to the parsing result One or more of: it updates the data information in configuration management database CMDB, send circular mail, record log.
2. the method according to claim 1, wherein the parsing result includes predetermined registration operation information, the first IP Address and the second IP address, parse the target journaling, obtain parsing result, comprising:
The preset content is stored as the predetermined registration operation information;
Preset content log content of the row is parsed, first IP address and second IP address are obtained, wherein First IP address is the IP address of first server, and second IP address is Virtual Service IP address, the distributor Predetermined registration operation has been carried out to the first server.
3. a kind of monitoring method characterized by comprising
Receive the parsing result that cluster server is sent, wherein the parsing result is the target day in the cluster server Occur parsing what the target journaling obtained in the case where preset content in will;
One or more of following operation is executed according to the parsing result: updating the data in configuration management database CMDB Information sends circular mail, record log.
4. according to the method described in claim 3, it is characterized in that, the parsing result includes predetermined registration operation information, the first IP Address and the second IP address, wherein first IP address is the IP address of first server, and second IP address is virtual Service IP address, distributor have carried out predetermined registration operation to the first server, update configuration management according to the parsing result Data information in database CMDB, comprising:
Link the CMDB database;
Collection group records associated with second IP address are retrieved from the CMDB database;
First IP address is added or is deleted from the collection group records according to the predetermined registration operation information.
5. according to the method described in claim 3, it is characterized in that, the parsing result includes predetermined registration operation information, the first IP Address and the second IP address, according to the parsing result record log, comprising:
The predetermined registration operation information, first IP address and second IP address are inserted into the first default template, obtain the One log;
First log is stored in local default mount directory.
6. according to the method described in claim 3, it is characterized in that, the parsing result includes predetermined registration operation information, the first IP Address and the second IP address send circular mail according to the parsing result, comprising:
The predetermined registration operation information, first IP address and second IP address are inserted into the second default template, led to Know mail;
The circular mail is sent to preset address.
7. a kind of monitoring device characterized by comprising
Monitoring unit, for whether there is preset content in monitoring objective log, wherein the preset content is for indicating distribution The operation that device carries out cluster server;
Resolution unit in the case where for the preset content occur in the target journaling, parses the target journaling, obtains To parsing result;
Transmission unit, for sending the parsing result to the distributor, so that the distributor is tied according to the parsing Fruit executes one or more of following operation: update the data information in configuration management database CMDB, send circular mail, Record log.
8. a kind of monitoring device characterized by comprising
Receiving unit, for receiving the parsing result of cluster server transmission, wherein the parsing result is taken in the cluster It is engaged in occurring parsing what the target journaling obtained in the case where preset content in the target journaling of device;
Execution unit, for executing one or more of following operation according to the parsing result: updating configuration management data Data information, transmission circular mail, record log in the CMDB of library.
9. a kind of storage medium, which is characterized in that the storage medium includes the program of storage, wherein described program right of execution Benefit require any one of 3 to 6 described in monitoring method.
10. a kind of processor, which is characterized in that the processor is for running program, wherein right of execution when described program is run Benefit require any one of 3 to 6 described in monitoring method.
CN201710740576.5A 2017-08-24 2017-08-24 Monitoring method and device, storage medium and processor Active CN109428914B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710740576.5A CN109428914B (en) 2017-08-24 2017-08-24 Monitoring method and device, storage medium and processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710740576.5A CN109428914B (en) 2017-08-24 2017-08-24 Monitoring method and device, storage medium and processor

Publications (2)

Publication Number Publication Date
CN109428914A true CN109428914A (en) 2019-03-05
CN109428914B CN109428914B (en) 2022-01-25

Family

ID=65500829

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710740576.5A Active CN109428914B (en) 2017-08-24 2017-08-24 Monitoring method and device, storage medium and processor

Country Status (1)

Country Link
CN (1) CN109428914B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101707632A (en) * 2009-10-28 2010-05-12 浪潮电子信息产业股份有限公司 Method for dynamically monitoring performance of server cluster and alarming real-timely
CN103838867A (en) * 2014-03-20 2014-06-04 网宿科技股份有限公司 Log processing method and device
US20150073613A1 (en) * 2013-09-10 2015-03-12 Max Chin Li Smart cloud service power outlet with surge protection and cloud service power consumption monitoring system
CN106777371A (en) * 2017-01-23 2017-05-31 北京齐尔布莱特科技有限公司 Result collection system and method
CN110754063A (en) * 2017-06-19 2020-02-04 思科技术公司 Verifying endpoint configuration between nodes

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101707632A (en) * 2009-10-28 2010-05-12 浪潮电子信息产业股份有限公司 Method for dynamically monitoring performance of server cluster and alarming real-timely
US20150073613A1 (en) * 2013-09-10 2015-03-12 Max Chin Li Smart cloud service power outlet with surge protection and cloud service power consumption monitoring system
CN103838867A (en) * 2014-03-20 2014-06-04 网宿科技股份有限公司 Log processing method and device
CN106777371A (en) * 2017-01-23 2017-05-31 北京齐尔布莱特科技有限公司 Result collection system and method
CN110754063A (en) * 2017-06-19 2020-02-04 思科技术公司 Verifying endpoint configuration between nodes

Also Published As

Publication number Publication date
CN109428914B (en) 2022-01-25

Similar Documents

Publication Publication Date Title
CN104769582B (en) For the real time data releasing of power grid
CN103761309B (en) Operation data processing method and system
CN104486445B (en) Distributed extendable resource monitoring system based on cloud platform
CN107850882B (en) Automation and control distributed
CN105653425B (en) Monitoring system based on complex event processing engine
CN105229973B (en) The composition of network and the visualization system of action
CN100525288C (en) Method and apparatus for large payload distribution in network
CN104731690B (en) Adaptive metrology collection, storage and warning threshold
CN105897946A (en) Obtaining method and system of access address
CN103034541B (en) A kind of distributed information system and equipment therein and method
CN105072172A (en) Content delivery network based hot spot statistic and pushing method and system
CN106909475A (en) Row data backup, the method and apparatus recovered are stored in based on object
CN107888666A (en) A kind of cross-region data-storage system and method for data synchronization and device
CN102932204A (en) Monitoring method and monitoring system of content delivery network
CN105872110B (en) A kind of cloud platform service management and device
CN108696400A (en) network monitoring method and device
CN110213203A (en) Network dispatching method, device and computer storage medium
KR20220124717A (en) Systems and Methods for Autonomous Monitoring and Recovery in Hybrid Energy Management
CN108390907B (en) Management monitoring system and method based on Hadoop cluster
US11388109B2 (en) Hierarchical capacity management in a virtualization environment
CN106851342A (en) A kind of design architecture of content arrangement distribution network
CN100413257C (en) Network element warning data obtaining method
CN106547790A (en) A kind of relevant database service system
US10761862B2 (en) Method and device for adding indicative icon in interactive application
CN106326280A (en) Data processing method, apparatus and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 100083 No. 401, 4th Floor, Haitai Building, 229 North Fourth Ring Road, Haidian District, Beijing

Applicant after: Beijing Guoshuang Technology Co.,Ltd.

Address before: 100086 Beijing city Haidian District Shuangyushu Area No. 76 Zhichun Road cuigongfandian 8 layer A

Applicant before: Beijing Guoshuang Technology Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant