CN109582547A - Electronic device, monitoring data alarm method and storage medium - Google Patents
Electronic device, monitoring data alarm method and storage medium Download PDFInfo
- Publication number
- CN109582547A CN109582547A CN201811512118.7A CN201811512118A CN109582547A CN 109582547 A CN109582547 A CN 109582547A CN 201811512118 A CN201811512118 A CN 201811512118A CN 109582547 A CN109582547 A CN 109582547A
- Authority
- CN
- China
- Prior art keywords
- alarm
- monitoring data
- data
- business
- monitoring
- 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.)
- Pending
Links
- 238000012544 monitoring process Methods 0.000 title claims abstract description 209
- 238000000034 method Methods 0.000 title claims abstract description 43
- 238000013480 data collection Methods 0.000 claims description 16
- 238000012545 processing Methods 0.000 claims description 5
- 230000006870 function Effects 0.000 abstract description 12
- 238000004891 communication Methods 0.000 description 6
- 238000004458 analytical method Methods 0.000 description 5
- 230000008901 benefit Effects 0.000 description 4
- 230000006835 compression Effects 0.000 description 4
- 238000007906 compression Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 4
- 241000092161 Pithys Species 0.000 description 3
- 239000003795 chemical substances by application Substances 0.000 description 2
- 238000013500 data storage Methods 0.000 description 2
- 238000001914 filtration Methods 0.000 description 2
- 238000005192 partition Methods 0.000 description 2
- 230000002688 persistence Effects 0.000 description 2
- 230000005236 sound signal Effects 0.000 description 2
- 238000011161 development Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 230000001550 time effect Effects 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/32—Monitoring with visual or acoustical indication of the functioning of the machine
- G06F11/324—Display of status information
- G06F11/327—Alarm or error message display
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Alarm Systems (AREA)
Abstract
The present invention relates to software supervisions, propose a kind of monitoring data alarm method, comprising: the monitoring data for obtaining each service node in predetermined server cluster, the monitoring data deposit influxdb database that will acquire;The configuration information of alarm business according to the pre-stored data obtains the monitoring data of alarm business from the influxdb;The monitoring data that the alarm business of acquisition is successively analyzed according to monitoring period, selects the monitoring data for meeting predefined warning strategies;The attribute for the monitoring data for meeting warning strategies is alerted.Monitored item historical data can be pulled on demand, reduced memory and used, and alarm configuration is carried out to longer historical data, optimize alarm function.In addition, the present invention also proposes a kind of electronic device and storage medium.
Description
Technical field
The present invention relates to data alarm management field more particularly to a kind of electronic device, monitoring data alarm method and deposit
Storage media.
Background technique
With the rapid development of cloud computing technology, the distribution of computing resource is increasingly concentrated, and the scale of computing cluster is also got over
Come bigger.In order to guarantee the reliable, stable of large-scale cluster, efficient operation, it is desirable to which we carry out computing cluster high in real time
Effect accurately and reliably monitors.And due to the quantity of monitoring data of machine acquisition and its huge, if desired according to monitoring data into
Row alert analysis then needs sufficiently large memory space to be monitored the caching of data.Currently, leading to when carrying out alert analysis
Often monitoring data is cached into memory, the limited storage space as workable for memory, leads to occur resource consumption totally
Risk, or be only capable of analyzing the monitoring data within the scope of finite time, it is unable to satisfy to the prison within the scope of the long period
It controls data and carries out alarm configuration.
Summary of the invention
In view of this, the present invention proposes a kind of electronic device, monitoring data alarm method and storage medium, can draw on demand
Monitored item historical data is taken, memory is reduced and uses, and alarm configuration is carried out to longer historical data, optimize alarm function.
Firstly, to achieve the above object, the present invention proposes a kind of electronic device, the electronic device include memory and
The processor connecting with the memory, the processor are used to execute the monitoring data alarm journey stored on the memory
Sequence, the monitoring data alarm program realize following steps when being executed by the processor:
A1, the monitoring data for obtaining each service node in predetermined server cluster, the monitoring data that will acquire
It is stored in influxdb database;
The configuration information of A2, alarm business according to the pre-stored data obtain the prison of alarm business from the influxdb
Control data;
A3, foundation monitoring period successively analyze the monitoring data of the alarm business of acquisition, select and meet predefined announcement
The pithy monitoring data omited;
A4, the attribute for the monitoring data for meeting warning strategies is alerted.
Preferably, in the step A1, monitoring is installed on each host in the predetermined server cluster
Data collection agent program, the monitoring data collection broker program is by the predefined data on each host according to being pre-configured with
Time interval be acquired, to obtain the monitoring data of each service node.
Preferably, in the step A2, the configuration information of the alarm business is stored in advance in determining database,
The configuration information of the alarm business includes the service identification (Identification, ID) of unique identification alarm business and makees
For the monitoring period of the monitoring data of alarm business process object;The monitoring data is the process object of monitoring business.
Preferably, in the step A3, the predefined warning strategies include the alarm for alarm business setting
Threshold value, the type of the alarm threshold include numeric type or character string type.
Preferably, when the monitoring data alarm program is executed by the processor, following steps are also realized:
The authentication information for obtaining alarm business configuration information is set, and the authentication information includes user name and password;
When the username and password of user's input matches with the username and password of configuration, it is determined as legal use
Family is alerted otherwise, it determines being illegal user.
In addition, to achieve the goals above, the present invention also proposes a kind of monitoring data alarm method, and the method includes such as
Lower step:
S1, the monitoring data for obtaining each service node in predetermined server cluster, the monitoring data that will acquire
It is stored in influxdb database;
The configuration information of S2, alarm business according to the pre-stored data obtain the prison of alarm business from the influxdb
Control data;
S3, foundation monitoring period successively analyze the monitoring data of the alarm business of acquisition, select and meet predefined announcement
The pithy monitoring data omited;
S4, the attribute for the monitoring data for meeting warning strategies is alerted.
Preferably, in the step S1, monitoring is installed on each host in the predetermined server cluster
Data collection agent program, the monitoring data collection broker program is by the predefined data on each host according to being pre-configured with
Time interval be acquired, to obtain the monitoring data of each service node.
Preferably, in the step S2, the configuration information of the alarm business is stored in advance in determining database,
The configuration information of the alarm business includes the service identification (Identification, ID) of unique identification alarm business and makees
For the monitoring period of the monitoring data of alarm business process object;The monitoring data is the process object of monitoring business.
Preferably, in the step S3, the predefined warning strategies include the alarm for alarm business setting
Threshold value, the type of the alarm threshold include numeric type or character string type.
In addition, to achieve the above object, the present invention also proposes a kind of computer readable storage medium, described computer-readable
Storage medium is stored with monitoring data alarm program, and the monitoring data alarm program can be executed by least one processor, with
The step of making at least one described processor execute monitoring data alarm method as described above.
Electronic device, monitoring data alarm method and storage medium proposed by the invention, it is predetermined by obtaining
The monitoring data of each service node in server cluster, the monitoring data deposit influxdb database that will acquire;According to pre-
The configuration information of the alarm business first stored obtains the monitoring data of alarm business from the influxdb;When according to monitoring
Between successively analyze acquisition alarm business monitoring data, select the monitoring data for meeting predefined warning strategies;To symbol
The attribute for closing the monitoring data of warning strategies is alerted.Monitored item historical data can be pulled on demand, reduced memory and used, and
Alarm configuration is carried out to longer historical data, optimizes alarm function.
Detailed description of the invention
Fig. 1 is the schematic diagram of the optional hardware structure of electronic device one proposed by the present invention;
Fig. 2 is the program module schematic diagram of monitoring data alarm program in one embodiment of electronic device of the present invention;
Fig. 3 is the implementation flow chart of monitoring data alarm method preferred embodiment of the present invention.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, right
The present invention is further elaborated.It should be appreciated that described herein, specific examples are only used to explain the present invention, not
For limiting the present invention.Based on the embodiments of the present invention, those of ordinary skill in the art are not before making creative work
Every other embodiment obtained is put, shall fall within the protection scope of the present invention.
It should be noted that the description for being related to " first ", " second " etc. in the present invention is used for description purposes only, and cannot
It is interpreted as its relative importance of indication or suggestion or implicitly indicates the quantity of indicated technical characteristic.Define as a result, " the
One ", the feature of " second " can explicitly or implicitly include at least one of the features.In addition, the skill between each embodiment
Art scheme can be combined with each other, but must be based on can be realized by those of ordinary skill in the art, when technical solution
Will be understood that the combination of this technical solution is not present in conjunction with there is conflicting or cannot achieve when, also not the present invention claims
Protection scope within.
As shown in fig.1, being the optional hardware structure schematic diagram of electronic device one proposed by the present invention.In the present embodiment,
Electronic device 10 may include, but be not limited only to, and connection memory 11, processor 12, net can be in communication with each other by communication bus 14
Network interface 13.It should be pointed out that Fig. 1 illustrates only the electronic device 10 with component 11-14, it should be understood that simultaneously
All components shown realistic are not applied, the implementation that can be substituted is more or less component.
Wherein, memory 11 includes at least a type of computer readable storage medium, computer readable storage medium
Including flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory etc.), random access storage device (RAM), quiet
State random access storage device (SRAM), electrically erasable programmable read-only memory (EEPROM), can be compiled read-only memory (ROM)
Journey read-only memory (PROM), magnetic storage, disk, CD etc..In some embodiments, memory 11 can be electronics dress
Set 10 internal storage unit, such as the hard disk or memory of electronic device 10.In further embodiments, memory 11 can also be with
It is the outer packet storage device of electronic device 10, such as the plug-in type hard disk being equipped on electronic device 10, intelligent memory card (Smart
Media Card, SMC), secure digital (Secure Digital, SD) card, flash card (Flash Card) etc..Certainly, it stores
Device 11 can also both including electronic device 10 internal storage unit and also including its outer packet storage device.In the present embodiment, storage
Device 11 is installed on the operating system and types of applications software of electronic device 10 commonly used in storage, such as monitoring data alerts program
Deng.In addition, memory 11 can be also used for temporarily storing the Various types of data that has exported or will export.
Processor 12 can be in some embodiments central processing unit (Central Processing Unit, CPU),
Controller, microcontroller, microprocessor or other data processing chips.Processor 12 is commonly used in control electronic device 10
Overall operation.In the present embodiment, program code or processing data of the processor 12 for being stored in run memory 11, such as
Monitoring data alarm program of operation etc..
Network interface 13 may include radio network interface or wired network interface, and network interface 13 is commonly used in filling in electronics
It sets and establishes communication connection between 10 and other electronic equipments.
Communication bus 14 is for realizing the communication connection between component 11-13.
Fig. 1 illustrates only the electronic device 10 with component 11-14 and monitoring data alarm program, it should be understood that
It is, it is not required that implement all components shown, the implementation that can be substituted is more or less component.
Optionally, electronic device 10 can also include user interface (not shown in figure 1), and user interface may include display
Device, input unit such as keyboard, wherein user interface can also be including standard wireline interface and wireless interface etc..
Optionally, in some embodiments, display can be light-emitting diode display, liquid crystal display, touch control type LCD and show
Device and OLED touch device etc..Further, display is alternatively referred to as display screen or display unit, for being shown in electronic device
Information is handled in 10 and for showing visual user interface.
Optionally, in some embodiments, electronic device 10 can also include that audio unit (does not show in audio unit Fig. 1
Out), audio unit can be in call signal reception pattern, call mode, logging mode, speech recognition mould in electronic device 10
When under the isotypes such as formula, broadcast reception mode, received or storage audio data is converted into audio signal;Further
Ground, electronic device 10 can also include audio output unit, and the audio signal that audio output unit converts audio unit exports,
And audio output unit can also provide the relevant audio output of specific function that executes to electronic device 10 (such as calling is believed
Number receive sound, message sink sound etc.), audio output unit may include loudspeaker, buzzer etc..
Optionally, in some embodiments, electronic device 10 can also include alarm unit (not shown), alarm list
Member can provide output and the generation of event is notified electron device 10.Typical event may include calling reception, message
Reception, key signals input, touch input etc..Other than audio or video export, alarm unit can be with different sides
Formula provides output with the generation of notification event.For example, alarm unit can provide output in the form of vibration, exhaled when receiving
Cry, message or it is some other can make electronic device 10 enter communication pattern when, alarm unit can provide tactile output (that is,
Vibration) to notify to user.
In one embodiment, it when the monitoring data alarm program stored in memory 11 is executed by processor 12, realizes such as
Lower operation:
A1 obtains the monitoring data of each service node in predetermined server cluster, the monitoring data that will acquire
It is stored in influxdb database;
Specifically, monitoring data collection is installed on each host in the predetermined server cluster and acts on behalf of journey
Sequence, the monitoring data collection broker program is by each worth of data predefined on each host, such as cpu busy percentage, memory benefit
With rate, memory using size, network interface real-time traffic, hard disk use space, exchange partition use space etc., according to matching in advance
The time interval set, for example, time interval takes 1s to be acquired, to obtain the monitoring data of each service node.In this implementation
In example, the monitoring data that needs to obtain the monitoring data of each service node in predetermined server cluster, and will acquire
It is stored in influxdb database.
Further, influxdb database is the Distributed Time sequence database of an open source.Influxdb data
It include the data of Timestamp field, such as the sometime temperature of environment, the utilization rate etc. of CPU in the data format in library.It can
With understanding, a prior attribute for time series data is how to go to inquire it, the filtering including data, calculate etc.
Deng.
It is possible to further establish data warehouse in the Influxdb database, the data warehouse there are 3 kinds not
With the data storage area of strategy, the data for being respectively as follows: deposit only retain 1 month, are automatically deleted after exceeding the time limit, i.e. TTL=1M;Deposit
Data only retain 1 year, be automatically deleted after exceeding the time limit, i.e. TTL=1y;The data of deposit permanently retain, i.e. TTL=inf.Above three
Kind memory block is respectively intended to the data of storage different time dimension, and the memory block for being respectively as follows: TTL=1M is used to store monitoring data
Collected original monitoring data in Collection agent program, i.e. time interval are 1 second, these monitoring data amounts are huge, Er Qiehui
It frequently uses, while also very high to monitoring data required precision;The memory block of TTL=1y is used to be stored on time dimension to institute
The data that initial data carries out first compression are stated, i.e. time interval is 10 seconds, and the data volume of these data is moderate, and occasional uses
It arrives, the required precision of data can suitably be declined;The memory block of TTL=inf is for being stored on time dimension to by primary
The compressed data do the data further compressed again, i.e. time interval is 5 minutes, and the data volume of these data is minimum,
It can seldom use, it is minimum to the required precision of data.
Using influxdb database create three storage regions, respectively archive_inf, archive_1y,
archive_1M;The table started with inf is stored in the memory block archive_inf, the data in this memory block are able to persistence,
And it will be stored in each year in a data block;The table that starts with 1y is stored in the memory block archive_1y, in this memory block
The storage time of data is 1 year, and the data of every month are stored in a data block;Archive_1M is deposited in memory block
Other all tables that store in the data warehouse are stored up, the storage time of the data in this memory block is one month, and will be every
The data in week are stored in a data block.By monitoring data collection process and data store organisation, work as data collection agent
After programmed acquisition to data, directly it is stored by influxdb API to the realtime table of archive_1M storage region
In, therefore, the data in realtime table will be stored only 1 month, be automatically deleted after expired.Meanwhile two are created in systems
Continuous Query, to the data in realtime table, continued compression is stored on time dimension respectively.Creation one every
Primary Continuous Query was executed every 10 seconds, and the data in realtime table were pressed according to 10 seconds time intervals
Contracting, and store into the 1y_10s table of the memory block archive_1y;Creation one executed primary Continuous every 5 minutes
Query compresses the data in realtime table according to 5 minutes time intervals, and stores to archive_inf and store
In the inf_5m table in area;So far, the process of the acquisition storage of monitoring data is completed.When application needs to retrieve data, according to
The acquisition time of data goes in corresponding table to be retrieved, analyze.
A2, the configuration information of alarm business according to the pre-stored data obtain the prison of alarm business from the influxdb
Control data;
Specifically, the configuration information of the alarm business can be stored in advance in common database, such as Mysql number
According to library, oracle database etc., the configuration information of the alarm business includes the service identification of unique identification alarm business
The monitoring period of (Identification, ID) and the monitoring data as alarm business process object.Wherein, number is monitored
According to the process object for monitoring business.
Optionally, the configuration information of the alarm business can fill in generation in the configuration page by user.
A3 successively analyzes the monitoring data of the alarm business of acquisition according to monitoring period, selects and meet predefined announcement
The pithy monitoring data omited;
Specifically, the predefined warning strategies include the alarm threshold for alarm business setting, the alarm threshold
The type of value can be numeric type or character string type;Further, monitoring data can be an array, have " numerical value " with
" attribute " two attributes.
Specifically, it when determining that monitoring data meets warning strategies, needs for its numerical value to be arranged with for the alarm business
Alarm threshold be compared, if monitoring data is array, alarm threshold also should be array, and the number of the two answers one
It causes, when alarm threshold is array, serial number can be marked with to each alarm threshold accordingly;In addition, alarm threshold is in default conditions
It is down numeric type, if the type of alarm threshold is character string type, can illustrates it in the subscript of monitoring data numerical value array
The type information of alarm threshold, when the numerical value of monitoring data is with alarm threshold string matching, monitoring data meets warning strategies.
Such as: judge in the alarm business of C disk utilization rate of host, the monitoring data of mark C disk utilization rate state has " 30% "
Two kinds of " 90% ", setting alarm threshold are " 90% ", and the type of the alarm threshold is numeric type, when the numerical value of monitoring data is big
It when 90%, is matched with alarm threshold, meets warning strategies.
Further, attribute is the description information of monitoring data, including Property Name and attribute value, can be used for record log
Or analysis monitoring data uses.Such as one is more than the alarm business that is alerted of threshold value to CPU usage, monitoring data
Numerical value is the number that CPU usage is more than threshold value, and Property Name is host number, and corresponding attribute value is 12;If Property Name
For Hostname, then corresponding attribute value is A.Optionally, the attribute of monitoring data, which can according to need, is extended, herein not
It is limited.
A4 alerts the attribute for the monitoring data for meeting warning strategies.
It further, can acquisition permission to alarm business configuration information in order to guarantee the legal use of alarm business
It is provided, specifically, setting obtains the authentication information of alarm business configuration information, including user name and password, when user is defeated
When the username and password entered matches with the username and password of configuration, it is determined as legitimate user, otherwise, it determines being illegal
User is alerted.It further, further include traffic ID in authentication information, i.e., if being authorized respectively for each alarm business
It is required that user's incoming traffic ID.
By above-mentioned thing embodiment it is found that electronic device proposed by the present invention, passes through the predetermined server cluster of acquisition
In each service node monitoring data, will acquire monitoring data deposit influxdb database;Announcement according to the pre-stored data
The configuration information of alert business, obtains the monitoring data of alarm business from the influxdb;It is successively analyzed according to monitoring period
The monitoring data of the alarm business of acquisition selects the monitoring data for meeting predefined warning strategies;To meeting warning strategies
The attribute of monitoring data alerted.Monitored item historical data can be pulled on demand, reduced memory and used, and to longer history
Data carry out alarm configuration, optimize alarm function.
In addition, the function that monitoring data alarm program of the invention is realized according to its each section is different, it can be with phase
The program module of congenerous is described.It please refers to shown in Fig. 2, is that monitoring data alerts in one embodiment of electronic device of the present invention
The program module schematic diagram of program.In the present embodiment, monitoring data alerts function that program is realized according to its each section not
Together, deposit module 201 can be divided into, obtain module 202, selecting module 203 and alarm module 204.It is retouched by above
It states it is found that the so-called program module of the present invention is the series of computation machine program instruction section for referring to complete specific function, compares journey
Implementation procedure of the sequence more suitable for description monitoring data alarm program in electronic device 10.The module 201-204 is realized
Functions or operations step it is similar as above, and will not be described here in detail, illustratively, such as wherein:
Deposit module 201 is used to obtain the monitoring data of each service node in predetermined server cluster, will obtain
The monitoring data deposit influxdb database taken;
The configuration information that module 202 is used for alarm business according to the pre-stored data is obtained, is obtained from the influxdb
The monitoring data of alarm business;
Selecting module 203 is used to successively analyze the monitoring data of the alarm business of acquisition according to monitoring period, selects symbol
Close the monitoring data of predefined warning strategies;
Alarm module 204 is for alerting the attribute for the monitoring data for meeting warning strategies.
In addition, the present invention also proposes a kind of monitoring data alarm method, please refer to shown in Fig. 3, the monitoring data alarm
Method includes the following steps:
S301 obtains the monitoring data of each service node in predetermined server cluster, the monitoring number that will acquire
According to deposit influxdb database;
Specifically, monitoring data collection is installed on each host in the predetermined server cluster and acts on behalf of journey
Sequence, the monitoring data collection broker program is by each worth of data predefined on each host, such as cpu busy percentage, memory benefit
With rate, memory using size, network interface real-time traffic, hard disk use space, exchange partition use space etc., according to matching in advance
The time interval set, for example, time interval takes 1s to be acquired, to obtain the monitoring data of each service node.In this implementation
In example, the monitoring data that needs to obtain the monitoring data of each service node in predetermined server cluster, and will acquire
It is stored in influxdb database.
Further, influxdb database is the Distributed Time sequence database of an open source.Influxdb data
It include the data of Timestamp field, such as the sometime temperature of environment, the utilization rate etc. of CPU in the data format in library.It can
With understanding, a prior attribute for time series data is how to go to inquire it, the filtering including data, calculate etc.
Deng.
It is possible to further establish data warehouse in the Influxdb database, the data warehouse there are 3 kinds not
With the data storage area of strategy, the data for being respectively as follows: deposit only retain 1 month, are automatically deleted after exceeding the time limit, i.e. TTL=1M;Deposit
Data only retain 1 year, be automatically deleted after exceeding the time limit, i.e. TTL=1y;The data of deposit permanently retain, i.e. TTL=inf.Above three
Kind memory block is respectively intended to the data of storage different time dimension, and the memory block for being respectively as follows: TTL=1M is used to store monitoring data
Collected original monitoring data in Collection agent program, i.e. time interval are 1 second, these monitoring data amounts are huge, Er Qiehui
It frequently uses, while also very high to monitoring data required precision;The memory block of TTL=1y is used to be stored on time dimension to institute
The data that initial data carries out first compression are stated, i.e. time interval is 10 seconds, and the data volume of these data is moderate, and occasional uses
It arrives, the required precision of data can suitably be declined;The memory block of TTL=inf is for being stored on time dimension to by primary
The compressed data do the data further compressed again, i.e. time interval is 5 minutes, and the data volume of these data is minimum,
It can seldom use, it is minimum to the required precision of data.
Using influxdb database create three storage regions, respectively archive_inf, archive_1y,
archive_1M;The table started with inf is stored in the memory block archive_inf, the data in this memory block are able to persistence,
And it will be stored in each year in a data block;The table that starts with 1y is stored in the memory block archive_1y, in this memory block
The storage time of data is 1 year, and the data of every month are stored in a data block;Archive_1M is deposited in memory block
Other all tables that store in the data warehouse are stored up, the storage time of the data in this memory block is one month, and will be every
The data in week are stored in a data block.By monitoring data collection process and data store organisation, work as data collection agent
After programmed acquisition to data, directly it is stored by influxdb API to the realtime table of archive_1M storage region
In, therefore, the data in realtime table will be stored only 1 month, be automatically deleted after expired.Meanwhile two are created in systems
Continuous Query, to the data in realtime table, continued compression is stored on time dimension respectively.Creation one every
Primary Continuous Query was executed every 10 seconds, and the data in realtime table were pressed according to 10 seconds time intervals
Contracting, and store into the 1y_10s table of the memory block archive_1y;Creation one executed primary Continuous every 5 minutes
Query compresses the data in realtime table according to 5 minutes time intervals, and stores to archive_inf and store
In the inf_5m table in area;So far, the process of the acquisition storage of monitoring data is completed.When application needs to retrieve data, according to
The acquisition time of data goes in corresponding table to be retrieved, analyze.
S302, the configuration information of alarm business according to the pre-stored data obtain alarm business from the influxdb
Monitoring data;
Specifically, the configuration information of the alarm business can be stored in advance in common database, such as Mysql number
According to library, oracle database etc., the configuration information of the alarm business includes the service identification of unique identification alarm business
The monitoring period of (Identification, ID) and the monitoring data as alarm business process object.Wherein, number is monitored
According to the process object for monitoring business.
Optionally, the configuration information of the alarm business can fill in generation in the configuration page by user.
S303, according to monitoring period successively analyze acquisition alarm business monitoring data, select meet it is predefined
The monitoring data of warning strategies;
Specifically, the predefined warning strategies include the alarm threshold for alarm business setting, the alarm threshold
The type of value can be numeric type or character string type;Further, monitoring data can be an array, have " numerical value " with
" attribute " two attributes.
Specifically, it when determining that monitoring data meets warning strategies, needs for its numerical value to be arranged with for the alarm business
Alarm threshold be compared, if monitoring data is array, alarm threshold also should be array, and the number of the two answers one
It causes, when alarm threshold is array, serial number can be marked with to each alarm threshold accordingly;In addition, alarm threshold is in default conditions
It is down numeric type, if the type of alarm threshold is character string type, can illustrates it in the subscript of monitoring data numerical value array
The type information of alarm threshold, when the numerical value of monitoring data is with alarm threshold string matching, monitoring data meets warning strategies.
Such as: judge in the alarm business of C disk utilization rate of host, the monitoring data of mark C disk utilization rate state has " 30% "
Two kinds of " 90% ", setting alarm threshold are " 90% ", and the type of the alarm threshold is numeric type, when the numerical value of monitoring data is big
It when 90%, is matched with alarm threshold, meets warning strategies.
Further, attribute is the description information of monitoring data, including Property Name and attribute value, can be used for record log
Or analysis monitoring data uses.Such as one is more than the alarm business that is alerted of threshold value to CPU usage, monitoring data
Numerical value is the number that CPU usage is more than threshold value, and Property Name is host number, and corresponding attribute value is 12;If Property Name
For Hostname, then corresponding attribute value is A.Optionally, the attribute of monitoring data, which can according to need, is extended, herein not
It is limited.
S304 alerts the attribute for the monitoring data for meeting warning strategies.
It further, can acquisition permission to alarm business configuration information in order to guarantee the legal use of alarm business
It is provided, specifically, setting obtains the authentication information of alarm business configuration information, including user name and password, when user is defeated
When the username and password entered matches with the username and password of configuration, it is determined as legitimate user, otherwise, it determines being illegal
User is alerted.It further, further include traffic ID in authentication information, i.e., if being authorized respectively for each alarm business
It is required that user's incoming traffic ID.
By above-mentioned thing embodiment it is found that monitoring data alarm method proposed by the present invention, passes through the predetermined clothes of acquisition
The monitoring data of each service node in business device cluster, the monitoring data deposit influxdb database that will acquire;According to preparatory
The configuration information of the alarm business of storage obtains the monitoring data of alarm business from the influxdb;According to monitoring period
The monitoring data for successively analyzing the alarm business of acquisition selects the monitoring data for meeting predefined warning strategies;To meeting
The attribute of the monitoring data of warning strategies is alerted.Monitored item historical data can be pulled on demand, reduced memory and used, and is right
Longer historical data carries out alarm configuration, optimizes alarm function.
In addition, the present invention also proposes a kind of computer readable storage medium, stored on the computer readable storage medium
There is monitoring data to alert program, the monitoring data alarm program realizes following operation when being executed by processor:
The monitoring data for obtaining each service node in predetermined server cluster, the monitoring data deposit that will acquire
Influxdb database;
The configuration information of alarm business according to the pre-stored data obtains the monitoring number of alarm business from the influxdb
According to;
The monitoring data that the alarm business of acquisition is successively analyzed according to monitoring period, selects and meets predefined alarm plan
Monitoring data slightly;
The attribute for the monitoring data for meeting warning strategies is alerted.
The specific implementation process of computer readable storage medium of the present invention is alerted with above-mentioned electronic device and monitoring data
The specific implementation process of method is similar, and details are not described herein.
By above-mentioned analysis it is found that computer readable storage medium proposed by the present invention, passes through the predetermined clothes of acquisition
The monitoring data of each service node in business device cluster, the monitoring data deposit influxdb database that will acquire;According to preparatory
The configuration information of the alarm business of storage obtains the monitoring data of alarm business from the influxdb;According to monitoring period
The monitoring data for successively analyzing the alarm business of acquisition selects the monitoring data for meeting predefined warning strategies;To meeting
The attribute of the monitoring data of warning strategies is alerted.Monitored item historical data can be pulled on demand, reduced memory and used, and is right
Longer historical data carries out alarm configuration, optimizes alarm function.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side
Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases
The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art
The part contributed out can be embodied in the form of software products, which is stored in a storage medium
In (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal device (can be mobile phone, computer, clothes
Business device, air conditioner or the network equipment etc.) execute method described in each embodiment of the present invention.The above is only of the invention excellent
Embodiment is selected, is not intended to limit the scope of the invention, it is all using made by description of the invention and accompanying drawing content etc.
Structure or equivalent process transformation are imitated, is applied directly or indirectly in other relevant technical fields, and is similarly included in the present invention
Scope of patent protection in.
Claims (10)
1. a kind of electronic device, which is characterized in that the electronic device includes memory and the processing that connect with the memory
Device, the processor are used to execute the monitoring data alarm program stored on the memory, and the monitoring data alerts program
Following steps are realized when being executed by the processor:
A1, the monitoring data for obtaining each service node in predetermined server cluster, the monitoring data deposit that will acquire
Influxdb database;
The configuration information of A2, alarm business according to the pre-stored data obtain the monitoring number of alarm business from the influxdb
According to;
A3, foundation monitoring period successively analyze the monitoring data of the alarm business of acquisition, select and meet predefined alarm plan
Monitoring data slightly;
A4, the attribute for the monitoring data for meeting warning strategies is alerted.
2. electronic device as described in claim 1, which is characterized in that in the step A1, the predetermined service
Monitoring data collection broker program is installed, the monitoring data collection broker program is by each host on each host in device cluster
On predefined data be acquired according to preconfigured time interval, to obtain the monitoring data of each service node.
3. electronic device as described in claim 1, which is characterized in that in the step A2, the configuration of the alarm business
Information is stored in advance in determining database, and the configuration information of the alarm business includes the business of unique identification alarm business
Identify the monitoring period of (Identification, ID) and the monitoring data as alarm business process object;The prison
Control the process object that data are monitoring business.
4. electronic device as described in claim 1, which is characterized in that in the step A3, the predefined alarm plan
It slightly include the alarm threshold for alarm business setting, the type of the alarm threshold includes numeric type or character string type.
5. the electronic device as described in claim 1-4 is any, which is characterized in that the monitoring data alarm program is by the place
When managing device execution, following steps are also realized:
The authentication information for obtaining alarm business configuration information is set, and the authentication information includes user name and password;
When the username and password of user's input matches with the username and password of configuration, it is determined as legitimate user, it is no
Then, it is determined as illegal user, is alerted.
6. a kind of monitoring data alarm method, which is characterized in that described method includes following steps:
S1, the monitoring data for obtaining each service node in predetermined server cluster, the monitoring data deposit that will acquire
Influxdb database;
The configuration information of S2, alarm business according to the pre-stored data obtain the monitoring number of alarm business from the influxdb
According to;
S3, foundation monitoring period successively analyze the monitoring data of the alarm business of acquisition, select and meet predefined alarm plan
Monitoring data slightly;
S4, the attribute for the monitoring data for meeting warning strategies is alerted.
7. monitoring data alarm method as claimed in claim 6, which is characterized in that in the step S1, described true in advance
Monitoring data collection broker program, the monitoring data collection broker program are installed on each host in fixed server cluster
Predefined data on each host are acquired according to preconfigured time interval, to obtain the prison of each service node
Control data.
8. monitoring data alarm method as claimed in claim 6, which is characterized in that in the step S2, the alarm industry
The configuration information of business is stored in advance in determining database, and the configuration information of the alarm business includes unique identification alarm industry
The service identification (Identification, ID) of business and as the alarm business process object monitoring data monitoring when
Between;The monitoring data is the process object of monitoring business.
9. monitoring data alarm method as claimed in claim 6, which is characterized in that in the step S3, described predefined
Warning strategies include for alarm business setting alarm threshold, the type of the alarm threshold includes numeric type or character string
Type.
10. a kind of computer readable storage medium, the computer-readable recording medium storage has monitoring data to alert program, institute
Stating monitoring data alarm program can be executed by least one processor, so that at least one described processor executes such as claim
Described in any one of 6-9 the step of monitoring data alarm method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811512118.7A CN109582547A (en) | 2018-12-11 | 2018-12-11 | Electronic device, monitoring data alarm method and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811512118.7A CN109582547A (en) | 2018-12-11 | 2018-12-11 | Electronic device, monitoring data alarm method and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109582547A true CN109582547A (en) | 2019-04-05 |
Family
ID=65929022
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811512118.7A Pending CN109582547A (en) | 2018-12-11 | 2018-12-11 | Electronic device, monitoring data alarm method and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109582547A (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110856040A (en) * | 2019-11-07 | 2020-02-28 | 网易(杭州)网络有限公司 | Method and device for processing monitoring data in client |
CN110932935A (en) * | 2019-11-26 | 2020-03-27 | 深圳前海微众银行股份有限公司 | Resource control method, device, equipment and computer storage medium |
CN110941531A (en) * | 2019-11-15 | 2020-03-31 | 北京浪潮数据技术有限公司 | Monitoring alarm method, device and equipment for monitoring alarm management platform |
CN111553560A (en) * | 2020-04-01 | 2020-08-18 | 车智互联(北京)科技有限公司 | Service index monitoring method, monitoring server and system |
CN111694854A (en) * | 2020-06-05 | 2020-09-22 | 北京百度网讯科技有限公司 | Method and device for monitoring entrance and exit of area, electronic equipment and storage medium |
CN111984724A (en) * | 2019-05-22 | 2020-11-24 | 西门子股份公司 | Operating strategy and distributed database for industrial field devices |
CN112311617A (en) * | 2019-08-02 | 2021-02-02 | 中国移动通信有限公司政企客户分公司 | Configured data monitoring and alarming method and system |
CN113127290A (en) * | 2019-12-31 | 2021-07-16 | 北京金山云网络技术有限公司 | Service operation index monitoring method and device and server |
CN113127290B (en) * | 2019-12-31 | 2024-05-31 | 北京金山云网络技术有限公司 | Service operation index monitoring method, device and server |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050262078A1 (en) * | 1998-12-01 | 2005-11-24 | Yukio Nakano | Database processing method, apparatus for implementing same, and medium containing processing program therefor |
WO2008092361A1 (en) * | 2007-01-29 | 2008-08-07 | Huawei Technologies Co., Ltd. | An alert means and alert method |
CN105208098A (en) * | 2015-08-24 | 2015-12-30 | 用友网络科技股份有限公司 | Cloud monitoring system realization device and method |
CN107678907A (en) * | 2017-05-22 | 2018-02-09 | 平安科技(深圳)有限公司 | Database business logic monitoring method, system and storage medium |
CN108681499A (en) * | 2018-05-04 | 2018-10-19 | 广州市玄武无线科技股份有限公司 | O&M monitoring method, device and computer readable storage medium |
CN108932184A (en) * | 2018-06-21 | 2018-12-04 | 新华三云计算技术有限公司 | monitoring device and method |
-
2018
- 2018-12-11 CN CN201811512118.7A patent/CN109582547A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050262078A1 (en) * | 1998-12-01 | 2005-11-24 | Yukio Nakano | Database processing method, apparatus for implementing same, and medium containing processing program therefor |
WO2008092361A1 (en) * | 2007-01-29 | 2008-08-07 | Huawei Technologies Co., Ltd. | An alert means and alert method |
CN105208098A (en) * | 2015-08-24 | 2015-12-30 | 用友网络科技股份有限公司 | Cloud monitoring system realization device and method |
CN107678907A (en) * | 2017-05-22 | 2018-02-09 | 平安科技(深圳)有限公司 | Database business logic monitoring method, system and storage medium |
CN108681499A (en) * | 2018-05-04 | 2018-10-19 | 广州市玄武无线科技股份有限公司 | O&M monitoring method, device and computer readable storage medium |
CN108932184A (en) * | 2018-06-21 | 2018-12-04 | 新华三云计算技术有限公司 | monitoring device and method |
Non-Patent Citations (1)
Title |
---|
潘庆和: "一种通用分布式数据抓取系统的设计与实现", 《哈尔滨商业大学学报(自然科学版)》 * |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111984724A (en) * | 2019-05-22 | 2020-11-24 | 西门子股份公司 | Operating strategy and distributed database for industrial field devices |
CN112311617A (en) * | 2019-08-02 | 2021-02-02 | 中国移动通信有限公司政企客户分公司 | Configured data monitoring and alarming method and system |
CN110856040A (en) * | 2019-11-07 | 2020-02-28 | 网易(杭州)网络有限公司 | Method and device for processing monitoring data in client |
CN110941531A (en) * | 2019-11-15 | 2020-03-31 | 北京浪潮数据技术有限公司 | Monitoring alarm method, device and equipment for monitoring alarm management platform |
CN110932935A (en) * | 2019-11-26 | 2020-03-27 | 深圳前海微众银行股份有限公司 | Resource control method, device, equipment and computer storage medium |
CN113127290A (en) * | 2019-12-31 | 2021-07-16 | 北京金山云网络技术有限公司 | Service operation index monitoring method and device and server |
CN113127290B (en) * | 2019-12-31 | 2024-05-31 | 北京金山云网络技术有限公司 | Service operation index monitoring method, device and server |
CN111553560A (en) * | 2020-04-01 | 2020-08-18 | 车智互联(北京)科技有限公司 | Service index monitoring method, monitoring server and system |
CN111694854A (en) * | 2020-06-05 | 2020-09-22 | 北京百度网讯科技有限公司 | Method and device for monitoring entrance and exit of area, electronic equipment and storage medium |
CN111694854B (en) * | 2020-06-05 | 2023-07-21 | 北京百度网讯科技有限公司 | Regional access monitoring method and device, electronic equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109582547A (en) | Electronic device, monitoring data alarm method and storage medium | |
CN108427705B (en) | Electronic device, distributed system log query method and storage medium | |
CN107908680A (en) | Management method, electronic device and the computer-readable recording medium of wechat public platform | |
CN111813573B (en) | Communication method of management platform and robot software and related equipment thereof | |
CN111597272B (en) | Method and device for storing engineering cost data, data server and storage medium | |
CN112199210A (en) | Data processing method and device based on Internet of things, computer equipment and medium | |
CN111224797B (en) | Equipment access method and device and electronic equipment | |
CN109491733B (en) | Interface display method based on visualization and related equipment | |
CN110807050B (en) | Performance analysis method, device, computer equipment and storage medium | |
CN112181794A (en) | Page monitoring method and device, computer equipment and storage medium | |
CN111125226B (en) | Configuration data acquisition method and device | |
CN111475468A (en) | Log access method, device, equipment and storage medium of newly added system | |
CN111414395A (en) | Data processing method, system and computer equipment | |
CN116594834A (en) | Operation and maintenance data processing method and device for multi-protocol server | |
CN113162997B (en) | Data transmission method and device, electronic equipment and readable storage medium | |
CN114595115A (en) | Model data extraction method, system, electronic device and computer storage medium | |
CN110838973B (en) | Key configuration method and device of intelligent gateway and electronic equipment | |
CN110264654B (en) | Security-based monitoring management method and device, readable storage medium and system | |
CN113761524A (en) | Active window auditing method and system | |
CN112306797A (en) | Embedded point information reporting method and device, storage medium and electronic equipment | |
CN109491973A (en) | Electronic device, declaration form delta data distribution analysis method and storage medium | |
CN112749158A (en) | Energy system data processing method and device | |
CN109547290B (en) | Cloud platform garbage data detection processing method, device, equipment and storage medium | |
CN115878712A (en) | Data chart processing method and related device | |
WO2020113374A1 (en) | Data management method, data management apparatus, and mobile terminal |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190405 |