Summary of the invention
The purpose of the application is to provide a kind of distributed system data monitoring method, the distributed system data monitoring methodEffective monitoring to system data in distributed type assemblies can be achieved, not only improve the monitoring efficiency of system data, more reduceThe wasting of resources;The another object of the application is to provide a kind of distributed system data monitoring device, equipment and computer-readableStorage medium, it may have above-mentioned beneficial effect.
In order to solve the above technical problems, this application provides a kind of distributed system data monitoring method, the distributionSystem data monitoring method includes:
Process and data storage process are collected according to the data acquisition instructions log-on data received;
System data is acquired by the data collection process;
The system data is saved to database by the data storage process;
When receiving data monitoring instruction, log-on data alerts process;
By the data alert process read the system data in the database, by the system data with it is rightThe level threshold value answered is compared, and when the system data is unsatisfactory for the level threshold value, issues warning information.
It is preferably, described to be saved the system data to database by the data storage process, comprising:
The system of the data collection process acquisition is obtained according to prefixed time interval by the data storage processSystem data;
The system data is saved to the database.
It is preferably, described to save the system data to the database, comprising:
Classify according to pointer type to the system data, obtains sorted system data;
The sorted system data is saved to the database.
Preferably, the distributed system data monitoring method further include:
According to the data idsplay order received, the system data is sent to by display equipment by api interface and is carried outDisplay.
Preferably, the distributed system data monitoring method further include:
Process is alerted by the data, and the level threshold value is read in preset configuration file.
Preferably, the sending warning information, comprising:
The warning information is sent to the user terminal in the form of mail;
Alarm command is issued to warning device according to the warning information.
Preferably, the distributed system data monitoring method further include:
System data after repairing is received, system data after the reparation is compared with the level threshold value, when describedWhen system data meets the level threshold value after reparation, alarm restoration information is issued.
In order to solve the above technical problems, this application provides a kind of distributed system data monitoring device, the distributionSystem data monitoring device includes:
First process initiation module, for being deposited according to the data acquisition instructions log-on data collection process and data that receiveStorage process;
System Data Collection Module;For being acquired by the data collection process to system data;
System data preserving module, for being saved the system data to database by the data storage process;
Second process initiation module, for when receiving data monitoring instruction, log-on data to alert process;
Alarm module reads the system data for alerting process by the data, by institute in the databaseIt states system data to be compared with corresponding level threshold value, when the system data is unsatisfactory for the level threshold value, issues and accuseAlert information.
In order to solve the above technical problems, this application provides a kind of distributed system data monitoring equipment, the distributionSystem data monitors
Memory, for storing computer program;
Processor realizes any one of the above distributed system data monitoring method when for executing the computer programThe step of.
In order to solve the above technical problems, this application provides a kind of computer readable storage medium, it is described computer-readableComputer program is stored on storage medium, the computer program realizes any one of the above distribution when being executed by processorThe step of system data monitoring method.
A kind of distributed system data monitoring method provided herein, including according to the data acquisition instructions receivedLog-on data collects process and data storage process;System data is acquired by the data collection process;Pass through instituteData storage process is stated to save the system data to database;When receiving data monitoring instruction, log-on data alarmProcess;By the data alert process read the system data in the database, by the system data with it is correspondingLevel threshold value be compared, when the system data is unsatisfactory for the level threshold value, issue warning information.
As it can be seen that distributed system data monitoring method provided herein, by the monitoring function and alarm function in systemIt can combine, realize effective monitoring to system data in distributed system.It is stored first by data collection process and dataThe collection and storage of process completion data;Further, system data data collection process acquired based on data alarm processIt is alerted, i.e., using the acquisition data of monitor portion as the data source of alarm part, realizes effective monitoring of system data.Compared to prior art, the system data of monitor portion acquisition is directly transferred when realizing alarm function, without adopting againCollection, that is, realize the disposable acquisition of system data, not only effectively increases data alarm efficiency, also largely reducesSpace occupancy rate, reduces resource waste, while monitoring management platform data has also been effectively ensured and has shown and alert platform announcementThe consistency of the data source of alert prompt.
A kind of distributed system data monitoring device, equipment and computer readable storage medium provided herein,Also there is above-mentioned beneficial effect, details are not described herein.
Specific embodiment
The core of the application is to provide a kind of distributed system data monitoring method, the distributed system data monitoring methodEffective monitoring to system data in distributed type assemblies can be achieved, not only improve the monitoring efficiency of system data, more reduceThe wasting of resources;Another core of the application is to provide a kind of distributed system data monitoring device, equipment and computer-readableStorage medium, it may have above-mentioned beneficial effect.
To keep the purposes, technical schemes and advantages of the embodiment of the present application clearer, below in conjunction with the embodiment of the present applicationIn attached drawing, the technical scheme in the embodiment of the application is clearly and completely described, it is clear that described embodiment isSome embodiments of the present application, instead of all the embodiments.Based on the embodiment in the application, those of ordinary skill in the artAll other embodiment obtained without making creative work, shall fall in the protection scope of this application.
In prior art, distributed type assemblies field mostly uses single monitoring or alarm module to supervise system in real timeCharge police, but since monitoring module and alarm module are mutually indepedent, the two is required to carry out the acquisition of system data, be equivalent intoIt has gone the acquisition of system data twice, has not only caused time waste, reduce data alarm efficiency, more largely increaseThe space occupancy rate of system, causes the wasting of resources.Therefore, to solve the above problems, this application provides a kind of distributionsSystem data monitoring method, the distributed system data monitoring method by system monitoring function and alarm function combine,The system data that monitor portion acquisition is directly transferred when realizing alarm function realizes system data without resurveyingDisposable acquisition, not only effectively increase data alarm efficiency, also largely reduce space occupancy rate, reduceThe wasting of resources, while the consistency that management platform data showed and alerted the data source of platform alarm prompt has also been effectively ensured.
Referring to FIG. 1, Fig. 1 is a kind of flow diagram of distributed system data monitoring method provided herein,The distributed system data monitoring method may include:
S101: process and data storage process are collected according to the data acquisition instructions log-on data received;
Specifically, being provided with a large amount of calculate node in distributed cluster system, it can be used to realize the phase of system dataPass processing, therefore, can choose one of calculate node as main controlled node, to realize the monitoring of system data.When the master controlWhen node receives data acquisition instructions, can be collected based on the data acquisition instructions log-on data process and data store intoJourney, wherein data collection process can be used for realizing the acquisition of system data, and data storage process can be used for realizing system dataStorage.
It should be noted that above-mentioned main controlled node can be any one of numerous calculate nodes in distributed cluster systemIt is a, not uniquely.In addition, above-mentioned data acquisition instructions can be issued to main controlled node based on client for user.
S102: system data is acquired by data collection process;
This step is intended to realize the acquisition of system data based on data collection process.But it should be recognized that the data are receivedCollection process is set in each calculate node, i.e., has its corresponding data collection process in each calculate node.Therefore, intoWhen the acquisition of row system data, main controlled node can forward it to each calculating section after receiving above-mentioned data acquisition instructionsPoint, in order to start the data collection process in each calculate node;Further, each calculate node can run the number of itselfThe acquisition of system data is carried out according to the process of collection.
Wherein, for the particular content and type of above system data, the application is not specifically limited, can by user according toActual demand is configured in advance, such as, it may include distribution is set into the performance indicator data of group's system and all node hardwaresStandby state index data, such as the status information of power supply, network interface card, disk.
Further, it after the acquisition of each calculate node completion system data, is also sent in other calculate nodes,It realizes data sharing, if the system data of a calculate node is lost, is obtained directly from other calculate nodes, effectivelyIt ensure that the integrality of system data.
In addition, for the information communication between above-mentioned main controlled node and each calculate node, i.e., above-mentioned data acquisition instructionsForwarding and system data it is shared, TCP/UDP (Transmission Control Protocol/User can be passed throughDatagram Protocol)) protocol realization, such as the shared of system data is realized by way of UDP message broadcasting.
S103: system data is saved to database by data storage process;
This step is intended to realize the storage of system data based on data storage process.It should be noted that the data storeProcess is set on main controlled node.Therefore, it when carrying out the storage of system data, can be traversed by the data storage process allCalculate node obtains the system data based on data collection process acquisition in each calculate node, and is saved to database.
Preferably, system data is saved to database above by data storage process, may include being deposited by dataStorage process obtains the system data of data collection process acquisition according to prefixed time interval;System data is saved to database.
Specifically, can be pressed when main controlled node obtains system data in each calculate node by data storage processPeriodic polling is carried out to each calculate node according to prefixed time interval, to obtain corresponding system data, and is saved to numberAccording to library.Wherein, for the specific value of above-mentioned prefixed time interval, customized setting can be carried out by user according to the actual situation,The application without limitation, for example, in this application, being set to 10 seconds, i.e., at interval of 10 seconds to all calculating in systemNode carries out a poll.
Preferably, above-mentioned to save system data to database, it may include being carried out according to pointer type to system dataClassification, obtains sorted system data;Sorted system data is saved to database.
Specifically, being saved to database for convenient for carrying out subsequent displaying and analysis to the system data of acquisitionBefore, also classification processing further can be carried out to it, i.e., classified according to pointer type to it, obtain sorted system numberAccording to being further saved in database under corresponding catalogue.
Certainly, the above classification method is only that uniquely existing skill does not can be used in a kind of embodiment provided hereinAny one classification method in art, the application do not limit this.For example, it is also possible to according to the time, as the date classifiesDeng.
S104: when receiving data monitoring instruction, log-on data alerts process;
Specifically, this step is intended to the alarm function of activation system, i.e., when receiving data monitoring instruction, log-on dataAlarm process.Wherein, above-mentioned data monitoring instruction is similar to above-mentioned data acquisition instructions, can be issued for user based on clientTo main controlled node;Data alarm process can be used for realizing the alarm to pathological system data, and start-up course is similar to above-mentionedThe starting of data collection process and data storage process, details are not described herein by the application.
S105: process is alerted by data and reads system data in the database, by system data and corresponding standard thresholdValue is compared, and when system data is unsatisfactory for level threshold value, issues warning information.
Specifically, the system number of data storage process storage can be read in the database after data alarm process initiationAccording to, and it is compared with corresponding level threshold value, judge whether it meets level threshold value, if meeting level threshold value, saysThe bright system data is normal data, i.e., system is in normal operating condition, and fault-free occurs, corresponding, can also further be sent outThe information that system operates normally out is to corresponding equipment, such as mobile terminal, terminal presentation facility;If the system data readIt is unsatisfactory for level threshold value, then illustrates that the system data is that fault data namely system are in abnormal operational conditions, at this point, hairCorresponding warning information out, to notify user to carry out fault restoration in time.And mode specifically is issued for warning information,The application is not specifically limited.
Wherein, above-mentioned standard threshold value and system data correspond, and value is generally system default threshold value, certainly,Meet the manual modification for being applied to special screne, flexibility with higher.In addition, the level threshold value can be pre-stored within accordinglyMemory space in, be read out and be can be obtained by data alarm process.Certainly, for the reading of the level threshold value, can with it is upperIt states the reading of system data while carrying out, the two can also be carried out according to sequencing, specific implementation has no effect on thisThe implementation of technical solution.
Preferably, which can also include that process is alerted by data in preset configuration textLevel threshold value is read in part.
Specifically, being pre-stored within this application provides a kind of storage mode of more specific level threshold valueIn configuration file, when needing that system data is compared, is read directly in the configuration file by data alarm process and beIt can.
Preferably, above-mentioned sending warning information may include being sent to the user terminal warning information in the form of mail;Alarm command is issued to warning device according to warning information.
Specifically, issuing mode this application provides a kind of more specific warning information, i.e., by it with the shape of mailFormula is sent to the user terminal;It is further the timeliness for guaranteeing fault restoration, can also issues alarm command to corresponding alarm and setIt is standby, such as buzzer.
Certainly, the mode that issues of above-mentioned warning information is only a kind of preferred embodiment provided herein, not uniquely,It can also be sent to customer mobile terminal in the form that short message, wechat push, can also be the modes such as voice prompting.Likewise,For the information that above system operates normally, this method realization equally can be used.
It should be noted that above-mentioned S101 to S103 realizes the monitoring function of system, S104 to S105 realizes systemAlarm function, as a result, i.e. realize in distributed type assemblies monitor with alert merge, further complete to system dataMonitoring.
Distributed system data monitoring method provided herein mutually ties the monitoring function in system with alarm functionIt closes, realizes effective monitoring to system data in distributed system.It is complete by data collection process and data storage process firstAt the collection and storage of data;Further, the system data acquired based on data alarm process to data collection process is accusedIt is alert, i.e., using the acquisition data of monitor portion as the data source of alarm part, realize effective monitoring of system data.Compared toPrior art directly transfers the system data of monitor portion acquisition when realizing alarm function, without resurveying, i.e., in factThe disposable acquisition for having showed system data not only effectively increases data alarm efficiency, also largely reduces spaceOccupancy reduces resource waste, while monitoring management platform data has also been effectively ensured and has shown and alert platform alarm promptData source consistency.
On the basis of the various embodiments described above, as a kind of preferred embodiment, the distributed system data monitoring method is alsoIt may include according to the data idsplay order received, by api interface, (Application Program Interface, is answeredWith routine interface) by system data be sent to display equipment show.
For the system data obtained during system monitoring, it can also be shown, such as graphic software platform, listChange display etc., easily facilitates the analysis and processing of user.Specifically, when receiving data idsplay order, main controlled node isCorresponding system data can be transferred in the database according to the data idsplay order, and corresponding show is sent to by api interfaceShow that equipment is shown, display of the management platform to system data is furthermore achieved, it is aobvious that management platform data has been effectively ensuredShow and alert platform alarm prompt data source consistency.Wherein, for the acquisition modes of above-mentioned data idsplay order, referenceAbove-mentioned data acquisition instructions, data monitoring instruction, details are not described herein by the application.
For other realization steps of the embodiment of the present application, referring to a upper embodiment, details are not described herein by the application.
On the basis of the various embodiments described above, as a kind of preferred embodiment, the distributed system data monitoring method is alsoIt may include receiving system data after reparation, system data after reparation be compared with level threshold value, system number after reparationWhen according to meeting level threshold value, alarm restoration information is issued.
Specifically, distributing data monitoring method provided herein, can also further realize alarm restoration informationIt issues, i.e. system data after main controlled node gets reparation, and it is compared with corresponding level threshold value, determine that this is repairedWhen system data meets level threshold value after multiple, i.e., when the system data of failure restores normal, i.e., capable of emitting corresponding alarm is repairedInformation.Wherein, mode specifically is issued for the alarm restoration information, can refer to above-mentioned warning information and system operates normallyInformation issues mode, and details are not described herein by the application.
For other realization steps of the embodiment of the present application, referring to a upper embodiment, details are not described herein by the application.
On the basis of above-mentioned each embodiment, this application provides a kind of more specifically distributed system data monitoringsMethod.
Firstly, disposing Monitor module, i.e. monitoring module in distributed cluster system, which includes two residentProcess, respectively data collection process (collecting) and data storage process (Storing), wherein Storing is deployed inOn the host node of system cluster, i.e., above-mentioned main controlled node, collecting is deployed on all back end, i.e., above-mentioned calculating sectionPoint.Wherein, the collecting of each calculate node collects the system data of own node, the collecting of each calculate nodeBetween can pass through TCP/UDP agreement shared system data;The Storing of main controlled node is responsible for each calculate node of periodic pollingThe system data that collecting is collected, and it is stored in the database of main controlled node according to pointer type.Specifically,Monitor module has a two big functions, and first, the indication information that api interface is inquired in database, i.e. system are provided for management platformData;Second, it is Alarm module, i.e. alarm module provides data source, and Alarm module is sentenced by inquiring these system datasIt is disconnected whether to be alerted.
Secondly, Alarm module is disposed on main controlled node, the system data being responsible in detection Monitor module database,And be compared it with the level threshold value set in itself configuration file, if being unsatisfactory for level threshold value condition, pass through in timeThe form of mail or short message is alerted.
The functional module deployment to calculate node each in distributed cluster system, this kind of deployment side are realized as a result,Formula takes full advantage of the advantage that Monitor module collects system data in distributed type assemblies, by the system number of all calculate nodesAccording to collecting and being stored on main controlled node, not only monitoring API can be provided for management platform, can also be provided for Alarm moduleIt is convenient, only the system data of all calculate nodes need to can be obtained by reading database on main controlled node, so that it is determined that beingIt is no to send a warning message or alarm clearing information, play its advantage in terms of alarm prompt.
The technical solution of the application is done with reference to the accompanying drawing and is further described in detail:
Firstly, referring to FIG. 2, Fig. 2 is the process of a kind of system data acquisition and shared method provided hereinFigure.
Specifically, as shown in Fig. 2, two search are respectively represented in system cluster in any two calculate nodeCollecting process, each Collecting collect the system data in own node by extension file, it may include power supplyData, network card data and Disk State data etc.;Further, it is possible to which the form of UDP message broadcasting is sent by corresponding channelOn the system data of own node to other calculate nodes, each calculate node has shared mutual system data as a result,.I.e.It the case where losing the system data for a calculate node occur, can also be obtained by the calculate node of other in clusterIt takes.
Further, referring to FIG. 3, Fig. 3 is the stream of a kind of system data storage and the method for display provided hereinCheng Tu.
Specifically, after system cluster starting, the real-time gathering system data of Collecting of each calculate node in cluster,By Data Share System, what the Storing on main controlled node was collected based on each calculate node Collecting of Transmission Control Protocol pollSystem data, can be obtained the system data of whole system, and store it in database;Storing is also externally mentioned simultaneouslyFor api interface, so that management platform calls.
Further, referring to FIG. 4, Fig. 4 is the stream of the method for a kind of monitoring of system data and alarm provided hereinCheng Tu.
Specifically, system data in the real-time gathering system cluster of Monitor module, and it is stored in the database of main controlled nodeIn, system data may include performance indicator data and hardware achievement data;Meanwhile the module can also provide management platformAPI query interface.On the other hand each system data in Alarm module one side reading database reads system cluster configurationThe level threshold value being arranged in file triggers mail alarm interface if certain system data is unsatisfactory for level threshold value, to configuration fileIn preset addressee send a warning message;If certain system data restores normal, triggers mail alarm and repair interface, toSpecified addressee sends alarm restoration information.
Distributed system data monitoring method provided by the embodiment of the present application, by the monitoring function and alarm function in systemIt can combine, realize effective monitoring to system data in distributed system.It is stored first by data collection process and dataThe collection and storage of process completion data;Further, system data data collection process acquired based on data alarm processIt is alerted, i.e., using the acquisition data of monitor portion as the data source of alarm part, realizes effective monitoring of system data.Compared to prior art, the system data of monitor portion acquisition is directly transferred when realizing alarm function, without adopting againCollection, that is, realize the disposable acquisition of system data, not only effectively increases data alarm efficiency, also largely reducesSpace occupancy rate, reduces resource waste, while monitoring management platform data has also been effectively ensured and has shown and alert platform announcementThe consistency of the data source of alert prompt.
To solve the above problems, referring to FIG. 5, Fig. 5 is that a kind of distributed system data monitoring provided herein fillsThe structural schematic diagram set, the distributed system data monitoring device can include:
First process initiation module 1, for collecting process and data according to the data acquisition instructions log-on data receivedStorage process;
System Data Collection Module 2;For being acquired by data collection process to system data;
System data preserving module 3, for being saved system data to database by data storage process;
Second process initiation module 4, for when receiving data monitoring instruction, log-on data to alert process;
Alarm module 5, for by data alert process read system data in the database, by system data with it is correspondingLevel threshold value be compared, when system data is unsatisfactory for level threshold value, issue warning information.
As a kind of preferred embodiment, above system data storage module 3 may include:
Timing acquisition unit, for obtaining data collection process acquisition according to prefixed time interval by data storage processSystem data;
Data saving unit, for saving system data to database.
As a kind of preferred embodiment, above-mentioned data saving unit can be specifically used for according to pointer type to system data intoRow classification, obtains sorted system data;Sorted system data is saved to database.
As a kind of preferred embodiment, which may also include that
Level threshold value read module reads level threshold value in preset configuration file for alerting process by data.
As a kind of preferred embodiment, above-mentioned alarm module 5 can be specifically used for sending warning information in the form of mailTo user terminal;Alarm command is issued to warning device according to warning information.
As a kind of preferred embodiment, which may also include that
Repair module is alerted, system data after repairing for reception compares system data after reparation with level threshold valueCompared with, when system data meets level threshold value after reparation, sending alarm restoration information.
Above method embodiment is please referred to for the introduction of device provided by the present application, this will not be repeated here by the application.
To solve the above problems, referring to FIG. 6, Fig. 6 is that a kind of distributed system data monitoring provided herein is setStandby structural schematic diagram, the distributed system data monitoring equipment can include:
Memory 11, for storing computer program;
Processor 12 can realize following steps when for executing computer program:
Process and data storage process are collected according to the data acquisition instructions log-on data received;By data collection intoJourney is acquired system data;System data is saved to database by data storage process;When receiving data monitoringWhen instruction, log-on data alerts process;By data alert process read system data in the database, by system data with it is rightThe level threshold value answered is compared, and when system data is unsatisfactory for level threshold value, issues warning information.
Above method embodiment is please referred to for the introduction of equipment provided by the present application, this will not be repeated here by the application.
To solve the above problems, present invention also provides a kind of computer readable storage medium, the computer-readable storageIt is stored with computer program on medium, can be realized when computer program is executed by processor following rapid:
Process and data storage process are collected according to the data acquisition instructions log-on data received;By data collection intoJourney is acquired system data;System data is saved to database by data storage process;When receiving data monitoringWhen instruction, log-on data alerts process;By data alert process read system data in the database, by system data with it is rightThe level threshold value answered is compared, and when system data is unsatisfactory for level threshold value, issues warning information.
The computer readable storage medium may include: USB flash disk, mobile hard disk, read-only memory (Read-OnlyMemory, ROM), random access memory (Random Access Memory, RAM), magnetic or disk etc. is various to depositStore up the medium of program code.
Above method embodiment is please referred to for the introduction of computer readable storage medium provided by the present application, the application existsThis is not repeated them here.
Each embodiment is described in a progressive manner in specification, the highlights of each of the examples are with other realitiesThe difference of example is applied, the same or similar parts in each embodiment may refer to each other.For device disclosed in embodimentSpeech, since it is corresponded to the methods disclosed in the examples, so being described relatively simple, related place is referring to method part illustration?.
Professional further appreciates that, unit described in conjunction with the examples disclosed in the embodiments of the present disclosureAnd algorithm steps, can be realized with electronic hardware, computer software, or a combination of the two, in order to clearly demonstrate hardware andThe interchangeability of software generally describes each exemplary composition and step according to function in the above description.TheseFunction is implemented in hardware or software actually, the specific application and design constraint depending on technical solution.ProfessionTechnical staff can use different methods to achieve the described function each specific application, but this realization is not answeredThink beyond scope of the present application.
The step of method described in conjunction with the examples disclosed in this document or algorithm, can directly be held with hardware, processorThe combination of capable software module or the two is implemented.Software module can be placed in random access memory (RAM), memory, read-only depositReservoir (ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technologyIn any other form of storage medium well known in field.
It to distributed system data monitoring method provided herein, device, equipment and computer-readable deposits aboveStorage media is described in detail.Specific examples are used herein to illustrate the principle and implementation manner of the present application,The description of the example is only used to help understand the method for the present application and its core ideas.It should be pointed out that for this technologyFor the those of ordinary skill in field, under the premise of not departing from the application principle, several improvement can also be carried out to the applicationAnd modification, these improvement and modification also fall into the protection scope element of the claim of this application.