CN114020571A - Monitoring method and monitoring equipment for index server - Google Patents

Monitoring method and monitoring equipment for index server Download PDF

Info

Publication number
CN114020571A
CN114020571A CN202111306693.3A CN202111306693A CN114020571A CN 114020571 A CN114020571 A CN 114020571A CN 202111306693 A CN202111306693 A CN 202111306693A CN 114020571 A CN114020571 A CN 114020571A
Authority
CN
China
Prior art keywords
monitoring information
target
data
index
index service
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
Application number
CN202111306693.3A
Other languages
Chinese (zh)
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 Qury Technology Co ltd
Shandong Kurui Technology Co ltd
Original Assignee
Beijing Qury Technology Co ltd
Shandong Kurui 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 Qury Technology Co ltd, Shandong Kurui Technology Co ltd filed Critical Beijing Qury Technology Co ltd
Priority to CN202111306693.3A priority Critical patent/CN114020571A/en
Publication of CN114020571A publication Critical patent/CN114020571A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3065Monitoring arrangements determined by the means or processing involved in reporting the monitored data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3089Monitoring arrangements determined by the means or processing involved in sensing the monitored data, e.g. interfaces, connectors, sensors, probes, agents
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The disclosure relates to a monitoring method and monitoring equipment of an index server, and relates to the technical field of data processing and analysis. The method comprises the following steps: the method is applied to a monitoring index server; acquiring target monitoring information, wherein the target monitoring information comprises: at least one of monitoring information of imported data, monitoring information of index service state and monitoring information of index service use; determining a target alarm rule corresponding to the target monitoring information, wherein the target alarm rule corresponds to at least one fault setting; and outputting alarm information aiming at least one fault when the target monitoring information meets the target alarm rule. The embodiment of the disclosure is used for solving the problem that the fault in the index service cannot be determined quickly and accurately.

Description

