CN113518002B - Monitoring method, device, equipment and storage medium based on server-free platform - Google Patents

Monitoring method, device, equipment and storage medium based on server-free platform Download PDF

Info

Publication number
CN113518002B
CN113518002B CN202110567819.6A CN202110567819A CN113518002B CN 113518002 B CN113518002 B CN 113518002B CN 202110567819 A CN202110567819 A CN 202110567819A CN 113518002 B CN113518002 B CN 113518002B
Authority
CN
China
Prior art keywords
monitoring
item
data
platform
monitoring item
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.)
Active
Application number
CN202110567819.6A
Other languages
Chinese (zh)
Other versions
CN113518002A (en
Inventor
王盼盼
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Puhui Enterprise Management Co Ltd
Original Assignee
Ping An Puhui Enterprise Management 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 Ping An Puhui Enterprise Management Co Ltd filed Critical Ping An Puhui Enterprise Management Co Ltd
Priority to CN202110567819.6A priority Critical patent/CN113518002B/en
Publication of CN113518002A publication Critical patent/CN113518002A/en
Application granted granted Critical
Publication of CN113518002B publication Critical patent/CN113518002B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0631Management of faults, events, alarms or notifications using root cause analysis; using analysis of correlation between notifications, alarms or events based on decision criteria, e.g. hierarchy, tree or time analysis
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0677Localisation of faults
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters

Abstract

The invention relates to a cloud monitoring technology, and provides a monitoring method based on a serverless platform, which comprises the following steps: receiving and storing a detection script and a trigger condition of a monitoring item configured by a user; monitoring whether a target monitoring item meeting a triggering condition exists in the monitoring items through a server-free platform; if yes, calling the detection script of the target monitoring item through the serverless platform and executing to obtain and store corresponding monitoring data; and judging whether monitoring early warning needs to be sent or not according to the acquired monitoring data. By using the server-free platform, a user only needs to configure the detection script of the monitoring item on the page, a large number of background servers are not needed to be provided to support the monitoring platform, secondary development and deployment are not needed to be performed on the monitoring platform, and the realization speed of user automatic monitoring can be greatly improved. And a server-free platform is added to carry out real-time monitoring and early warning according to the acquired monitoring data, so that a user can find problems in time.

Description

Monitoring method, device, equipment and storage medium based on server-free platform
Technical Field
The invention relates to the technical field of cloud monitoring, in particular to a monitoring method, a monitoring device, monitoring equipment and a storage medium based on a serverless platform.
Background
In actual production, monitoring is the most important ring in the whole operation and maintenance and even the whole life cycle of products, faults are found by early warning in time in advance, and detailed data are provided for tracing and positioning problems afterwards.
Currently, many open source monitoring systems are available in the industry, and different monitoring systems are applicable to different monitoring scenes. For example, in order to monitor whether a website service or an API service is available, zabbix, prometheus, falcon, etc. are frequently used website monitoring platforms, and a request is periodically initiated by the monitoring platform to judge the availability of the website or the service by setting a service address to be monitored and a time threshold for monitoring by a user himself.
However, the existing monitoring platform needs a certain learning cost, needs to deploy and maintain software, and also needs to use a certain physical resource, which results in that automatic capacity expansion and capacity reduction cannot be performed.
Disclosure of Invention
The present invention provides a monitoring method, apparatus, device and storage medium based on a serverless platform, which is directed to the above-mentioned deficiencies of the prior art, and the object is achieved by the following technical solutions.
The invention provides a monitoring method based on a server-free platform in a first aspect, and the method comprises the following steps:
receiving and storing a detection script and a trigger condition of a monitoring item configured by a user;
monitoring whether a target monitoring item meeting the triggering condition exists in the monitoring items through the server-free platform;
if yes, calling the detection script of the target monitoring item through the server-free platform and executing to obtain and store corresponding monitoring data;
and judging whether monitoring early warning needs to be sent or not according to the acquired monitoring data.
In some embodiments of the present application, when the monitoring discovery logic information in the invoked detection script includes a URL address, a status response code, and an http return value, the invoking, by the serverless platform, the detection script of the target monitoring item and executing the detection script to obtain and store corresponding monitoring data may include:
the server-free platform acquires a state response code value and http return value data returned by the appointed host according to the URL address; and taking the acquired state response code numerical value and http return value data as monitoring data and storing the monitoring data corresponding to the target monitoring item.
In some embodiments of the present application, the determining whether to send a monitoring warning according to the acquired monitoring data may include:
judging whether the state response code value in the acquired monitoring data is a preset monitoring threshold value or not; and if so, sending a monitoring early warning for indicating that the URL address access is wrong.
In some embodiments of the present application, when the monitoring discovery logic information in the invoked detection script includes an ip address and a tcp port, the invoking, by the serverless platform, the detection script of the target monitoring item and executing the detection script to obtain and store corresponding monitoring data may include:
the server-free platform acquires data returned by the corresponding TCP service according to the ip address, and screens out data belonging to the TCP port from the returned data; and taking the screened data as monitoring data and storing the data corresponding to the target monitoring item.
In some embodiments of the present application, the determining whether to send a monitoring warning according to the acquired monitoring data may include:
judging whether the acquired monitoring data is empty or not; if so, sending a monitoring precaution indicating that the designated TCP port is not responsive.
In some embodiments of the present application, when the monitoring discovery logic information in the invoked detection script includes an ip address for a ping service, the executing, by the serverless platform, the detection script that invokes the target monitoring item and the executing are performed to obtain and store corresponding monitoring data, which may include:
the server-free platform executes a ping command by using the ip address to acquire a ping result returned by the appointed host; and taking the obtained ping result as monitoring data and storing the ping result corresponding to the target monitoring item.
In some embodiments of the present application, the determining whether to send a monitoring warning according to the acquired monitoring data may include:
judging whether the acquired monitoring data meet preset conditions or not; and if the IP address is not qualified, sending a monitoring early warning for indicating that the IP address is not communicated.
In some embodiments of the present application, after receiving and storing the detection script and the trigger condition of the monitoring item configured by the user, the method may further include:
generating a random number for the monitoring item; generating a unique application program interface api for the monitoring item according to the generated random number, the monitoring name of the monitoring item and the current system time, and storing the api corresponding to the monitoring item; when a query instruction of a user is received, acquiring the api of the monitoring item to be queried according to the query instruction, and querying the monitoring data of the monitoring item to be queried by calling the acquired api.
A second aspect of the present invention provides a monitoring apparatus based on a serverless platform, the apparatus comprising:
the configuration module is used for receiving and storing a detection script and a trigger condition of a monitoring item configured by a user;
the monitoring module is used for monitoring whether a target monitoring item meeting the triggering condition exists in the monitoring items through the server-free platform;
the calling execution module is used for calling and executing the detection script of the target monitoring item through the server-free platform to acquire and store corresponding monitoring data when the target monitoring item meeting the triggering condition is judged to exist;
and the early warning module is used for judging whether monitoring early warning needs to be sent or not according to the acquired monitoring data.
A third aspect of the invention proposes a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the method according to the first aspect when executing the program.
A fourth aspect of the invention proposes a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, carries out the steps of the method according to the first aspect as described above.
Based on the monitoring method and device based on the server-free platform in the first aspect and the second aspect, the invention has at least the following advantages or advantages:
by using the server-free platform, a user only needs to configure the detection script of the monitoring item on the page, and when the monitoring item meeting the triggering condition is monitored, the corresponding detection script is automatically called and executed to obtain corresponding monitoring data. In addition, the server-free platform is added to carry out real-time monitoring and early warning according to the acquired monitoring data, so that the user can find problems in time.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the invention and not to limit the invention. In the drawings:
FIG. 1 is a flow chart illustrating an embodiment of a monitoring method based on a serverless platform according to an illustrative embodiment of the invention;
fig. 2 is a schematic structural diagram of a monitoring apparatus based on a serverless platform according to an exemplary embodiment of the present invention;
FIG. 3 is a diagram illustrating a hardware configuration of a computer device according to an exemplary embodiment of the present invention;
fig. 4 is a schematic diagram illustrating a structure of a storage medium according to an exemplary embodiment of the present invention.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in this disclosure and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present invention. The word "if" as used herein may be interpreted as "at" \8230; "or" when 8230; \8230; "or" in response to a determination ", depending on the context.
The monitoring is the most important ring in the whole operation and maintenance and even the whole life cycle of the product, the fault is found by early warning in time in advance, and detailed data is provided for tracing and positioning the problem afterwards. There are many open source products available in the industry today. The source-open monitoring system is selected, and the scheme is time-saving, labor-saving and highest in efficiency. Currently available open source monitoring platforms are zabbix, prometheus, falcon, etc.
However, the existing operation and maintenance monitoring platform has the following defects: learning cost is needed, and deployment and maintenance are needed for software; certain physical resources are needed and automatic capacity expansion and reduction cannot be realized; the management configuration is complex, and a large amount of workload is required when a large number of servers are managed (added or deleted).
In order to solve the technical problem, the invention provides a monitoring method based on a server-free platform, wherein a user configures and stores a detection script and a trigger condition of a monitoring item on a configuration page provided by the server-free platform, and monitors whether a target monitoring item meeting the trigger condition exists or not through the server-free platform, if so, the server-free platform calls and executes the detection script of the target monitoring item to acquire and store corresponding monitoring data, and then judges whether monitoring early warning needs to be sent or not according to the acquired monitoring data.
Based on the description, the server-free platform is used, so that a user only needs to configure the detection script of the monitoring item on the page, and when the monitoring item meeting the triggering condition is monitored, the corresponding detection script is automatically called and executed to obtain corresponding monitoring data. In addition, the server-free platform is added to carry out real-time monitoring and early warning according to the acquired monitoring data, so that the user can find problems in time.
The monitoring method based on the serverless platform provided by the invention is explained in detail by specific embodiments below.
Fig. 1 is a flowchart illustrating an embodiment of a monitoring method based on a serverless platform according to an exemplary embodiment of the present invention, where the monitoring method based on a serverless platform may be applied to a computer device, where the computer device may be a mobile terminal, a computer terminal, a server, and the like, and an application program of a serverless (serverless) platform is installed on the computer device, as shown in fig. 1, the monitoring method based on a serverless platform includes the following steps:
step 101: and receiving and storing a detection script and a trigger condition of the monitoring item configured by the user.
In this embodiment, a user may configure a monitoring item in a configuration page provided by a serverless platform according to an actual service requirement, and add a corresponding detection script and a corresponding trigger condition to the monitoring item. The detection script is used for obtaining corresponding monitoring data, and the trigger condition is used for indicating the condition which needs to be met by executing the detection script.
In an alternative embodiment, the detection script of the monitoring item may be a shell script, and the monitoring discovery logic information contained in the detection script may be a shell command program, and the commands are names of executable programs, so that the script can be executed without compiling and by being interpreted by an interpreter.
It should be noted that each monitoring item configured by the user is correspondingly provided with a trigger condition, different monitoring items may be provided with different trigger conditions, and the trigger condition may be a monitoring frequency, or may be a condition such as a specific monitoring time point. Of course, the trigger conditions may also have an association relationship, for example, the trigger condition 2 is to execute the monitoring item 2 after executing the monitoring item 1 corresponding to the trigger condition 1, that is, only when the trigger condition 1 is satisfied and the monitoring item 1 corresponding to the trigger condition 1 is executed, the trigger condition 2 can be satisfied and the monitoring item 2 can be executed.
It should be further noted that, in addition to configuring the detection script and the trigger condition of the monitoring item, the user may also configure basic information such as a monitoring name, a storage period, a monitoring threshold, a monitoring server, and the like, and further may store the information related to the monitoring item in the database, so as to ensure that each monitoring item generates a unique id correspondingly.
Step 102: and monitoring whether a target monitoring item meeting the triggering condition exists in the monitoring items through the server-free platform, if so, executing the step 103, otherwise, continuing to execute the step 102.
Specifically, the serverless platform judges whether the triggering condition of each monitoring item is established in real time, and when the established triggering condition exists, the monitoring item meeting the triggering condition is monitored.
Step 103: and calling the detection script of the target monitoring item through the server-free platform and executing the detection script to acquire and store corresponding monitoring data.
Three specific implementations are given below for the process of step 103, and each implementation is specifically set forth.
In a first implementation: when the detection script is used for http (hypertext Transfer Protocol) detection, the monitoring discovery logic information includes a URL (Uniform Resource Locator), a status response code, and an http return value. Based on this, the calling execution process of the server-free platform is as follows: and acquiring a state response code value and http return value data returned by the appointed host according to the URL address, and accordingly, taking the acquired state response code value and http return value data as monitoring data and storing the monitoring data corresponding to the target monitoring item.
The http status response code is a 3-bit digital code, and the first digit of the status response code represents one of five statuses of the response, for example, a "1" header represents a message, a "2" header represents success, a "3" header represents redirection, a "4" header represents a request error, and a "5" header represents a server error. The http return value is the specific content returned by the specified host for the request.
For example, suppose that the url of the logic information is found by monitoring is a hundred-degree top page, the designated host is a hundred-degree server, and when the url is accessed, it is assumed that the returned status response code is 200, which indicates that the access is successful, and the http return value is the specific content of the hundred-degree top page.
Compared with the prior art, the existing monitoring platform cannot meet the requirements of monitoring the website state response code and http return value, and needs to customize and develop a monitoring tool or perform secondary development to realize the monitoring, but the invention does not need a user to perform secondary development, and can be simply and conveniently realized through a server-free platform.
In a second implementation manner, when the detection script is used for TCP (Transmission Control Protocol) detection, the monitoring discovery logic information includes an ip (internet Protocol) address and a TCP port. Based on this, the calling execution process of the serverless platform is as follows: and acquiring data returned by the corresponding TCP service according to the ip address, and screening the data belonging to the TCP port from the returned data, so that the screened data is used as monitoring data and is stored corresponding to a target monitoring item.
In a third implementation manner, when the detection script is used for icmp (Internet Control Message Protocol) detection, the monitoring discovery logic information includes an ip address used for ping service. Based on this, the calling execution process of the server-free platform is as follows: and executing the ping command by utilizing the ip address to acquire a ping result returned by the appointed host, and accordingly, taking the acquired ping result as monitoring data and storing the monitoring data corresponding to the target monitoring item.
It should be noted that, in the second implementation manner and the third implementation manner, a firewall, antivirus software, and the like of the client on the computer device need to be opened, so that the computer device sends the detection information to the specified host or the client.
It should be emphasized that, in order to further ensure the privacy and security of the monitoring data of the monitoring item, the monitoring data of the monitoring item may also be stored in a node of a block chain.
The block chain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
Step 104: and judging whether monitoring early warning needs to be sent or not according to the acquired monitoring data.
Based on the three specific implementation manners described in step 103, when the detection script is used for http detection, it may be determined whether a status response code in the obtained monitoring data is a preset monitoring threshold, and if so, it indicates that the URL address access is in error, and sends a monitoring warning for indicating that the URL address access is in error.
Illustratively, the monitoring threshold may be a status response code of a "4" header or a status response code of a "5" header. The sent monitoring early warning can carry information such as the url address and the monitoring name of the access, so that the user can quickly locate the problem.
When the detection script is used for TCP detection, whether the obtained monitoring data is empty or not can be judged, if yes, the TCP port specified by the logic information is found to be non-responsive through monitoring, and a monitoring early warning for indicating that the specified TCP port is non-responsive is sent. The monitoring and early warning can carry information such as an ip address, a tcp port number and a monitoring name, so that a user can quickly locate problems.
When the user icmp of the script is detected, whether the acquired monitoring data meet the preset conditions or not can be judged, if not, the IP address is indicated to be not communicated, and a monitoring early warning for indicating that the IP address is not communicated is sent. The monitoring early warning can carry information such as an IP address and a monitoring name used for ping service, so that a user can quickly locate the problem.
It should be noted that, in order to ensure that an Application Programming Interface (api) corresponding to each monitoring item is not repeated, when a serverless platform receives a monitoring item configured by a user, a random number may be generated for the monitoring item, a unique api may be generated according to the generated random number, a monitoring name of the monitoring item, and current system time, and the api is stored corresponding to the monitoring item.
Specifically, an automatically generated open source tool (e.g., kaola) of the api may be employed to generate a unique api using a random number, a monitoring name, and a current system time.
Further, when a user needs to query monitoring data of a certain monitoring item, and when the non-server platform receives a query instruction of the user, the api of the monitoring item to be queried is obtained according to the query instruction, and the monitoring data of the monitoring item to be queried is queried by calling the obtained api.
So far, the monitoring process shown in fig. 1 is completed, and by using the server-less platform, the user only needs to configure the detection script of the monitoring item on the page, and when the target monitoring item meeting the trigger condition is monitored, the corresponding detection script is automatically called and executed to obtain the corresponding monitoring data. In addition, the server-free platform is added to carry out real-time monitoring and early warning according to the acquired monitoring data, so that the user can find problems in time.
Corresponding to the embodiment of the monitoring method based on the server-free platform, the invention also provides an embodiment of a monitoring device based on the server-free platform.
Fig. 2 is a flowchart illustrating an embodiment of a monitoring apparatus based on a serverless platform according to an exemplary embodiment of the present invention, the monitoring apparatus being configured to perform the monitoring method based on a serverless platform provided in any of the above embodiments, as shown in fig. 2, the monitoring apparatus based on a serverless platform includes:
the configuration module 210 is configured to receive and store a detection script and a trigger condition of a monitoring item configured by a user;
a monitoring module 220, configured to monitor whether there is a target monitoring item that meets the trigger condition in the monitoring items through the serverless platform;
the calling execution module 230 is configured to, when it is determined that a target monitoring item meeting a trigger condition exists, call a detection script of the target monitoring item through the serverless platform and execute the detection script to obtain and store corresponding monitoring data;
and the early warning module 240 is configured to determine whether a monitoring early warning needs to be sent according to the acquired monitoring data.
In an optional implementation manner, when the monitoring discovery logic information in the invoked detection script includes a URL address, a status response code, and an http return value, the invocation execution module 230 is specifically configured to obtain, by the serverless platform, a status response code value and an http return value data returned by the specified host according to the URL address; and taking the acquired state response code numerical value and http return value data as monitoring data and storing the monitoring data corresponding to the target monitoring item.
In an optional implementation manner, the early warning module 240 is specifically configured to determine whether a status response code value in the acquired monitoring data is a preset monitoring threshold; and if so, sending a monitoring early warning for indicating that the URL address access is wrong.
In an optional implementation manner, when the monitoring discovery logic information in the invoked detection script includes an ip address and a TCP port, the invocation execution module 230 is specifically configured to obtain, by the serverless platform, data returned by a corresponding TCP service according to the ip address, and screen out, from the returned data, data belonging to the TCP port; and taking the screened data as monitoring data and storing the data corresponding to the target monitoring item.
In an optional implementation manner, the early warning module 240 is specifically configured to determine whether the acquired monitoring data is empty; if so, sending a monitoring precaution for indicating that the designated TCP port is not responsive.
In an optional implementation manner, when the monitoring discovery logic information in the called detection script includes an ip address for the ping service, the call execution module 230 is specifically configured to execute a ping command by using the ip address through the serverless platform to obtain a ping result returned by the specified host; and taking the obtained ping result as monitoring data and storing the obtained ping result corresponding to the target monitoring item.
In an optional implementation manner, the early warning module 240 is specifically configured to determine whether the acquired monitoring data meets a preset condition; and if the IP address is not qualified, sending a monitoring early warning for indicating that the IP address is not communicated.
In an alternative implementation, the apparatus may further comprise (not shown in fig. 2):
an Api generating module, configured to receive and store a detection script and a trigger condition of a monitoring item configured by a user, and generate a random number for the monitoring item; generating a unique api for the monitoring item according to the generated random number, the monitoring name of the monitoring item and the current system time, and storing the api corresponding to the monitoring item;
and the query module is used for acquiring the api of the monitoring item to be queried according to the query instruction when receiving the query instruction of the user, and querying the monitoring data of the monitoring item to be queried by calling the acquired api.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the invention. One of ordinary skill in the art can understand and implement without inventive effort.
The embodiment of the present invention further provides a computer device corresponding to the monitoring method based on the serverless platform provided in the foregoing embodiment, so as to execute the monitoring method based on the serverless platform.
Fig. 3 is a hardware configuration diagram of a computer device according to an exemplary embodiment of the present invention, the computer device including: a communication interface 601, a processor 602, a memory 603, and a bus 604; the communication interface 601, the processor 602 and the memory 603 communicate with each other via a bus 604. The processor 602 may execute the above-described monitoring method based on a serverless platform by reading and executing machine executable instructions corresponding to the control logic of the monitoring method based on a serverless platform in the memory 603, and the specific content of the method is described in the above embodiments and will not be described again here.
The memory 603 referred to in this disclosure may be any electronic, magnetic, optical, or other physical storage device that can contain stored information, such as executable instructions, data, and so forth. Specifically, the Memory 603 may be a RAM (Random Access Memory), a flash Memory, a storage drive (such as a hard disk drive), any type of storage disk (such as an optical disk, a DVD, etc.), or similar storage medium, or a combination thereof. The communication connection between the network element of the system and at least one other network element is realized through at least one communication interface 601 (which may be wired or wireless), and the internet, a wide area network, a local network, a metropolitan area network, and the like can be used.
Bus 604 may be an ISA bus, PCI bus, EISA bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. The memory 603 is used for storing a program, and the processor 602 executes the program after receiving the execution instruction.
The processor 602 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 602. The Processor 602 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor.
The computer device provided by the embodiment of the application and the monitoring method based on the serverless platform provided by the embodiment of the application are based on the same inventive concept, and have the same beneficial effects as the method adopted, operated or realized by the computer device.
Referring to fig. 4, the computer readable storage medium is an optical disc 30, and a computer program (i.e., a program product) is stored thereon, and when being executed by a processor, the computer program may execute the monitoring method based on the serverless platform according to any of the foregoing embodiments.
It should be noted that examples of the computer-readable storage medium may also include, but are not limited to, a phase change memory (PRAM), a Static Random Access Memory (SRAM), a Dynamic Random Access Memory (DRAM), other types of Random Access Memories (RAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a flash memory, or other optical and magnetic storage media, which are not described in detail herein.
The computer-readable storage medium provided by the above-mentioned embodiment of the present application and the monitoring method based on the serverless platform provided by the embodiment of the present application have the same inventive concept, and have the same beneficial effects as the method adopted, operated or implemented by the application program stored in the computer-readable storage medium.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It should also be noted that 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 phrases "comprising one of 8230; \8230;" 8230; "does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises that element.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and should not be taken as limiting the scope of the present invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (10)

1. A monitoring method based on a serverless platform is characterized by comprising the following steps:
receiving and storing a detection script and a trigger condition of a monitoring item configured by a user;
monitoring whether a target monitoring item meeting the triggering condition exists in the monitoring items through the server-free platform;
if yes, calling the detection script of the target monitoring item through the server-free platform and executing to obtain and store corresponding monitoring data;
judging whether monitoring early warning needs to be sent or not according to the acquired monitoring data;
after receiving and storing the detection script and the trigger condition of the monitoring item configured by the user, the method further comprises the following steps:
generating a random number for the monitoring item;
generating a unique application program interface api for the monitoring item according to the generated random number, the monitoring name of the monitoring item and the current system time, and storing the api corresponding to the monitoring item;
when receiving a query instruction of a user, acquiring the api of the monitoring item to be queried according to the query instruction, and querying the monitoring data of the monitoring item to be queried by calling the acquired api.
2. The method according to claim 1, wherein when the monitoring discovery logic information in the invoked detection script includes a Uniform Resource Locator (URL) address, a status response code and an http return value, the invoking, by the serverless platform, and executing the detection script of the target monitoring item to obtain and store corresponding monitoring data comprises:
the server-free platform acquires a state response code value and http return value data returned by the appointed host according to the URL address;
and taking the acquired state response code numerical value and http return value data as monitoring data and storing the monitoring data corresponding to the target monitoring item.
3. The method of claim 2, wherein determining whether a monitoring alert needs to be sent based on the obtained monitoring data comprises:
judging whether the state response code value in the acquired monitoring data is a preset monitoring threshold value or not;
and if so, sending a monitoring early warning for indicating that the URL address access has errors.
4. The method according to claim 1, wherein when the monitoring discovery logic information in the called detection script includes an ip address and a tcp port, the calling and executing, by the serverless platform, the detection script of the target monitoring item to obtain and store corresponding monitoring data comprises:
the server-free platform acquires data returned by the corresponding TCP service according to the ip address, and screens out data belonging to the TCP port from the returned data;
and taking the screened data as monitoring data and storing the data corresponding to the target monitoring item.
5. The method of claim 4, wherein determining whether a monitoring precaution needs to be sent based on the obtained monitoring data comprises:
judging whether the acquired monitoring data is empty or not;
if so, sending a monitoring precaution indicating that the designated TCP port is not responsive.
6. The method according to claim 1, wherein when the monitoring discovery logic information in the invoked detection script includes an ip address for a ping service, the invoking and executing, by the serverless platform, the detection script of the target monitoring item to obtain and store corresponding monitoring data comprises:
the server-free platform executes a ping command by using the ip address to acquire a ping result returned by the appointed host;
and taking the obtained ping result as monitoring data and storing the ping result corresponding to the target monitoring item.
7. The method of claim 6, wherein determining whether a monitoring precaution needs to be sent based on the obtained monitoring data comprises:
judging whether the acquired monitoring data meet preset conditions or not;
and if the IP address is not qualified, sending a monitoring early warning for indicating that the IP address is not available.
8. A monitoring apparatus based on a serverless platform, the apparatus comprising:
the configuration module is used for receiving and storing a detection script and a trigger condition of a monitoring item configured by a user;
the monitoring module is used for monitoring whether a target monitoring item meeting the triggering condition exists in the monitoring items through the server-free platform;
the calling execution module is used for calling and executing the detection script of the target monitoring item through the server-free platform to acquire and store corresponding monitoring data when the target monitoring item meeting the triggering condition is judged to exist;
the early warning module is used for judging whether monitoring early warning needs to be sent or not according to the acquired monitoring data;
the apparatus may further comprise:
the device comprises an Api generating module, a triggering module and a monitoring module, wherein the Api generating module is used for generating a random number for a monitoring item after receiving and storing a detection script and a triggering condition of the monitoring item configured by a user; generating a unique api for the monitoring item according to the generated random number, the monitoring name of the monitoring item and the current system time, and storing the api corresponding to the monitoring item;
and the query module is used for acquiring the api of the monitoring item to be queried according to the query instruction when receiving the query instruction of the user, and querying the monitoring data of the monitoring item to be queried by calling the acquired api.
9. A computer arrangement comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any of claims 1-7 when executing the program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
CN202110567819.6A 2021-05-24 2021-05-24 Monitoring method, device, equipment and storage medium based on server-free platform Active CN113518002B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110567819.6A CN113518002B (en) 2021-05-24 2021-05-24 Monitoring method, device, equipment and storage medium based on server-free platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110567819.6A CN113518002B (en) 2021-05-24 2021-05-24 Monitoring method, device, equipment and storage medium based on server-free platform

Publications (2)

Publication Number Publication Date
CN113518002A CN113518002A (en) 2021-10-19
CN113518002B true CN113518002B (en) 2022-11-25

Family

ID=78064757

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110567819.6A Active CN113518002B (en) 2021-05-24 2021-05-24 Monitoring method, device, equipment and storage medium based on server-free platform

Country Status (1)

Country Link
CN (1) CN113518002B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114389971B (en) * 2022-03-23 2022-12-23 苏州浪潮智能科技有限公司 Intelligent monitoring fine adjustment method, device, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110740061A (en) * 2019-10-18 2020-01-31 北京三快在线科技有限公司 Fault early warning method and device and computer storage medium
CN111611086A (en) * 2020-05-28 2020-09-01 中国工商银行股份有限公司 Information processing method, information processing apparatus, electronic device, and medium
CN111624962A (en) * 2020-05-19 2020-09-04 中国地质大学(武汉) Data computer lab distribution equipment management and control system
CN111868676A (en) * 2018-03-15 2020-10-30 净睿存储股份有限公司 Servicing I/O operations in a cloud-based storage system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9384034B2 (en) * 2014-03-28 2016-07-05 International Business Machines Corporation Detecting operation of a virtual machine

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111868676A (en) * 2018-03-15 2020-10-30 净睿存储股份有限公司 Servicing I/O operations in a cloud-based storage system
CN110740061A (en) * 2019-10-18 2020-01-31 北京三快在线科技有限公司 Fault early warning method and device and computer storage medium
CN111624962A (en) * 2020-05-19 2020-09-04 中国地质大学(武汉) Data computer lab distribution equipment management and control system
CN111611086A (en) * 2020-05-28 2020-09-01 中国工商银行股份有限公司 Information processing method, information processing apparatus, electronic device, and medium

Also Published As

Publication number Publication date
CN113518002A (en) 2021-10-19

Similar Documents

Publication Publication Date Title
CN112506659B (en) Management method of edge equipment and related device
CN110888783B (en) Method and device for monitoring micro-service system and electronic equipment
CN111193716B (en) Service data calling method and device, computer equipment and storage medium
CN111258851B (en) Cluster alarm method, device, setting and storage medium
CN106844213A (en) A kind of front end method of testing and device
CN112558997A (en) Method and device for deploying applications
US11416379B1 (en) Creation of software tests matching production personas
CN113518002B (en) Monitoring method, device, equipment and storage medium based on server-free platform
CN111898059A (en) Website page quality evaluation and monitoring method and system
CN116055524A (en) Interaction method, processor and device for Internet platform and Internet of things equipment
CN112448992A (en) Edge computing task scheduling method and device
CN114609995A (en) Fault control method, device, system, equipment, medium and product
CN114363334A (en) Network configuration method, device and equipment for cloud system and cloud desktop virtual machine
CN110995522B (en) Information processing method and device
CN113268362A (en) Operation and maintenance method, device and equipment based on server-free platform and storage medium
CN114691445A (en) Cluster fault processing method and device, electronic equipment and readable storage medium
CN112559565A (en) Abnormity detection method, system and device
CN109495319B (en) Method, device and equipment for determining fault information of CDN node
CN115525545A (en) Docker-based automatic testing method, system, equipment and medium
CN112905197A (en) Information processing method, device and system, electronic equipment and storage medium
CN110635963B (en) Network state detection method and device
US11816496B2 (en) Managing containers using attribute/value pairs
CN110795109A (en) Function expansion method and device and electronic equipment
CN111338926A (en) Patch testing method and device and electronic equipment
CN111343042B (en) DNS analysis test method and test system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant