CN113791943A - Website real-time monitoring method, system, equipment and storage medium - Google Patents

Website real-time monitoring method, system, equipment and storage medium Download PDF

Info

Publication number
CN113791943A
CN113791943A CN202011262138.0A CN202011262138A CN113791943A CN 113791943 A CN113791943 A CN 113791943A CN 202011262138 A CN202011262138 A CN 202011262138A CN 113791943 A CN113791943 A CN 113791943A
Authority
CN
China
Prior art keywords
website
time
webpage
monitored
real
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
CN202011262138.0A
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 Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information 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 Jingdong Century Trading Co Ltd, Beijing Wodong Tianjun Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN202011262138.0A priority Critical patent/CN113791943A/en
Publication of CN113791943A publication Critical patent/CN113791943A/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/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
    • 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
    • G06F11/3093Configuration details thereof, e.g. installation, enabling, spatial arrangement of the probes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/32Monitoring with visual or acoustical indication of the functioning of the machine
    • G06F11/324Display of status information
    • G06F11/327Alarm or error message display
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2201/00Indexing scheme relating to error detection, to error correction, and to monitoring
    • G06F2201/865Monitoring of software
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2201/00Indexing scheme relating to error detection, to error correction, and to monitoring
    • G06F2201/88Monitoring involving counting

Abstract

The invention provides a method, a system, equipment and a storage medium for monitoring a website in real time, wherein the method comprises the following steps: regularly acquiring and recording a webpage state code of a monitored website based on a preset interval time; judging whether the website fails to be accessed according to the recorded webpage state code; if the website access fails, judging whether to alarm or not according to the number of times of the website access failure; and if the alarm is required, sending a website access failure notice to an exception handling terminal corresponding to the monitored website. According to the invention, the website state is acquired and monitored in real time, whether the website runs normally or not is automatically judged, and the abnormal processing terminal is automatically informed to process in time when access failure occurs and the failure times reach a certain number, so that all-weather real-time monitoring and timely alarm processing of the website within 24 hours can be realized, and the normal access of the website is ensured.

Description