Monitoring method and monitoring equipment for index server
Technical Field
The present disclosure relates to the field of data processing and analysis technologies, and in particular, to a monitoring method and a monitoring device for an index server.
Background
The index service is a key module in the search service, the stability is crucial, and if the monitoring for the index service is not in place, the business industry is affected, so a set of monitoring method needs to be established to monitor and find problems for the index server providing the index service. At present, various monitoring platforms exist in the market, monitoring is usually performed from an independent angle, so that obtained monitoring parameters are scattered, when an index service has a problem, the fault occurring in the index service cannot be determined quickly and accurately because the fault needs to be manually analyzed from a large number of scattered monitoring parameters.
Disclosure of Invention
In order to solve the technical problem or at least partially solve the technical problem, the present disclosure provides a monitoring method and a monitoring apparatus for an index server.
In order to achieve the above purpose, the technical solutions provided by the embodiments of the present disclosure are as follows:
in a first aspect, an embodiment of the present disclosure provides a method for monitoring an index server, where the method may be applied to monitoring the index server;
acquiring target monitoring information, wherein the target monitoring information comprises: at least one of monitoring information of imported data, monitoring information of index service state and monitoring information of index service use;
determining a target alarm rule corresponding to the target monitoring information, wherein the target alarm rule corresponds to at least one fault setting;
and outputting alarm information aiming at the at least one fault when the target monitoring information meets the target alarm rule.
As an optional implementation manner of the embodiment of the present disclosure, the target monitoring information includes: monitoring information of imported data:
when a first API is called to import first data to a message queue, if a first request error exists, recording the first request error in a log file, wherein the first API is an API of the message queue;
after the first data is imported into the message queue, when a second API (application program interface) is called to import the first data in the message queue into an index service, if a second request error exists, recording the second request error to the log file;
acquiring the first request error and/or the second request error from the log file;
acquiring the consumption data quantity and/or the non-consumption data quantity from the message queue;
and taking at least one of the first request error, the second request error, the consumed data quantity and the unconsumed data quantity as the monitoring information of the imported data.
As an optional implementation manner of the embodiment of the present disclosure, the target alarm rule includes at least one of the following:
the first request error exists;
the second request error is present;
the amount of consumption data is less than or equal to a first amount threshold;
within a first length of time, the amount of consumption data is less than or equal to a first amount threshold;
the number of unconsumed transactions is greater than or equal to a second number threshold;
within a second length of time, the amount of unconsumed data is greater than or equal to a second amount threshold;
the ratio of the number of unconsumed products to the number of consumed products is greater than or equal to a preset ratio;
within a third time length, the ratio of the number not consumed to the number consumed is greater than or equal to a preset ratio;
a message backlog rate is greater than or equal to a ratio threshold, the message backlog rate being: and within a fourth time length, the ratio of the number of unconsumed messages to the total amount of data corresponding to the message queue.
As an optional implementation manner of the embodiment of the present disclosure, the index server is a server cluster including a plurality of servers, and the target monitoring information includes: indexing monitoring information of the service state;
the acquiring of the target monitoring information includes:
acquiring running state information of the plurality of servers; the operating state information includes at least one of:
load rate, slow query log of index service;
wherein the load factor comprises: at least one of CPU utilization rate, memory utilization rate, bandwidth occupancy rate and disk occupancy rate.
As an optional implementation manner of the embodiment of the present disclosure, the target alarm rule includes at least one of the following:
the load rate of the single server is greater than or equal to a first preset rate;
the total load rate is greater than or equal to a second preset rate;
two servers with load difference values larger than or equal to a preset difference value exist;
there is a slow query log of the index service;
the slow query log of the index service indicates that the response time of the index service is greater than or equal to a preset time.
As an optional implementation manner of the embodiment of the present disclosure, the target monitoring information includes: indexing monitoring information for service usage;
the acquiring of the target monitoring information includes:
if a target error occurs in the index service using process, recording the target error to the log file, wherein the target error comprises: at least one of not connecting to the index server, and connecting to the index server timeout;
if the index service is in the using process, the search record of the user is stored, wherein the search record comprises: user ID, time, index server identification, search time duration.
And acquiring the target error record from the log file as monitoring information used by the index service.
As an optional implementation manner of the embodiment of the present disclosure, the target alarm rule includes at least one of the following:
the target error exists;
the time length consumed by the search is greater than or equal to the preset time length.
As an optional implementation manner of the embodiment of the present disclosure, the acquiring target monitoring information includes:
acquiring monitoring information of the imported data by importing first analog data;
and/or the presence of a gas in the gas,
and acquiring the monitoring information of the state of the index service and/or the monitoring information used by the index service by using the index service aiming at the second analog data.
As an optional implementation manner of the embodiment of the present disclosure, the outputting the alarm information includes:
displaying an alarm interface based on the alarm information; the alarm interface comprises at least one function control which is used for triggering processing operation aiming at least one fault, wherein each function control is used for triggering processing operation aiming at one or more faults.
In a second aspect, a monitoring apparatus for an index server is provided, including:
an obtaining module, configured to obtain target monitoring information, where the target monitoring information includes: at least one of monitoring information of imported data, monitoring information of index service state and monitoring information of index service use;
a determining module, configured to determine a target alarm rule corresponding to the target monitoring information, where the target alarm rule corresponds to at least one fault setting;
and the output module is used for outputting alarm information aiming at the at least one fault when the target monitoring information meets the target alarm rule.
In a third aspect, a monitoring device is provided, comprising: a processor, a memory and a computer program stored on the memory and executable on the processor, which computer program, when executed by the processor, implements the monitoring method of the index server as in the first aspect or any one of its optional implementations.
In a fourth aspect, the present disclosure is a computer-readable storage medium comprising: the computer-readable storage medium has stored thereon a computer program which, when executed by a processor, implements a monitoring method of an index server as in the first aspect or any of its alternative embodiments.
In a fifth aspect, there is provided a computer program product comprising: the computer program product, when run on a computer, causes the computer to implement the method of monitoring of an index server as in the first aspect or any of its alternative embodiments.
Compared with the prior art, the technical scheme provided by the embodiment of the disclosure has the following advantages: the method can acquire monitoring information in three aspects of monitoring information of imported data, monitoring information of index service states and monitoring information used by index service, can set corresponding target alarm rules based on different monitoring information, and associates the alarm rules with at least one fault setting, so that under the condition that the monitoring information meets the target alarm rules, alarm information aiming at least one fault can be output, and the fault in the index service provided by the index server can be known without manually analyzing the monitoring parameters or the alarm information, thereby rapidly and accurately determining the fault in the index service.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present disclosure, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
Fig. 1 is a schematic view of a scene provided by an embodiment of the present disclosure;
fig. 2 is a schematic block diagram of a monitoring device according to an embodiment of the present disclosure;
fig. 3 is a schematic view of a monitoring information collection process provided in an embodiment of the present disclosure;
fig. 4 is a schematic flowchart of a monitoring method for an index server according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a monitoring device according to an embodiment of the present disclosure;
fig. 6 is a schematic diagram of a hardware structure of a monitoring device according to an embodiment of the present disclosure.
Detailed Description
In order that the above objects, features and advantages of the present disclosure may be more clearly understood, aspects of the present disclosure will be further described below. It should be noted that the embodiments and features of the embodiments of the present disclosure may be combined with each other without conflict.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present disclosure, but the present disclosure may be practiced in other ways than those described herein; it is to be understood that the embodiments disclosed in the specification are only a few embodiments of the present disclosure, and not all embodiments.
At present, various monitoring platforms exist in the market, monitoring is usually performed from an independent angle, so that obtained monitoring parameters are scattered, when the indexing service has a problem, the fault occurring in the indexing service cannot be determined quickly and accurately because the fault needs to be manually analyzed from a large number of scattered monitoring parameters.
In order to solve the above problem, an embodiment of the present disclosure provides a monitoring method for an index server, which may obtain monitoring information in three aspects of monitoring information of imported data, monitoring information of an index service state, and monitoring information used by an index service, and may set corresponding target alarm rules based on different monitoring information, and associate the alarm rules with at least one fault setting, so that, when the monitoring information satisfies the target alarm rules, alarm information for at least one fault may be output, and what kind of fault exists in the index service provided by the index server may be known without manually analyzing the monitoring parameters or the alarm information, so that a fault in the index service may be determined quickly and accurately.
The monitoring method of the index server provided by the embodiment of the disclosure may be applied to a monitoring device, where the monitoring device may be a part of a device in the index server, or the monitoring device may be a device independent of the index server. The monitoring apparatus in the embodiments of the present disclosure may be a functional module or a functional entity in the monitoring device, which may implement the monitoring method.
As shown in fig. 1, a scene schematic diagram provided for the embodiment of the present disclosure includes: the index server 11, the monitoring device 12, and the client 13, the client 14 and the client 15, wherein any client can access the index server 11 to make the index server 11 provide index service for the client. The index server 11 provides an index service for the client based on the information provided by the client during access, and returns a search result. The monitoring device 12 in the embodiment of the present disclosure may be configured to monitor the index server, collect monitoring information, determine according to a corresponding alarm rule based on the collected monitoring information, output alarm information for a fault when an abnormality occurs, and perform fault processing.
As shown in fig. 2, which is a schematic view of a monitoring device in an embodiment of the present disclosure, the monitoring device includes: a monitoring acquisition module 21, a monitoring analysis module 22 and an alarm and fault processing module 23.
(1) The monitoring acquisition module 21 is configured to acquire monitoring information from multiple dimensions and send the acquired monitoring information to the monitoring analysis module 22;
for example, as shown in fig. 3, a schematic diagram of a monitoring information collection process provided in an embodiment of the present disclosure is obtained by briefly dividing monitoring information to be collected in a manner shown in fig. 3, and distinguishing the monitoring information according to 3 dimensions, where the 3 dimensions are combined to be a data processing process, which is a process from original data to a process that is finally used by a search service. As shown in fig. 3, dimension 1 is monitoring information acquisition in a data importing process, when an index server imports data in the process, the data is imported into a message queue, and then imported into an index service from the message queue, and for the monitoring information acquired by dimension 1, the monitoring information is referred to as import data monitoring information in the embodiment of the present disclosure; dimension 2 is the acquisition of monitoring information of the running state of the index service, and the monitoring information acquired by dimension 2 in the embodiment of the disclosure is called the monitoring information of the index service state; dimension 3 is the monitoring information acquisition of the search service when the index service is used, and the monitoring information acquired for dimension 3 in the embodiment of the present disclosure is referred to as the monitoring information used by the index service.
(2) The monitoring analysis module 22 is used for performing comprehensive analysis by using a corresponding alarm rule based on the monitoring information so as to determine whether a problem exists and feeding back an analysis result to the alarm and fault processing module 23;
(3) and the alarm and fault processing module 23 is used for performing some fault alarms based on the analysis result and providing some functional controls capable of rapidly processing the faults so as to allow maintenance personnel to timely process the faults.
As shown in fig. 4, a monitoring method for an index server provided in an embodiment of the present disclosure includes:
401. and acquiring target monitoring information.
402. And determining a target alarm rule corresponding to the target monitoring information.
Wherein, the target monitoring information includes: at least one of monitoring information of the imported data, monitoring information of the state of the index service, and monitoring information of the use of the index service.
In the embodiment of the disclosure, the monitoring information of the imported data can be acquired by importing the first analog data.
In the embodiment of the present disclosure, the index service is further used for the second analog data, so as to obtain the monitoring information of the state of the index service, and/or the monitoring information used by the index service.
The import data according to the embodiment of the present invention refers to an operation for changing one or more types of data, such as data insertion, data deletion, and data update.
Since the index service program does not run without data change, the monitoring information cannot be obtained, and no fault can be found. At the moment, data import can be simulated through the simulation script, and the index service is simulated and used, so that the simulation script can operate the part related to the whole index service flow, and the monitoring information of each dimension can be acquired. For an index service, multiple scripts may be defined, each performing different things, e.g., data insertion, data update, data deletion, so that data insertion, update, and deletion operations may be performed. Furthermore, a query script can be added, and corresponding information can be queried through searching a service interface according to the change of data.
Wherein the target alarm rule corresponds to at least one fault setting.
In the embodiment of the invention, the alarm rule is set corresponding to the monitoring information, and the specific application of which alarm rule depends on which monitoring information is collected.
That is, the target monitoring information has the following situations:
case 1: importing monitoring information of data;
case 2: indexing monitoring information of the service state;
case 3: indexing monitoring information for service usage;
case 4: importing monitoring information of data and monitoring information of an index service state;
case 5: monitoring information of the index service state and monitoring information used by the index service;
case 6: importing monitoring information of data and monitoring information used by index service;
case 7: monitoring information of imported data, monitoring information of index service state and monitoring information of index service use.
For the above case 1, the target monitoring information includes monitoring information of imported data, and then the manner of acquiring the monitoring information of the imported data includes:
the first embodiment mode is as follows: when a first API is called to import first data to a message queue, if a first request error exists, recording the request error in a log file, wherein the first API is an API of the message queue; after the first data is imported into the message queue, when a second API interface is called to import the first data in the message queue into the index service, if a second request error exists, the second request error is recorded into a log file, and the second API interface is an API interface of the index service;
acquiring a first request error and/or a second error request error from a log file;
acquiring the consumption data quantity and/or the non-consumption data quantity from the message queue;
and taking at least one of the first request error, the second error request error, the consumed data quantity and the unconsumed data quantity as the monitoring information of the imported data.
Wherein the first request error comprises: and requesting the client for timeout, wherein the client is not connected with the message queue.
The second request error includes: and requesting the message queue for timeout, wherein the message queue is not connected with the index service, and the data writing speed of the index service is lower than the speed threshold.
In the embodiment of the disclosure, the index service is a functional module providing an index function in the index server, and importing the first data into the index service may be understood as storing the first data in a database corresponding to the index function in the index server.
For the monitoring information of the imported data acquired in the first embodiment, the target alarm rule may include at least one of the following:
(a) there is a first request error;
(b) there is a second request error;
(c) the amount of consumption data is less than or equal to a first amount threshold;
(d) within a first duration, the amount of consumption data is less than or equal to a first amount threshold;
(e) the number of unconsumed transactions is greater than or equal to a second number threshold;
(f) within a second length of time, the amount of unconsumed data is greater than or equal to a second amount threshold;
(g) the ratio of the number of unconsumed products to the number of consumed products is greater than or equal to a preset ratio;
(h) within the third time length, the ratio of the number of unconsumed products to the number of consumed products is larger than the preset ratio;
(i) the message backlog rate is greater than or equal to the ratio threshold, the message backlog rate being: and in the fourth time length, the ratio of the number of unconsumed messages to the total amount of data corresponding to the message queue.
The first duration, the second duration, the third duration and the fourth duration may be set based on actual requirements, and the durations may be set to be the same or different, which is not limited in the embodiment of the disclosure.
Embodiment mode two: the first data can be directly imported into the index service from the client by calling a second API (application program interface), and in the process, if a third request error occurs, the third request error is recorded in a log file; and acquiring the third request error from the log file as the monitoring information of the imported data.
Wherein the third request error comprises: and requesting the client for timeout, wherein the client is not connected with the index service, and the data writing speed of the index service is lower than the speed threshold.
For the monitoring information of the imported data obtained in the second embodiment, the target alarm rule may be: (j) there is a third request error.
It should be noted that, in the actual data import process, there may be a case where both schemes of importing data of the first embodiment and the second embodiment exist, and then one or more of the 9 rules (a) to (i) in the above alarm rules may be combined with the alarm rule (j) to form a final alarm rule.
For case 2 above: the index server is a server cluster including a plurality of servers, and the target monitoring information is monitoring information of the index service state, and then the manner of acquiring the monitoring information of the index service state includes:
acquiring running state information of a plurality of servers; the operation state information includes: at least one of load rate and slow query log of index service: wherein, the load factor includes: at least one of CPU utilization rate, memory utilization rate, bandwidth occupancy rate and disk occupancy rate.
That is, the operation state information includes: at least one of CPU usage, memory usage, bandwidth occupancy, disk occupancy, and slow query logs for index services.
For scenario 2 above, the target alarm rules may include at least one of:
(k) the load rate of the single server is greater than or equal to a first preset rate;
if the CPU utilization rate of a server exceeds a certain rate, the computing resources of the server are insufficient, and more time is consumed for the search request of the user. If the memory utilization rate of one server exceeds a certain ratio, the server cannot process the requests of more users, the service is down when exceeding a certain magnitude, and the search request cannot be provided for the users. Based on this, a corresponding threshold value can be set for the load rate (CPU usage, memory usage) of a single service.
(l) The total load rate is greater than or equal to a second preset rate;
(m) there are two servers whose load difference is greater than or equal to a preset difference;
from the perspective of the whole server cluster, the overall load condition, the disk usage rate of the whole cluster, if the disk usage rate exceeds a threshold value and the accessed data is recent data, the condition needs to perform hot and cold data isolation on the cluster of the index server.
From the perspective of the whole server cluster, the load utilization rate (the utilization rate of cpu, memory, and disk pair) of the whole cluster exceeds the threshold, and the message queue consumption exceeds the threshold, which indicates that the load of the whole cluster is large, and it is necessary to consider to increase the number of servers in the server cluster, or split the original index service into a plurality of server clusters to provide the service.
If two servers with load difference values larger than the preset difference value exist, the access to the cluster is uneven, and the access strategy of the cluster needs to be optimized to balance the service range of the servers.
(n) there is a slow query log of index services;
(o) the slow query log of the indexing service indicates that a response time duration of the indexing service is greater than or equal to a preset time duration.
In practical applications, the alarm rule may be combined with other alarm rules to form a comprehensive alarm rule, for example, one or more of 10 rules (a) to (j) in the alarm rule may be combined with one or more of 5 rules (k) to (o) in the alarm rule to form a final alarm rule.
In the embodiment of the disclosure, different log information in the log file is obtained by collecting for multiple times, the storage formats and the types of the log information can be distinguished, the types and the grades of the log information are divided, and the log information is stored in the search server for subsequent query and analysis. For example, the specific information in some log files can be labeled to characterize the effect of such information.
Case 3: the target monitoring information is monitoring information used by the index service, and the manner of obtaining the monitoring information used by the index service includes:
if a target error occurs in the use process of the index service, recording the target error to a log file, wherein the target error comprises: at least one of not connected to the index server, and a connection index server timeout;
if the index service is in the using process, the search record of the user is stored, wherein the search record comprises: the search takes a long time.
And acquiring the target error record and the time consumed for searching from the log file as the monitoring information used by the index service.
The index server is not connected, which indicates that there is a failure in the index service processing, indicates that there may be a failure in the index server, or that there is a problem in the network connection between the client and the index server.
If the connection index server is overtime, namely the index service processes the search request of the user overtime, the index service load is larger.
For the above case 3, the target monitoring information is monitoring information used by the index service, and the corresponding target alarm rule may include at least one of the following:
(p) there is a target error;
(q) the time duration of the search is greater than or equal to the preset time duration.
In practical applications, the alarm rule may be combined with other alarm rules to form a comprehensive alarm rule, for example, one or more of (a) to (o)15 rules in the alarm rule may be combined with the rule (p) and/or (q) to form a final alarm rule.
Further, the search record may further include: user ID, search time, server identification, etc.
Through the analysis of the search records, the service conditions of all the servers in the search server can be known, and then the load conditions of all the servers in the cluster can be analyzed, so that the load balance adjustment of a plurality of servers in the whole search server can be conveniently carried out subsequently.
Furthermore, the alarm rule can also set corresponding use time frequency, and the alarm rule is limited not to be repeatedly used within a certain time interval.
403. And judging whether the target monitoring information meets the target alarm rule.
If the target monitoring information meets the target alarm rule, executing 404; and if the target monitoring information does not meet the target alarm rule, returning to execute the step 401.
404. And outputting alarm information aiming at least one fault.
In some embodiments, outputting alarm information for at least one fault includes: displaying an alarm interface based on the alarm information; the alarm interface comprises at least one function control which is used for triggering the processing operation aiming at the at least one fault, wherein each function control is used for triggering the processing operation aiming at one or more faults.
In the embodiment of the disclosure, by adding some controls capable of processing faults in time, online problems can be quickly processed through the functional controls, for example, by a functional control for suspending message queue processing in a short message, processing for temporarily stopping the message queue can be triggered, so that operation and maintenance personnel strive for time to repair the problems.
Rule one is as follows: the method is operated for 1 time every 1 minute, namely, the judgment is carried out once every minute based on the following 2 rules, and if the rules are all met, alarm information is output:
rule 1: 80% API interface calls exceed 300ms (i.e., there is a first request error, request timeout to client);
rule 2: the CPU utilization rate of the server exceeds more than 80% (namely the server load rate is greater than or equal to a second preset rate);
then an alarm is sent to the cell phone number 150XXXXXXXX, and the alarm content can be: the current search service has large access amount, slow response time and high overall load of the server, and service flow limitation should be performed.
Rule two: the method is operated for 1 time every 5 minutes, namely, the judgment is carried out every 5 minutes based on the following 2 rules, and if the rules are all satisfied, alarm information is output:
rule 1: the message queue has a message pile-up number exceeding 2000 (i.e., an excessive amount of unconsumed data);
rule 2: the CPU utilization rate of the server is lower than 80%, and the memory utilization rate is lower than 80%;
then alarm information is sent to the mobile phone number 150XXXXXXX, the alarm content is that the index service is normal, and the message queue backlog consumption is slow.
The embodiment of the disclosure provides a monitoring method for an index server, which can acquire monitoring information in three aspects of monitoring information of imported data, monitoring information of index service state and monitoring information used by the index service, can set corresponding target alarm rules based on different monitoring information, and associate the alarm rules with at least one fault setting, so that under the condition that the monitoring information meets the target alarm rules, alarm information aiming at least one fault can be output, and the fault in the index service provided by the index server can be known without manually analyzing the monitoring parameters or the alarm information, so that the fault in the index service can be quickly and accurately determined.
As shown in fig. 5, an embodiment of the present disclosure provides a monitoring apparatus for an index server, including:
an obtaining module 501, configured to obtain target monitoring information, where the target monitoring information includes: at least one of monitoring information of imported data, monitoring information of index service state and monitoring information of index service use;
a determining module 502, configured to determine a target alarm rule corresponding to the target monitoring information, where the target alarm rule corresponds to at least one fault setting;
an output module 503, configured to output alarm information for the at least one fault when the target monitoring information meets the target alarm rule.
As an optional implementation manner of the embodiment of the present disclosure, the target monitoring information includes: monitoring information of imported data:
the obtaining module 501 is specifically configured to:
when a first API is called to import first data to a message queue, if a first request error exists, recording the request error in a log file, wherein the first API is the API of the message queue;
after the first data is imported into the message queue, when a second API (application programming interface) is called to import the first data in the message queue into the index service, if a second request error exists, recording the second request error to the log file, wherein the second API is an API of the index service;
acquiring the first request error and/or the second error request error from the log file;
acquiring the consumption data quantity and/or the non-consumption data quantity from the message queue;
and taking at least one of the first request error, the second error request error, the consumed data quantity and the unconsumed data quantity as the monitoring information of the imported data.
As an optional implementation manner of the embodiment of the present disclosure, the target alarm rule includes at least one of the following:
the first request error exists;
the second request error is present;
the amount of consumption data is less than or equal to a first amount threshold;
within a first length of time, the amount of consumption data is less than or equal to a first amount threshold;
the number of unconsumed transactions is greater than or equal to a second number threshold;
within a second length of time, the amount of unconsumed data is greater than or equal to a second amount threshold;
the ratio of the number of unconsumed products to the number of consumed products is greater than or equal to a preset ratio;
within a third time length, the ratio of the number not consumed to the number consumed is greater than or equal to a preset ratio;
a message backlog rate is greater than or equal to a ratio threshold, the message backlog rate being: and within a fourth time length, the ratio of the number of unconsumed messages to the total amount of data corresponding to the message queue.
As an optional implementation manner of the embodiment of the present disclosure, the index server is a server cluster including a plurality of servers, and the target monitoring information includes: indexing monitoring information of the service state;
the obtaining module 501 is specifically configured to:
acquiring running state information of the plurality of servers; the operating state information includes at least one of:
load rate, slow query log of index service;
wherein the load factor comprises: at least one of CPU utilization rate, memory utilization rate, bandwidth occupancy rate and disk occupancy rate.
As an optional implementation manner of the embodiment of the present disclosure, the target alarm rule includes at least one of the following:
the load rate of the single server is greater than or equal to a first preset rate;
the total load rate is greater than or equal to a second preset rate;
two servers with load difference values larger than or equal to a preset difference value exist;
there is a slow query log of the index service;
the slow query log of the index service indicates that the response time of the index service is greater than or equal to a preset time.
As an optional implementation manner of the embodiment of the present disclosure, the target monitoring information includes: indexing monitoring information for service usage;
the obtaining module 501 is specifically configured to:
if a target error occurs in the index service using process, recording the target error to a log file, wherein the target error comprises: at least one of not connecting to the index server, and connecting to the index server timeout;
if the index service is in the using process, the search record of the user is stored, wherein the search record comprises: the search takes a long time.
And acquiring the target error record and the time consumed for searching from the log file as the monitoring information used by the index service.
As an optional implementation manner of the embodiment of the present disclosure, the target alarm rule includes at least one of the following:
the target error exists;
the time length consumed by the search is greater than or equal to the preset time length.
The obtaining module 501 is specifically configured to:
acquiring monitoring information of the imported data by importing first analog data;
and/or the presence of a gas in the gas,
and acquiring the monitoring information of the state of the index service and/or the monitoring information used by the index service by using the index service aiming at the second analog data.
The output module 503 is specifically configured to:
displaying an alarm interface based on the alarm information; the alarm interface comprises at least one function control which is used for triggering processing operation aiming at least one fault, wherein each function control is used for triggering processing operation aiming at one or more faults.
As shown in fig. 6, an embodiment of the present disclosure provides a monitoring apparatus, including: a processor 601, a memory 602 and a computer program stored on the memory 602 and operable on the processor 601, the computer program, when executed by the processor 601, implementing the respective processes of the monitoring method of the index server in the above-described method embodiments. And the same technical effect can be achieved, and in order to avoid repetition, the description is omitted.
An embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the monitoring method for an index server in the foregoing method embodiments, and can achieve the same technical effect, and is not described herein again to avoid repetition.
The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
Embodiments of the present invention provide a computer program product, where the computer program is stored, and when being executed by a processor, the computer program implements each process of the monitoring method for an index server in the foregoing method embodiments, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
As will be appreciated by one skilled in the art, embodiments of the present disclosure may be provided as a method, system, or computer program product. Accordingly, the present disclosure may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present disclosure may take the form of a computer program product embodied on one or more computer-usable storage media having computer-usable program code embodied in the medium.
In the present disclosure, the Processor may be a Central Processing Unit (CPU), and may also be other general purpose processors, Digital Signal Processors (DSP), Application Specific Integrated Circuits (ASIC), Field-Programmable Gate arrays (FPGA) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, and the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
In the present disclosure, the memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
In the present disclosure, computer-readable media include both non-transitory and non-transitory, removable and non-removable storage media. Storage media may implement information storage by any method or technology, and the information may be computer-readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The foregoing are merely exemplary embodiments of the present disclosure, which enable those skilled in the art to understand or practice the present disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the disclosure. Thus, the present disclosure is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. The monitoring method of an index server is characterized by being applied to monitoring the index server;
acquiring target monitoring information, wherein the target monitoring information comprises: at least one of monitoring information of imported data, monitoring information of index service state and monitoring information of index service use;
determining a target alarm rule corresponding to the target monitoring information, wherein the target alarm rule corresponds to at least one fault setting;
and outputting alarm information aiming at the at least one fault when the target monitoring information meets the target alarm rule.
2. The method of claim 1, wherein the target monitoring information comprises: the monitoring information of the imported data is as follows:
the acquiring of the target monitoring information includes:
when a first API is called to import first data to a message queue, if a first request error exists, recording the first request error in a log file, wherein the first API is an API of the message queue;
after the first data is imported into the message queue, when a second API (application programming interface) is called to import the first data in the message queue into an index service, if a second request error exists, recording the second request error to the log file, wherein the second API is an API of the index service;
acquiring the first request error and/or the second request error from the log file;
acquiring the consumption data quantity and/or the non-consumption data quantity from the message queue;
and taking at least one of the first request error, the second request error, the consumed data quantity and the unconsumed data quantity as the monitoring information of the imported data.
3. The method of claim 2, wherein the target alarm rule comprises at least one of:
the first request error exists;
the second request error is present;
the amount of consumption data is less than or equal to a first amount threshold;
within a first length of time, the amount of consumption data is less than or equal to a first amount threshold;
the number of unconsumed transactions is greater than or equal to a second number threshold;
within a second length of time, the amount of unconsumed data is greater than or equal to a second amount threshold;
the ratio of the number of unconsumed products to the number of consumed products is greater than or equal to a preset ratio;
within a third time length, the ratio of the number not consumed to the number consumed is greater than a preset ratio;
a message backlog rate is greater than or equal to a ratio threshold, the message backlog rate being: a ratio of the number of unconsumed transactions to the total amount of data in the message queue for a fourth time period.
4. The method of claim 1, wherein the index server is a server cluster comprising a plurality of servers, and wherein the target monitoring information comprises: monitoring information of the index service state;
the acquiring of the target monitoring information includes:
acquiring running state information of the plurality of servers; the operating state information includes at least one of:
load rate, slow query log of index service;
wherein the load factor comprises: at least one of CPU utilization rate, memory utilization rate, bandwidth occupancy rate and disk occupancy rate.
5. The method of claim 4, wherein the target alarm rule comprises at least one of:
the load rate of the single server is greater than or equal to a first preset rate;
the total load rate is greater than or equal to a second preset rate;
two servers with load difference values larger than or equal to a preset difference value exist;
there is a slow query log of the index service;
the slow query log of the index service indicates that the response time of the index service is greater than or equal to a preset time.
6. The method of claim 1, wherein the target monitoring information comprises: monitoring information used by the index service;
the acquiring of the target monitoring information includes:
in the use process of the index service, if a target error occurs, recording the target error to a log file, wherein the target error comprises: at least one of not connected to the index server, and timed out;
in the process of using the index service, the search record of the user is saved, wherein the search record comprises the following steps: searching time-consuming duration;
and acquiring the target error record and the time consumed for searching from the log file as the monitoring information used by the index service.
7. The method of claim 6, wherein the target alarm rules comprise at least one of:
the target error exists;
the time length consumed by the search is greater than or equal to the preset time length.
8. The method of claim 1, wherein the obtaining target monitoring information comprises:
acquiring monitoring information of the imported data by importing first analog data;
and/or the presence of a gas in the gas,
and acquiring the monitoring information of the state of the index service and/or the monitoring information used by the index service by using the index service aiming at the second analog data.
9. The method according to any one of claims 1 to 8, wherein the outputting alarm information includes:
displaying an alarm interface based on the alarm information; the alarm interface comprises at least one function control which is used for triggering processing operation aiming at least one fault, wherein each function control is used for triggering processing operation aiming at one or more faults.
10. A monitoring device, comprising: processor, memory and computer program stored on the memory and executable on the processor, which computer program, when executed by the processor, implements the monitoring method of an index server of any one of claims 1 to 9.
CN202111306693.3A 2021-11-05 2021-11-05 Monitoring method and monitoring equipment for index server Pending CN114020571A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111306693.3A CN114020571A (en) 2021-11-05 2021-11-05 Monitoring method and monitoring equipment for index server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111306693.3A CN114020571A (en) 2021-11-05 2021-11-05 Monitoring method and monitoring equipment for index server

Publications (1)

Publication Number Publication Date
CN114020571A true CN114020571A (en) 2022-02-08

Family

ID=80061576

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111306693.3A Pending CN114020571A (en) 2021-11-05 2021-11-05 Monitoring method and monitoring equipment for index server

Country Status (1)

Country Link
CN (1) CN114020571A (en)

Similar Documents

Publication Publication Date Title
US20180365085A1 (en) Method and apparatus for monitoring client applications
CN106202235B (en) Data processing method and device
US20160142369A1 (en) Service addressing in distributed environment
CN106341248B (en) Fault processing method and device based on cloud platform
CN110493065B (en) Alarm correlation degree analysis method and system for cloud center operation and maintenance
US20100153431A1 (en) Alert triggered statistics collections
CN109309596B (en) Pressure testing method and device and server
CN101707632A (en) Method for dynamically monitoring performance of server cluster and alarming real-timely
CN109614284B (en) Data processing method and device
CN110147470B (en) Cross-machine-room data comparison system and method
CN110297746A (en) A kind of data processing method and system
CN111984495A (en) Big data monitoring method and device and storage medium
CN111314158B (en) Big data platform monitoring method, device, equipment and medium
CN109062769B (en) Method, device and equipment for predicting IT system performance risk trend
CN111338888B (en) Data statistics method and device, electronic equipment and storage medium
CN107515807B (en) Method and device for storing monitoring data
CN109245943B (en) Fault positioning method and device
CN113297245A (en) Method and device for acquiring execution information
CN114020571A (en) Monitoring method and monitoring equipment for index server
CN113222223B (en) Wind control linkage early warning method, system, equipment and storage medium for real-time warehouse
CN116126621A (en) Task monitoring method of big data cluster and related equipment
CN113220757A (en) Real-time warehouse automatic ETL method, system, equipment and computer storage medium
CN112527887A (en) Visual operation and maintenance method and device applied to Gbase database
CN117596187B (en) Server operation and maintenance method, device, equipment and medium based on multi-cloud platform
CN114519059B (en) Data processing method, device, electronic equipment and storage medium

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