Website real-time monitoring method, system, equipment and storage medium
Technical Field
The invention relates to the technical field of website monitoring, in particular to a method, a system, equipment and a storage medium for website real-time monitoring.
Background
Most of the existing website monitoring systems are realized by adopting Web service calling business logic, the calling success and failure results are reported to a monitoring server, a monitoring threshold value is set, and an alarm is given when the monitored parameters are lower than the monitoring threshold value. For example, for some important Web services, request frequency monitoring is set in a monitoring server of a Web monitoring system, and if the request frequency exceeds a monitoring threshold, or if no data is reported to the monitoring server by a Web server within a set time, an alarm is given.
In the process of solving the problem, operation and maintenance personnel need to manually judge when the system is likely to cause an alarm through what operation by virtue of development and operation and maintenance experience, codes need to be embedded into the items to ensure that the website monitoring system can normally alarm, the system is overstaffed, and only when the system alarms, a coping strategy can be adopted, so that coping time is late.
The technology for monitoring the webpage is timing monitoring, that is, the user sets the interval time, and the website monitoring system polls the webpage file to be monitored once in time to judge whether the file is illegally deleted or tampered. If the backup file is found, the backup file on the backup disk is immediately used for recovery. Such monitoring has one drawback: the illegally deleted or tampered web page cannot be timely restored.
In addition, existing web site monitoring methods are relatively single and are typically notified by mail. When an alarm is needed, operation and maintenance personnel are generally notified by sending mails, and the real-time performance of the mail notification is poor, which may affect the timely solution of the alarm problem. And the time spent on solving the alarm problem is also completely determined by developers and may not meet the requirements.
Disclosure of Invention
Aiming at the problems in the prior art, the invention aims to provide a website real-time monitoring method, a website real-time monitoring system, a website real-time monitoring device and a website real-time monitoring storage medium, which are used for monitoring the website state in real time and giving an alarm in time when the website is abnormal.
The embodiment of the invention provides a website real-time monitoring method, which comprises the following steps:
regularly acquiring and recording a webpage state code of a monitored website based on a preset interval time;
judging whether the currently acquired webpage state of the monitored website is abnormal according to the recorded webpage state code;
if the webpage is abnormal, adding one to the accumulated webpage abnormal times, and judging whether the accumulated webpage abnormal times is larger than or equal to a first threshold value or not;
if the accumulated abnormal times of the web pages are larger than or equal to a first threshold value, determining that the website access fails;
if the website access fails, judging whether to alarm or not according to the number of times of the website access failure;
and if the alarm is required, sending a website access failure notice to an exception handling terminal corresponding to the monitored website.
In some embodiments, after determining that the website access fails, adding one to the accumulated number of website access failures, and determining whether to alarm according to the number of website access failures includes the following steps:
judging whether the accumulated website access failure times are larger than or equal to a second threshold value or not;
and if the accumulated website access failure times are larger than or equal to a second threshold value, determining that the alarm is required currently.
In some embodiments, after determining whether the web page state of the currently acquired monitored website is a web page abnormality, the method further includes the following steps:
and if the webpage is normal, clearing the accumulated abnormal times of the webpage and clearing the accumulated access failure times of the website.
In some embodiments, after determining whether the web page state of the currently acquired monitored website is a web page abnormality, the method further includes the following steps:
if the webpage is normal, judging whether the monitored website has an operation and maintenance task or not, if so, sending a website recovery normal notification to an exception handling terminal corresponding to the monitored website.
In some embodiments, if an alarm is required, the method further comprises the following steps:
judging whether the time difference between the time of sending the website access failure notice and the current time is greater than or equal to a third threshold value or not, and whether the current time is within a preset operation and maintenance time range or not;
and if so, sending a website access failure notification to an exception handling terminal corresponding to the monitored website.
In some embodiments, the webpage status code of the monitored website is periodically acquired and recorded by using Prometheus through an HTTP protocol.
In some embodiments, the periodically obtaining the web page status of the monitored website based on the preset interval time includes the following steps:
discovering the monitored website according to the appointed website server, TCP port or website of the server;
and acquiring the webpage state from the monitored website at regular time based on the preset interval time.
In some embodiments, the sending the website access failure notification to the exception handling terminal corresponding to the monitored website includes sending the website access failure notification to the exception handling terminal corresponding to the monitored website through a short message.
The embodiment of the invention also provides a website real-time monitoring system, which is used for realizing the website real-time monitoring method, and the system comprises the following steps:
the state acquisition module is used for acquiring and recording the webpage state code of the monitored website at regular time based on the preset interval time;
the failure judgment module is used for judging whether the currently acquired webpage state of the monitored website is abnormal according to the recorded webpage state code; if the webpage is abnormal, adding one to the accumulated webpage abnormal times, and judging whether the accumulated webpage abnormal times is larger than or equal to a first threshold value or not; if the accumulated abnormal times of the web pages are larger than or equal to a first threshold value, determining that the website access fails;
the alarm judging module is used for judging whether an alarm is needed or not according to the number of times of website access failure if the website access failure occurs;
and the failure notification module is used for sending a website access failure notification to the abnormal processing terminal corresponding to the monitored website if an alarm is required.
The embodiment of the present invention further provides a website real-time monitoring device, including:
a processor;
a memory having stored therein executable instructions of the processor;
wherein the processor is configured to perform the steps of the website real-time monitoring method via execution of the executable instructions.
The embodiment of the invention also provides a computer readable storage medium for storing a program, and the program realizes the steps of the website real-time monitoring method when being executed.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
The website real-time monitoring method, system, equipment and storage medium of the invention have the following beneficial effects:
according to the invention, the website state is acquired and monitored in real time, whether the website runs normally or not is automatically judged, and the abnormal processing terminal is automatically informed to process in time when access failure occurs and the failure times reach a certain number, so that all-weather real-time monitoring and timely alarm processing of the website within 24 hours can be realized, and the normal access of the website is ensured.
Drawings
Other features, objects and advantages of the present invention will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, with reference to the accompanying drawings.
FIG. 1 is a flow chart of a method for real-time monitoring of a website according to an embodiment of the present invention;
FIG. 2 is a detailed flow chart of the present invention for determining whether an alarm is required;
FIG. 3 is a schematic structural diagram of a real-time website monitoring system according to an embodiment of the present invention;
FIG. 4 is a schematic structural diagram of a website real-time monitoring device according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a computer-readable storage medium according to an embodiment of the present invention.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus their repetitive description will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
As shown in fig. 1, an embodiment of the present invention provides a website real-time monitoring method, including the following steps:
s100: regularly acquiring and recording a webpage state code of a monitored website based on a preset interval time;
s200: judging whether the webpage state of the monitored website acquired currently is abnormal according to the recorded webpage state code, wherein the webpage state is normal when the state code of the webpage state is 200, and if the state code of the webpage state is other numerical values, the webpage is abnormal, for example, the server is abnormal when the state code is 504, and the static resource is abnormal when the state code is 404;
s300: if the webpage is abnormal, adding one to the accumulated webpage abnormal times, and judging whether the accumulated webpage abnormal times is larger than or equal to a first threshold value or not; the value of the first threshold may be set as needed, for example, to 5, but the present invention is not limited thereto, and in other embodiments, the first threshold may also be set to 3, 4, 6, etc., all of which fall within the protection scope of the present invention;
s400: if the accumulated abnormal times of the web pages are larger than or equal to a first threshold value, determining that the website access fails
S500: if the website access fails, judging whether to alarm or not according to the number of times of the website access failure;
s600: and if the alarm is required, sending a website access failure notice to an exception handling terminal corresponding to the monitored website.
Here, the exception handling terminal may be an operation and maintenance personnel terminal associated with the monitored website. When the website access failure notification needs to be sent to the exception handling terminal corresponding to the monitored website, a mapping table of communication information between the website and operation and maintenance personnel may be firstly queried, communication information of the operation and maintenance personnel of the monitored website is obtained, and the website access failure notification is sent to the operation and maintenance personnel terminal corresponding to the communication information of the operation and maintenance personnel. The operation and maintenance personnel terminal can be a mobile phone, a tablet computer, a notebook computer and the like which are used by the operation and maintenance personnel to receive messages. Correspondingly, the operation and maintenance personnel communication information may include a mobile phone number, a mailbox address, and the like. When the website access failure notice is sent, the notice can be sent through a short message or a mailbox. The short message can have better real-time performance than the mail box, and operation and maintenance personnel can find and process problems at the first time conveniently.
The method comprises the steps of S100, acquiring and monitoring the state of the website in real time, wherein the time length of the preset interval time can be selectively set according to needs, when the set time is smaller, the intensity of monitoring the website can be enhanced, whether the website runs normally or not is automatically judged through the steps S200-S500, and when access failure occurs and the failure times reach a certain number, an abnormal processing terminal is automatically notified through the step S600 to process in time, so that all-weather real-time monitoring and timely alarm processing of the website within 24 hours can be realized, and the normal access of the website is guaranteed.
In this embodiment, in step S100, the Prometheus is used to periodically obtain and record the webpage status code of the monitored website through the HTTP protocol. A monitoring period may be set, for example, to start scheduling every five minutes.
In this embodiment, the periodically obtaining the web page status of the monitored website based on the preset interval time includes the following steps:
discovering the monitored website according to the appointed website server, TCP port of the server or URL website;
and acquiring the webpage state code from the monitored website at regular time based on the preset interval time.
Prometheus is an open source monitoring alarm system and time series database developed by soundlog. The basic principle of Prometheus is to periodically capture the state of a monitored component through an HTTP (HyperText Transfer Protocol) Protocol, and any component can access the monitoring state as long as a corresponding HTTP interface is provided. There is no need for any SDK (Software Development Kit) or other integration process. Compared with the prior art, a large amount of codes do not need to be integrated in a website monitoring system, so that the system is prevented from being overstaffed. This is very suitable for a virtualized environment monitoring system, such as vm docker k8 s. The HTTP interface that outputs monitored component information is called exporter. Most of the components commonly used by internet companies at present have exporters which can be directly used, such as vmrnish, haproxy, nginx, mysql, linux system information (including disk, memory, CPU, network, etc.).
When Prometheus is applied to monitoring the website state, promethusdaemon is responsible for capturing metrics (index) data on a target at regular time. Each crawling object needs to expose an interface to the HTTP service to be periodically crawled. Prometheus supports the specification of a grabbing target in a configuration file, a text file, zookeeper, consul, dns srv lookup mode and the like. Prometheus monitors in a pull manner, i.e., the server can pull data directly through target pull data or indirectly through an intermediate gateway.
And the Prometheus locally stores all captured data, cleans and sorts the data through a certain rule, and stores the obtained result into a new time sequence.
Prometheus visually presents the collected data by promql and other api. Prometeeus supports many ways of icon visualization, such as grafana, Prometeeus in-band, and template engines provided by itself, among others. The Prometheus can provide a query mode of HTTP api (Application Programming Interface), and customize the required output. Pushgateway supports clients to actively push metrics, while Prometheus only times out to fetch data on the gateway. The Aletmanager is a component independent of Prometheus, can support the query statement of Prometheus, and provides a flexible alarm mode.
As shown in fig. 2, after step S300, if the accumulated number of web page exceptions is smaller than the first threshold, the accumulated number of website access failures does not need to be increased by one, and the process continues to return to step S100 to continue the scanning monitoring at the next time.
As shown in fig. 2, in this embodiment, the step S400: after determining that the website access fails, adding one to the accumulated website access failure times, wherein the step S500: judging whether to alarm according to the number of times of website access failure, comprising the following steps:
s510: judging whether the accumulated website access failure times is greater than or equal to a second threshold, wherein the value of the second threshold may be set as required, for example, set to 2, but the present invention is not limited thereto, and in other embodiments, the second threshold may also be set to 3, 4, 5, and other values, which are within the protection scope of the present invention; in addition, it is also possible that the second threshold value is set to 1, that is, an alarm is given when a website access failure is detected;
if the accumulated website access failure times are larger than or equal to a second threshold value, determining that an alarm is needed currently, and continuing to step S600;
and if the accumulated website access failure times are less than a second threshold value, updating the recorded website information, and then continuing the scanning monitoring of the next website.
In this embodiment, further, the step S200: after judging whether the webpage state of the currently acquired monitored website is abnormal, the method further comprises the following steps:
if the webpage is normal, clearing the accumulated abnormal times of the webpage and clearing the accumulated access failure times of the website without influencing the monitoring of the next abnormal and access failure of the website.
In this embodiment, the step S200: after judging whether the webpage state of the currently acquired monitored website is abnormal, the method further comprises the following steps:
if the webpage is normal, judging whether the monitored website has an operation and maintenance task or not, if so, sending a website recovery normal notification to the abnormal processing terminal.
As shown in fig. 2, specifically, it is determined whether the operation and maintenance task exists in the monitored website, that is, it is determined whether the website access failure number is greater than or equal to a second threshold before the website access failure number is cleared, and if so, it is indicated that a website access failure notification has been sent to the exception handling terminal before, that is, the operation and maintenance task already exists. At this time, a website recovery normal notification needs to be sent to the exception handling terminal to provide an operation and maintenance result to be fed back to the exception handling terminal.
In this embodiment, if an alarm is required, the method further comprises the following steps:
judging whether the time difference between the time of sending the website access failure notice and the current time is greater than or equal to a third threshold value or not, and whether the current time is within a preset operation and maintenance time range or not;
and if so, sending a website access failure notification to an exception handling terminal corresponding to the monitored website.
In this embodiment, the sending the website access failure notification to the exception handling terminal corresponding to the monitored website includes sending the website access failure notification to the exception handling terminal corresponding to the monitored website through a short message. The exception handling terminal may also receive other information related to website monitoring.
As shown in fig. 3, an embodiment of the present invention further provides a real-time website monitoring system, configured to implement the real-time website monitoring method, where the system includes:
the state acquisition module M100 is used for acquiring and recording the webpage state code of the monitored website at regular time based on the preset interval time;
the failure judgment module M200 is used for judging whether the website fails to be accessed according to the recorded webpage state;
the alarm judging module M300 is used for judging whether an alarm is needed according to the website access failure times if the website access fails;
and the failure notification module M400 is configured to send a website access failure notification to the exception handling terminal corresponding to the monitored website if an alarm is required.
In the real-time website monitoring system of the present invention, the functions of the modules may be implemented by using the specific implementation manner of the real-time website monitoring method described above. For example, the status obtaining module M100 may obtain the website status and records by using the specific implementation manner of the step S100, the failure determining module M200 determines that the failed network access fails by using the specific implementation manners of the steps S200 to S400, the alarm determining module M300 determines whether an alarm is required by using the specific implementation manner of the step S500, and the failure notifying module M400 notifies the operation and maintenance staff in time when the alarm is required by using the specific implementation manner of the step S600.
According to the invention, the state of the website is acquired and monitored in real time through the state acquisition module M100, whether the website is normally operated or not is automatically judged through the failure judgment module M200 and the alarm judgment module M300, and the failure notification module M400 is used for automatically notifying an abnormal processing terminal to process in time when access failure occurs and the failure times reach a certain number, so that all-weather real-time monitoring and timely alarm processing of the website in 24 hours can be realized, and the normal access of the website is ensured.
Specifically, the failure determining module M200 may determine, according to the web page status code, whether the currently acquired web page status of the monitored website is abnormal, for example, when the status code of the web page status is 200, the web page status is normal, if the status code of the web page status is other numerical value, the web page is abnormal, for example, when the status code is 504, the server is abnormal, and when the status code is 404, the static resource is abnormal, and the like; if the web page is abnormal, the failure determining module M200 adds one to the accumulated web page abnormal frequency, and the failure determining module M200 determines whether the accumulated web page abnormal frequency is greater than or equal to a first threshold, where a value of the first threshold may be set as required, for example, set as 5, but the present invention is not limited thereto, and in other embodiments, the first threshold may also be set as 3, 4, 6, and the like, and all of them fall within the protection scope of the present invention. If the accumulated abnormal times of the web page is greater than or equal to the first threshold value, the failure judgment module M200 determines that the website access fails, and adds one to the accumulated access failure times of the website; if the accumulated abnormal times of the web pages are smaller than the first threshold, the failure determination module M200 does not need to add one to the accumulated access failure times of the web sites.
Specifically, the alarm determining module M300 determines whether an alarm is required according to the number of times of website access failure, including: the alarm judgment module M300 judges whether the accumulated website access failure times are greater than or equal to a second threshold; if the accumulated website access failure times are larger than or equal to a second threshold value, the alarm judgment module M300 determines that an alarm is needed currently, and the failure notification module M400 alarms; if the accumulated number of times of website access failure is smaller than the second threshold, the alarm determination module M300 updates the recorded website information.
Further, the alarm determining module M300 is further configured to determine whether the operation and maintenance task exists in the current monitored website if the webpage is normal, and send a notification that the website is recovered to be normal to the exception handling terminal if the webpage is normal.
Further, the failure notification module M400 sends a website access failure notification to the exception handling terminal corresponding to the monitored website, including sending the website access failure notification to the exception handling terminal corresponding to the monitored website through a short message.
The embodiment of the invention also provides a website real-time monitoring device, which comprises a processor; a memory having stored therein executable instructions of the processor; wherein the processor is configured to perform the steps of the website real-time monitoring method via execution of the executable instructions.
As will be appreciated by one skilled in the art, aspects of the present invention may be embodied as a system, method or program product. Thus, various aspects of the invention may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" platform.
An electronic device 600 according to this embodiment of the invention is described below with reference to fig. 4. The electronic device 600 shown in fig. 4 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 4, the electronic device 600 is embodied in the form of a general purpose computing device. The components of the electronic device 600 may include, but are not limited to: at least one processing unit 610, at least one storage unit 620, a bus 630 that connects the various system components (including the storage unit 620 and the processing unit 610), a display unit 640, and the like.
Wherein the storage unit stores program code executable by the processing unit 610 to cause the processing unit 610 to perform steps according to various exemplary embodiments of the present invention described in the website real-time monitoring method section above in this specification. For example, the processing unit 610 may perform the steps as shown in fig. 1.
The storage unit 620 may include readable media in the form of volatile memory units, such as a random access memory unit (RAM)6201 and/or a cache memory unit 6202, and may further include a read-only memory unit (ROM) 6203.
The memory unit 620 may also include a program/utility 6204 having a set (at least one) of program modules 6205, such program modules 6205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 630 may be one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 600 may also communicate with one or more external devices 700 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 600, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 600 to communicate with one or more other computing devices. Such communication may occur via an input/output (I/O) interface 650. Also, the electronic device 600 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the Internet) via the network adapter 660. The network adapter 660 may communicate with other modules of the electronic device 600 via the bus 630. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The embodiment of the invention also provides a computer readable storage medium for storing a program, and the program realizes the steps of the website real-time monitoring method when being executed. In some possible embodiments, aspects of the present invention may also be implemented in the form of a program product including program code for causing a terminal device to perform the steps according to various exemplary embodiments of the present invention described in the website real-time monitoring method section above in this specification when the program product is executed on the terminal device.
Referring to fig. 5, a program product 800 for implementing the above method according to an embodiment of the present invention is described, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be executed on a terminal device, such as a personal computer. However, the program product of the present invention is not limited in this regard and, in the present document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable storage medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable storage medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
In summary, by using the website real-time monitoring method, system, device and storage medium of the present invention, whether the website is running normally is automatically judged by acquiring and monitoring the website state in real time, and when an access failure occurs and the number of failures reaches a certain number, the abnormality processing terminal is automatically notified to process in time, so that the 24-hour all-weather real-time monitoring and the timely alarm processing of the website can be realized, and the normal access of the website is ensured.
The foregoing is a more detailed description of the invention in connection with specific preferred embodiments and it is not intended that the invention be limited to these specific details. For those skilled in the art to which the invention pertains, several simple deductions or substitutions can be made without departing from the spirit of the invention, and all shall be considered as belonging to the protection scope of the invention.

Claims (11)

1. A website real-time monitoring method is characterized by comprising the following steps:
regularly acquiring and recording a webpage state code of a monitored website based on a preset interval time;
judging whether the currently acquired webpage state of the monitored website is abnormal according to the recorded webpage state code;
if the webpage is abnormal, adding one to the accumulated webpage abnormal times, and judging whether the accumulated webpage abnormal times is larger than or equal to a first threshold value or not;
if the accumulated abnormal times of the web pages are larger than or equal to a first threshold value, determining that the website access fails;
if the website access fails, judging whether to alarm or not according to the number of times of the website access failure;
and if the alarm is required, sending a website access failure notice to an exception handling terminal corresponding to the monitored website.
2. The real-time website monitoring method according to claim 1, wherein the step of adding one to the accumulated number of website access failures after determining the website access failures, and the step of determining whether to alarm according to the number of website access failures comprises the following steps:
judging whether the accumulated website access failure times are larger than or equal to a second threshold value or not;
and if the accumulated website access failure times are larger than or equal to a second threshold value, determining that the alarm is required currently.
3. The real-time website monitoring method according to claim 2, wherein after determining whether the currently acquired webpage state of the monitored website is abnormal, the method further comprises the following steps:
and if the webpage is normal, clearing the accumulated abnormal times of the webpage and clearing the accumulated access failure times of the website.
4. The real-time website monitoring method according to claim 2, wherein after determining whether the currently acquired webpage state of the monitored website is abnormal, the method further comprises the following steps:
if the webpage is normal, judging whether the monitored website has an operation and maintenance task or not, if so, sending a website recovery normal notification to an exception handling terminal corresponding to the monitored website.
5. The real-time website monitoring method according to claim 1, further comprising the following steps if an alarm is required:
judging whether the time difference between the time of sending the website access failure notice and the current time is greater than or equal to a third threshold value or not, and whether the current time is within a preset operation and maintenance time range or not;
and if so, sending a website access failure notification to an exception handling terminal corresponding to the monitored website.
6. The real-time website monitoring method according to claim 1, wherein Prometheus is used to periodically obtain and record the webpage status code of the monitored website via HTTP protocol.
7. The real-time website monitoring method according to claim 1, wherein the step of periodically acquiring the webpage status of the monitored website based on the preset interval time comprises the steps of:
discovering the monitored website according to the appointed website server, TCP port or website of the server;
and acquiring the webpage state from the monitored website at regular time based on the preset interval time.
8. The real-time website monitoring method according to claim 1, wherein the sending the website access failure notification to the exception handling terminal corresponding to the monitored website comprises sending the website access failure notification to the exception handling terminal corresponding to the monitored website through a short message.
9. A real-time website monitoring system for implementing the real-time website monitoring method according to any one of claims 1 to 8, the system comprising:
the state acquisition module is used for acquiring and recording the webpage state code of the monitored website at regular time based on the preset interval time;
the failure judgment module is used for judging whether the currently acquired webpage state of the monitored website is abnormal according to the recorded webpage state code; if the webpage is abnormal, adding one to the accumulated webpage abnormal times, and judging whether the accumulated webpage abnormal times is larger than or equal to a first threshold value or not; if the accumulated abnormal times of the web pages are larger than or equal to a first threshold value, determining that the website access fails;
the alarm judging module is used for judging whether an alarm is needed or not according to the number of times of website access failure if the website access failure occurs;
and the failure notification module is used for sending a website access failure notification to the abnormal processing terminal corresponding to the monitored website if an alarm is required.
10. A website real-time monitoring device, comprising:
a processor;
a memory having stored therein executable instructions of the processor;
wherein the processor is configured to perform the steps of the website real-time monitoring method of any one of claims 1 to 8 via execution of the executable instructions.
11. A computer-readable storage medium storing a program, wherein the program when executed implements the steps of the website real-time monitoring method of any one of claims 1 to 8.
CN202011262138.0A 2020-11-12 2020-11-12 Website real-time monitoring method, system, equipment and storage medium Pending CN113791943A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011262138.0A CN113791943A (en) 2020-11-12 2020-11-12 Website real-time monitoring method, system, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011262138.0A CN113791943A (en) 2020-11-12 2020-11-12 Website real-time monitoring method, system, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113791943A true CN113791943A (en) 2021-12-14

Family

ID=79181161

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011262138.0A Pending CN113791943A (en) 2020-11-12 2020-11-12 Website real-time monitoring method, system, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113791943A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114872289A (en) * 2022-04-08 2022-08-09 广东拓斯达科技股份有限公司 Integrated equipment control method, device, equipment and medium
CN114978881A (en) * 2022-06-08 2022-08-30 上海华客信息科技有限公司 Early warning method and device for webpage element acquisition abnormity and storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114872289A (en) * 2022-04-08 2022-08-09 广东拓斯达科技股份有限公司 Integrated equipment control method, device, equipment and medium
CN114872289B (en) * 2022-04-08 2023-12-05 广东拓斯达科技股份有限公司 Integrated equipment control method, device, equipment and medium
CN114978881A (en) * 2022-06-08 2022-08-30 上海华客信息科技有限公司 Early warning method and device for webpage element acquisition abnormity and storage medium

Similar Documents

Publication Publication Date Title
US7856575B2 (en) Collaborative troubleshooting computer systems using fault tree analysis
US7266733B2 (en) Method for application event integration
CN111752793A (en) System abnormity monitoring method and device, computer equipment and storage medium
US8719942B2 (en) System and method for prioritizing computers based on anti-malware events
CN110908883A (en) User portrait data monitoring method, system, equipment and storage medium
US20040205034A1 (en) Communication between intelligent agents and humans in a distributed system environment
CN112000806A (en) Abnormal log monitoring and analyzing method, system, equipment and storage medium
CN113791943A (en) Website real-time monitoring method, system, equipment and storage medium
CN109491873B (en) Cache monitoring method, medium, device and computing equipment
CN114095333A (en) Network troubleshooting method, device, equipment and readable storage medium
CN111581021B (en) Application program starting abnormality repairing method, device, equipment and storage medium
CN102271054A (en) Bookmarks and performance history for network software deployment evaluation
KR20040091392A (en) Method and system for backup management of remote using the web
CN113495820A (en) Method and device for collecting and processing abnormal information and abnormal monitoring system
CN112860504A (en) Monitoring method and device, computer storage medium and electronic equipment
US8229884B1 (en) Systems and methods for monitoring multiple heterogeneous software applications
CN113098715B (en) Information processing method, device, system, medium and computing equipment
CN112333016A (en) Failure reporting processing method, system, equipment and storage medium
CN111782431A (en) Exception processing method, exception processing device, terminal and storage medium
CN115102838B (en) Emergency processing method and device for server downtime risk and electronic equipment
CN110750431A (en) Data buried point configuration method and device
CN113342619A (en) Log monitoring method and system, electronic device and readable medium
CN112783730B (en) Interface monitoring method, device, medium and electronic equipment
CN112818204A (en) Service processing method, device, equipment and storage medium
CN111176982A (en) Test interface generation method and device

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