[go: up one dir, main page]

CN118158121A - Monitoring method, monitoring device, electronic equipment and computer readable storage medium - Google Patents

Monitoring method, monitoring device, electronic equipment and computer readable storage medium Download PDF

Info

Publication number
CN118158121A
CN118158121A CN202410440079.3A CN202410440079A CN118158121A CN 118158121 A CN118158121 A CN 118158121A CN 202410440079 A CN202410440079 A CN 202410440079A CN 118158121 A CN118158121 A CN 118158121A
Authority
CN
China
Prior art keywords
monitoring
information
webhook
software
script
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
CN202410440079.3A
Other languages
Chinese (zh)
Inventor
吴竑兴
方雷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Weiyue Information Technology Co ltd
Original Assignee
Shanghai Weiyue 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 Shanghai Weiyue Information Technology Co ltd filed Critical Shanghai Weiyue Information Technology Co ltd
Priority to CN202410440079.3A priority Critical patent/CN118158121A/en
Publication of CN118158121A publication Critical patent/CN118158121A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/14Arrangements for monitoring or testing data switching networks using software, i.e. software packages
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/04Real-time or near real-time messaging, e.g. instant messaging [IM]
    • H04L51/046Interoperability with other network applications or services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application provides a monitoring method, a device, electronic equipment and a computer readable storage medium, which are applied to a privately-arranged scene, wherein the method comprises the following steps: deploying the monitoring software in the target equipment; the monitoring software is configured to acquire monitoring information through the monitoring target equipment; creating WebHook in chat software; webHook addresses are determined according to the channel on which the monitoring information is received; creating a monitoring script in the target device; the monitoring software is configured to transmit monitoring information into the monitoring script; the execution authority of the monitoring script comprises a call WebHook; monitoring information is transmitted to the chat software via a monitoring script call WebHook. The application can reduce the consumption of hardware and network resources in monitoring and save the cost by setting the monitoring script to monitor the target software at regular time. And when the monitoring information is set to meet the preset condition, the WebHook is called to send the monitoring information to the chat software, so that the transmission of invalid monitoring information can be reduced, the occupation of the monitoring information transmission to the bandwidth is reduced, and the transmission efficiency is improved.

Description

Monitoring method, monitoring device, electronic equipment and computer readable storage medium
Technical Field
The present application relates to the field of information monitoring, and in particular, to a monitoring method, apparatus, electronic device, and computer readable storage medium.
Background
In a privately deployed scenario, the network where the system server is located is typically not directly connected to the internet. The discovery of system abnormality mainly depends on the feedback of a customer, but the feedback of the user usually cannot capture the problem and give an alarm in real time, so that a developer often needs to wait for the notification of the customer when solving the problem, thereby causing the repair lag of the problem, and the timeliness of the problem feedback and the repair is poor.
Disclosure of Invention
Accordingly, an objective of the embodiments of the present application is to provide a monitoring method, a monitoring device, an electronic device, and a computer readable storage medium, which can improve timeliness of feedback and repair of problems of a target device.
In a first aspect, an embodiment of the present application provides a monitoring method, applied to a privately-arranged scenario, where the method includes: deploying the monitoring software in the target equipment; the monitoring software is configured to acquire monitoring information by monitoring the target equipment; creating WebHook in chat software; wherein, the address of WebHook is determined according to the channel for receiving the monitoring information; creating a monitoring script in the target device; wherein the monitoring software is configured to transmit the monitoring information into the monitoring script; the execution authority of the monitoring script comprises invoking the WebHook; and calling WebHook to transmit the monitoring information to the chat software through the monitoring script.
In the implementation described above, the monitoring script is created in the target device by creating WebHook in the chat software, and the execution authority of the monitoring script includes the call WebHook. And the call of WebHook can be realized by setting the target device for creating the monitoring script and the chat software in the same privately-allocated scene. Therefore, after the monitoring software deployed in the target device acquires the monitoring information, the monitoring software can send the monitoring information to the chat software through the call WebHook, and timely feed back the state of the target device to a chat software user, so that the timeliness of the feedback and repair of the problem of the target device is improved.
In one embodiment, said transferring said monitoring information to said chat software by said monitoring script invoking said WebHook comprises: the monitoring software is controlled to monitor the target equipment at regular time through the monitoring script, and monitoring information is obtained; when the monitoring information meets a preset condition, invoking WebHook through the monitoring script, and sending the monitoring information to WebHook; and transmitting the monitoring information to the chat software by the WebHook.
In the implementation process, the target software is monitored regularly by setting the monitoring script, and continuous data flow or high-bandwidth network connection is not needed for the regular monitoring. Therefore, the consumption of hardware and network resources in monitoring can be reduced, and the cost is saved. In addition, since the monitoring information which does not satisfy the preset condition is usually normal information, no further processing is required, and even if the monitoring information is transmitted to the chat software, the monitoring information has no great use. By setting the monitoring information to send the monitoring information to the chat software by calling WebHook when the monitoring information meets the preset condition, the transmission of invalid monitoring information can be reduced, the occupation of the monitoring information transmission to the bandwidth is reduced, and the transmission efficiency is improved.
In one embodiment, when the monitoring information meets a preset condition, the step of calling WebHook through the monitoring script and sending the monitoring information to WebHook includes: when the monitoring information is abnormal information, invoking WebHook through the monitoring script, and sending the monitoring information to WebHook; or, in the case that the monitoring information triggers an alarm, invoking WebHook through the monitoring script, and sending the monitoring information to WebHook.
In the implementation process, under the condition that the monitoring information is abnormal information or the monitoring information triggers an alarm, the control information is called WebHook to be sent, so that the monitoring information is sent when the target equipment is monitored to be processed, the transmission of invalid monitoring information can be reduced, the occupation of the monitoring information transmission to the bandwidth is reduced, and the transmission efficiency is improved.
In one embodiment, the method further comprises: configuring the medium type of the monitoring script; wherein the media type of the monitoring script is configured as WebHook; and configuring user information of the monitoring software; the user information configuration of the monitoring software comprises type configuration and user address configuration; the WebHook is configured in the type configuration and the address of the WebHook is configured in the user address.
In the implementation process, the monitoring script media type is configured as WebHook of the monitoring software, and the user information is configured in the monitoring software. The call relationship between the monitoring script and WebHook can be established, and the binding relationship between the monitoring software and the user can be established. After the monitoring software obtains the monitoring information, the monitoring software may call WebHook in time and transmit the monitoring information to the chat software through WebHook. And because the information of the user is configured in the chat software, the chat software can transmit the monitoring information to the corresponding user after acquiring the monitoring information, and the accuracy of the monitoring information transmission is improved.
In one embodiment, after the creating of the monitoring script in the target device, the method further comprises: adding the user information configured by the monitoring software to an action tag of the monitoring software; the monitoring software is configured to send the monitoring information to the corresponding user according to the action tag; configuring said WebHook as a media type into said monitoring software; and configuring alarm information in the monitoring information.
In the implementation process, by adding the user information configured by the monitoring software to the action tag of the monitoring software, the monitoring software can call WebHook to transmit the monitoring information to the corresponding user when acquiring the monitoring information, the monitoring information is transmitted in a targeted manner, and the monitoring information transmission accuracy is improved. In addition, by setting the medium type of the monitoring software to WebHook, the connection between the monitoring software and the chat software can be established through WebHook, so that the timely transmission of the monitoring information is realized, and the timeliness of the problem feedback and repair of the target equipment is improved.
In one embodiment, the target device comprises: a processing server and a monitored agent, the monitoring software comprising: server and Agent; the deploying the monitoring software in the target device includes: deploying the Agent in the monitored Agent; the Agent is configured to acquire monitoring information by monitoring the corresponding monitored Agent; deploying the Server in the processing Server; the creating a monitoring script in the target device includes: creating the monitoring script in the processing server; the Server is configured to transmit the monitoring information acquired by each Agent into the monitoring script.
In the implementation process, the target equipment is divided into the monitored agent and the processing server, and different monitoring software parts are respectively arranged, so that different steps in the monitoring method are completed through different target equipment. Even when part of monitored agents fail, other monitored agents and processing servers can still normally operate, and monitoring stability and reliability are improved.
In one embodiment, after the deploying the monitoring software in the target device, the method further comprises: configuring host information of the monitored Agent and interface information of the Agent to the Server; and configuring monitoring information to be monitored of each monitored Agent into a corresponding host configuration module of the Agent.
In the implementation process, the host information of the monitored Agent and the interface information of the Agent are configured in the Server, so that the acquired monitoring information can be related to the corresponding monitored Agent after the monitoring information is acquired by the Server, and further, after the monitoring information is acquired by the user through chatting software, the user can know the monitored Agent with the abnormality in time, the time for searching the position of the abnormal information is reduced, and the timeliness of the feedback and repair of the problem of the target equipment is improved.
In a second aspect, an embodiment of the present application further provides a monitoring device, applied to a privately deployed scenario, where the device includes: the deployment module is used for deploying the monitoring software in the target equipment, and the monitoring software is configured to acquire monitoring information by monitoring the target equipment; a first creation deployment module for creating WebHook in chat software; wherein, the address of WebHook is determined according to the channel for receiving the monitoring information; a second creation deployment module for creating a monitoring script in the target device; wherein the monitoring software is configured to transmit the monitoring information into the monitoring script; the execution authority of the monitoring script comprises invoking the WebHook; and the calling module is used for calling WebHook to transmit the monitoring information to the chat software through the monitoring script.
In a third aspect, an embodiment of the present application further provides an electronic device, including: a processor, a memory storing machine-readable instructions executable by the processor, which when executed by the processor, perform the steps of the method of the first aspect, or any of the possible implementations of the first aspect.
In a fourth aspect, embodiments of the present application also provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the monitoring method of the first aspect, or any of the possible implementations of the first aspect.
In order to make the above objects, features and advantages of the present application more comprehensible, embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic diagram of interaction between a target device and a user terminal according to an embodiment of the present application;
fig. 2 is a schematic block diagram of an electronic device according to an embodiment of the present application;
FIG. 3 is a flowchart of a monitoring method according to an embodiment of the present application;
fig. 4 is a schematic diagram of a functional module of a monitoring device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings in the embodiments of the present application.
It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures. Meanwhile, in the description of the present application, the terms "first", "second", and the like are used only to distinguish the description, and are not to be construed as indicating or implying relative importance.
In a privately deployed scenario, deployment of software or services is done within a private server or data center within an organization, rather than in the environment of a public cloud service provider. This deployment gives the organization full control over ITs data, applications and the entire IT environment, ensuring the security and privacy of the data, which is especially important to the industry handling sensitive information.
Privately deployed has the advantage of being able to conduct highly customized configurations and services according to the specific needs of an organization, including autonomous management and optimization of performance, storage, networking, and other critical IT resources. In addition, it helps meet certain compliance requirements because some legal regulations require that data must be stored locally and require the ability to be strictly audited and controlled.
However, the present inventors have long studied and found that privatized deployments typically occur in an enterprise's own data center or local area network environment. Because of the limitation of the network, the device and external communication may be limited, and the technical support team needs a long time to acquire the problem feedback and respond correspondingly, so that the timeliness of the problem feedback and repair is poor.
In view of this, the present inventors propose a monitoring method, by creating WebHook in chat software, a monitoring script is created in the target device, and the execution authority of the monitoring script includes call WebHook. And the call of WebHook can be realized by setting the target device for creating the monitoring script and the chat software in the same privately-allocated scene. Therefore, after the monitoring software deployed in the target device acquires the monitoring information, the monitoring software can send the monitoring information to the chat software through the call WebHook, and timely feed back the state of the target device to a chat software user, so that the timeliness of the feedback and repair of the problem of the target device is improved.
For the sake of understanding the present embodiment, first, an operation environment for executing a monitoring method disclosed in the embodiment of the present application will be described in detail.
Fig. 1 is a schematic diagram of interaction between a target device and a user terminal according to an embodiment of the present application. The monitoring script in the target device is communicatively coupled to one or more user terminals via call WebHook for data communication or interaction.
The target device may be a network server, a database server, a monitoring agent, etc. The user terminal may be a personal computer (personal computer, PC), tablet computer, smart phone, personal Digital Assistant (PDA), or the like.
In one embodiment, a target device may include: the processing server and the monitored agent.
The monitored agent and the processing server may be connected by a wired or wireless connection. The monitored agent is target equipment to be monitored, and the processing server processes the monitoring information of one or more monitored agents acquired by the monitoring software.
It should be understood that after the monitoring software obtains the monitoring information of the monitored agent, the monitoring information is sent to the processing server, and the processing server processes the received monitoring information and sends the processed monitoring information to the chat software through WebHook.
Chat software is installed on the user terminal. The user terminal can be a terminal device used by a developer, a terminal device used by a manager, or other terminal devices bound by a client using the target device. The user terminal can be selected according to actual conditions.
In one embodiment, webHook is created in the chat software. Wherein WebHook are used to transfer information from one application to another in real time.
Here, the target device also has a monitoring script created thereon.
Wherein the monitoring software is configured to transmit monitoring information into the monitoring script; the execution authority of the monitoring script includes call WebHook.
It should be understood that, when executing the monitoring method disclosed in the embodiment of the present application, the interaction process between the target device and the user terminal may be as follows:
The monitoring software on the target device monitors the target device in real time or at regular time, and when the monitoring software acquires the monitoring information, the monitoring script calls WebHook. And sending the monitoring information to WebHook, webHook transmitting the obtained monitoring information to the chat software of the user terminal, and transmitting the monitoring information to the user through the chat software.
In order to facilitate understanding of the present embodiment, an electronic device that executes the monitoring method disclosed in the embodiment of the present application is described in detail below.
As shown in fig. 2, a block schematic diagram of the electronic device is shown. The electronic device 100 may include a memory 111, a processor 113. It will be appreciated by those of ordinary skill in the art that the configuration shown in fig. 2 is merely illustrative and is not limiting of the configuration of the electronic device 100. For example, electronic device 100 may also include more or fewer components than shown in FIG. 2, or have a different configuration than shown in FIG. 2.
The memory 111 and the processor 113 are directly or indirectly electrically connected to each other to realize data transmission or interaction. For example, the components may be electrically connected to each other via one or more communication buses or signal lines. The processor 113 is used to execute executable modules stored in the memory.
The Memory 111 may be, but is not limited to, a random access Memory (Random Access Memory, RAM), a Read Only Memory (ROM), a programmable Read Only Memory (Programmable Read-Only Memory, PROM), an erasable Read Only Memory (Erasable Programmable Read-Only Memory, EPROM), an electrically erasable Read Only Memory (Electric Erasable Programmable Read-Only Memory, EEPROM), etc. The memory 111 is configured to store a program, and the processor 113 executes the program after receiving an execution instruction, and a method executed by the electronic device 100 defined by the process disclosed in any embodiment of the present application may be applied to the processor 113 or implemented by the processor 113.
The processor 113 may be an integrated circuit chip having signal processing capabilities. The processor 113 may be a general-purpose processor, including a central processing unit (Central Processing Unit, abbreviated as CPU), a network processor (Network Processor, abbreviated as NP), and the like; but may also be a digital signal processor (DIGITAL SIGNAL processor, DSP for short), application SPECIFIC INTEGRATED Circuit (ASIC for short), field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. The disclosed methods, steps, and logic blocks 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.
It should be understood that the above electronic device is a device independent from the target device and the user terminal, and the electronic device establishes a connection with the target device and the user terminal, respectively, and performs corresponding actions on the target device and the user terminal. The electronic device may be a system server, a master device, etc. The electronic device can be selected according to actual conditions.
The electronic device 100 in this embodiment may be used to perform each step in each method provided in the embodiment of the present application. The implementation of the monitoring method is described in detail below by means of several embodiments.
Fig. 3 is a flowchart of a monitoring method according to an embodiment of the application. The specific flow shown in fig. 3 will be described in detail.
In step 201, monitoring software is deployed in a target device.
The monitoring software is configured to acquire monitoring information through the monitoring target device. The monitoring software may be Zabbix, auvik, PRTG Network Monitor, etc. The monitoring software can be selected according to actual conditions.
The target device is a device to be monitored and/or a monitoring information processing device. For example, the target device may be a respective client device, a system server, a proxy server, or the like.
Alternatively, the target device may be one or more. When the target device is plural, the target device may include a device to be monitored and a monitoring information processing device; when the target device is plural, the target device may include only the device to be monitored; when the target device is one, the target device can be a combined device of the device to be monitored and the monitoring information processing device; when the target device is one, the target device may also be just the device to be monitored. The setting of the target device may be selected according to the actual situation.
In one embodiment, a target device includes: the processing server and the monitored agent.
The monitored agent and the processing server may be connected by a wired or wireless connection. The monitored agent is target equipment to be monitored, and the processing server processes the monitoring information of one or more monitored agents acquired by the monitoring software.
It should be understood that after the monitoring software obtains the monitoring information of the monitored agent, the monitoring information is sent to the processing server, and the processing server processes the received monitoring information and sends the processed monitoring information to the chat software through WebHook.
The monitored agent and the processing server may be the same device or different devices. The monitored agent and the processing server may be adapted according to the actual situation.
Correspondingly, the monitoring software comprises: server and Agent.
Wherein the Server may be used to monitor and collect data from the network status of the remote monitored agent. Agents may be used to monitor the status, parameters, etc. of the monitored Agent.
The monitoring software can monitor the target equipment at regular time, can monitor the target equipment in real time, and can monitor the target equipment under specific triggering conditions. The mode of the monitoring software for monitoring the target equipment can be selected according to actual conditions.
Step 202, creating WebHook in chat software.
Wherein WebHook is an http-based callback level for passing information from one application to another in real time. The WebHook allows one application to automatically notify another application when a particular event occurs, such as a data update or user action.
In one embodiment, the address WebHook is determined based on the channel on which the monitoring information is received.
The chat software is here installed at the user terminal. The user terminal can be a terminal device used by a developer, a terminal device used by a manager, or other terminal devices bound by a client using the target device. The user terminal can be selected according to actual conditions.
The chat software is privately deployed instant chat software. For example, the chat software can be rock, chat, enterprise book transfer, uni-nvue-chat, etc., and the chat software can be selected according to practical situations.
It should be appreciated that the chat software may have created thereon a target device management group that may include one or more users of the management target device. The address of WebHook is bound to the target device management group to send the monitoring information to the target device management group via WebHook. And the user in the target equipment management group timely acquires the state of the target equipment according to the monitoring information in the target equipment management group.
In one embodiment, step 202 may be implemented by:
controlling a rock.chat display system management page; acquiring operation of 'integration' options in a system management page; the creation of WebHook is accomplished by entering WebHook under the "new integration" directory and copying the channel to which the message is to be sent to the address of WebHook to bind the WebHook address to the message-receiving address.
Step 203, a monitoring script is created in the target device.
Wherein the monitoring software is configured to transmit monitoring information into the monitoring script; the execution authority of the monitoring script includes call WebHook.
The mode of monitoring the target device by the monitoring software can be set in the monitoring script. For example, timing monitoring, real-time monitoring, or monitoring under specific trigger conditions. The monitoring software is provided with interfaces for connecting the monitoring script, such as a command line interface, an application programming interface and the like. The monitoring script is connected with the monitoring software through a corresponding interface.
In one embodiment, a monitoring script is created in some or all of the target devices, where the target devices of the monitoring script are devices in the privately deployed scenario.
Step 204, transmitting monitoring information to the chat software through the monitoring script call WebHook.
It should be appreciated that since WebHook is provided within the chat software, and the monitoring script has added to it the authority to invoke WebHook. After the monitoring software obtains the monitoring information, the monitoring script may call WebHook and send the monitoring information to WebHook, and WebHook then passes the monitoring information to the corresponding address to display the monitoring information through the chat software.
In the implementation described above, the monitoring script is created in the target device by creating WebHook in the chat software, and the execution authority of the monitoring script includes the call WebHook. And the call of WebHook can be realized by setting the target device for creating the monitoring script and the chat software in the same privately-allocated scene. Therefore, after the monitoring software deployed in the target device acquires the monitoring information, the monitoring software can send the monitoring information to the chat software through the call WebHook, and timely feed back the state of the target device to a chat software user, so that the timeliness of the feedback and repair of the problem of the target device is improved.
In one possible implementation, step 204 includes: the monitoring software is controlled to monitor the target equipment at regular time through the monitoring script, and monitoring information is obtained; when the monitoring information meets the preset condition, invoking WebHook through a monitoring script, and sending the monitoring information to WebHook; from WebHook, the monitoring information is transmitted to the chat software.
It should be appreciated that when the monitoring script is created, the monitoring on time may be configured in the monitoring script such that when the monitoring on time is reached, the monitoring script triggers the monitoring software to begin monitoring the relevant metrics and status of the target device. The monitoring on time can be 8 hours a day, 15 hours a week, an hour, etc. The monitoring on time can be selected according to actual conditions.
The preset condition may be that the monitoring information is abnormal information, the monitoring information reaches a set number, or the like. The preset condition may be set according to actual conditions.
It can be understood that when the monitoring software monitors the target software, if the monitored monitoring information is normal information, there is no need for problem repair or the like due to the normal information. Thus, no transmission to the chat software is possible, and invalid transmission of the monitoring information is reduced. If the monitoring information is less, the monitoring information can be temporarily stored first, and then unified transmission is performed after the number of the temporarily stored monitoring information reaches the preset number, so that the call frequency of WebHook can be reduced.
In the implementation process, the target software is monitored regularly by setting the monitoring script, and continuous data flow or high-bandwidth network connection is not needed for the regular monitoring. Therefore, the consumption of hardware and network resources in monitoring can be reduced, and the cost is saved. In addition, since the monitoring information which does not satisfy the preset condition is usually normal information, no further processing is required, and even if the monitoring information is transmitted to the chat software, the monitoring information has no great use. By setting the monitoring information to send the monitoring information to the chat software by calling WebHook when the monitoring information meets the preset condition, the transmission of invalid monitoring information can be reduced, the occupation of the monitoring information transmission to the bandwidth is reduced, and the transmission efficiency is improved.
In one possible implementation, when the monitoring information meets the preset condition, invoking WebHook through the monitoring script and sending the monitoring information to WebHook, including: when the monitoring information is abnormal information, invoking WebHook through a monitoring script, and sending the monitoring information to WebHook; or, in case of triggering an alarm by the monitoring information, call WebHook through the monitoring script and send the monitoring information to WebHook.
The anomaly information here may include: target equipment failure, target equipment parameter abnormality, environment abnormality where target equipment is located, disconnection of target equipment and the like. The anomaly information can be adjusted according to the actual situation.
It should be appreciated that some of the anomaly information may not need to be processed during the monitoring of the target device or may be suspended from processing. And the other abnormal information can be related to the operation of the target equipment, and needs to be processed in time, and the abnormal information which needs to be processed in time is set to trigger an alarm.
The alarm may include a voice alarm, a text alarm, or an indicator light alarm. The form of the alarm can be selected according to the actual situation.
In one embodiment, the alert module may be configured in chat software. When the monitoring information triggers an alarm, the monitoring information and the alarm triggering information may be simultaneously transmitted to WebHook. After receiving the monitoring information and the alarm triggering information, the chat software displays the monitoring information and gives an alarm under the triggering of the alarm triggering information so as to remind a user to timely check the monitoring information.
In the implementation process, under the condition that the monitoring information is abnormal information or the monitoring information triggers an alarm, the control information is called WebHook to be sent, so that the monitoring information is sent when the target equipment is monitored to be processed, the transmission of invalid monitoring information can be reduced, the occupation of the monitoring information transmission to the bandwidth is reduced, and the transmission efficiency is improved.
In one possible implementation, the method further includes: configuring the medium type of the monitoring script; and configuring user information of the monitoring software.
Wherein the media type of the monitoring script is configured to WebHook.
The media type of the monitoring script refers to the running environment of the script.
In one embodiment, the media type of the monitoring software may be configured by:
The step of "send information to user" is added to the "active" tag of the monitoring software, and "chat software WebHook" is selected as the medium type among the created users to take "WebHook" as the transmission object of the step of "send information to user".
In another embodiment, alarm information may be added to the monitoring script, where the alarm information may be added in the following manner:
And configuring corresponding alarm information in the preset information of the monitoring script. When the monitoring information triggers an alarm, the monitoring software sends the monitoring information to the designated position of the chat software through WebHook.
The user information configuration of the monitoring software comprises type configuration and user address configuration; webHook is configured in a type configuration, and the address of WebHook is configured in the user address.
Illustratively, the user information configuration of the monitoring software may be implemented by:
The user is created under the user settings of the monitoring software and the type is configured in the user's "media" tab as "chat software WebHook" is selected and the "address of chat software WebHook" is configured in the "send to" tab. Wherein WebHook is the address of the channel to which the message is to be sent.
In the implementation process, the monitoring script media type is configured as WebHook of the monitoring software, and the user information is configured in the monitoring software. The call relationship between the monitoring script and WebHook can be established, and the binding relationship between the monitoring software and the user can be established. After the monitoring software obtains the monitoring information, the monitoring software may call WebHook in time and transmit the monitoring information to the chat software through WebHook. And because the information of the user is configured in the chat software, the chat software can transmit the monitoring information to the corresponding user after acquiring the monitoring information, and the accuracy of the monitoring information transmission is improved.
In one possible implementation, after step 203, the method further includes: adding the user information configured by the monitoring software to an action tag of the monitoring software; webHook is configured into the monitoring software as a medium type; alarm information is configured in the monitoring information.
The monitoring software is configured to send monitoring information to the corresponding user according to the action tag.
Illustratively, adding user information of the monitoring software configuration to an action tag of the monitoring software may be configured by:
A user is created under the user settings of the monitoring software and is configured with a type of "WebHook" in the user's "media" tag and an address of "WebHook" in the "send to" tag. Wherein WebHook is the address of the channel to which the message is to be sent. Then, the configured user information is added to the action tag.
Illustratively, configuring WebHook as a mediator type into the monitoring software may be configured by:
the method comprises the steps of configuring a 'rock.chat WebHook' in a 'media type name' tag of monitoring software, configuring a 'script' in a 'type' tag, configuring a 'script type' tag as a 'rock.chat.sh' tag, and configuring a 'script range' tag as a '{ alert.sendto } { alert.subject } { alert.message }' tag, thereby completing the configuration of the media type of the monitoring software.
In the implementation process, by adding the user information configured by the monitoring software to the action tag of the monitoring software, the monitoring software can call WebHook to transmit the monitoring information to the corresponding user when acquiring the monitoring information, the monitoring information is transmitted in a targeted manner, and the monitoring information transmission accuracy is improved. In addition, by setting the medium type of the monitoring software to WebHook, the connection between the monitoring software and the chat software can be established through WebHook, so that the timely transmission of the monitoring information is realized, and the timeliness of the problem feedback and repair of the target equipment is improved.
In one possible implementation, step 201 includes: deploying the Agent in the monitored Agent; the Server is deployed in a processing Server.
The Agent is configured to acquire monitoring information through monitoring the corresponding monitored Agent, and the Server is configured to transmit the monitoring information acquired by each Agent into the monitoring script.
In one embodiment, step 201 includes: a monitoring script is created in the processing server.
It should be appreciated that the Agent is configured to obtain monitoring information of the monitored Agent and transmit the monitoring information to the Server. The Server centrally manages the received monitoring information and processes the monitoring information correspondingly. When the monitoring information needs to be transmitted to the chat software, webHook is called through a script created in the Server, and the processed monitoring information is sent to the chat software through WebHook.
In the implementation process, the target equipment is divided into the monitored agent and the processing server, and different monitoring software parts are respectively arranged, so that different steps in the monitoring method are completed through different target equipment. Even when part of monitored agents fail, other monitored agents and processing servers can still normally operate, and monitoring stability and reliability are improved.
In one possible implementation, after step 201, the method further includes: configuring host information of the monitored Agent and interface information of the Agent to a Server; and configuring monitoring information to be monitored of each monitored Agent into a host configuration module of the corresponding Agent.
The host information here may represent information of a unique monitored agent. The host information may be one or more of a host name, a host address, a host port, etc., and the host information may be selected according to actual situations.
The interface information of the Agent is an interface of the Agent for connecting with the processing server. By configuring the interface information of the Agent into the Server, the Server can be connected with the corresponding Agent interface through the configured interface information.
Illustratively, configuring host information of the monitored Agent and interface information of the Agent to the Server may be implemented by:
The actual name of the host is configured in a 'host name' label configured by the host of the Server, and the IP address of the host and a port for connecting with the Server by the Agent are configured in an 'Agent interface' label. Basic information of an operating system for monitoring and an HTTP service for monitoring are configured in a template tag.
The monitoring information that the monitored agent needs to monitor may include survival information of the monitored agent, memory monitoring information, application state information, etc. The monitoring information to be monitored by the monitored agent can be selected according to the actual situation.
For easy understanding, the following are examples of configurations of the monitored agent survival information, the memory monitoring information, and the application state information, respectively:
1. The configuration example of the monitored agent survival information is as follows:
The configuration is performed in the "project" of the Agent's host configuration. Wherein, the "name" tag may be configured as "ICMP Ping", "type" tag is configured as "check", "key" tag is configured as "ICMP Ping", "information type" tag is configured as "number (unsigned)", "data type" tag is configured as "decimal", "unit" tag is configured as "ms", and so on.
2. The configuration examples of the memory monitor information are as follows:
The configuration is performed in the "project" of the Agent's host configuration. Wherein, the "name" tag may be configured as "available memory", the "type" tag as "Zabbix agent", the "key" tag as "vm.memory.size [ free ]", the "information type" tag as "number (unsigned)", the "data type" tag as "decimal", the "unit" tag as "MB", and the like.
3. The configuration example of the application state information is as follows:
The configuration is performed in the "project" of the Agent's host configuration. The "name" tag may be configured as "HTTP SERVICE", the "type" tag as "HTTP AGENT", the "key" tag as "web test.rspcode", the "HTTP test" tag as "letter", the "data type" tag as "text", the "required" tag as "GET/HTTP/1.1_nfest: you_server_nconnection: close", the "HTTP status code" tag as "200", etc.
In the implementation process, the host information of the monitored Agent and the interface information of the Agent are configured in the Server, so that the acquired monitoring information can be related to the corresponding monitored Agent after the monitoring information is acquired by the Server, and further, after the monitoring information is acquired by the user through chatting software, the user can know the monitored Agent with the abnormality in time, the time for searching the position of the abnormal information is reduced, and the timeliness of the feedback and repair of the problem of the target equipment is improved.
Based on the same application conception, the embodiment of the application also provides a monitoring device corresponding to the monitoring method, and because the principle of solving the problem of the device in the embodiment of the application is similar to that of the embodiment of the monitoring method, the implementation of the device in the embodiment of the application can be referred to the description in the embodiment of the method, and the repetition is omitted.
Fig. 4 is a schematic functional block diagram of a monitoring device according to an embodiment of the application. Each module in the monitoring device in this embodiment is configured to perform each step in the above-described method embodiment. The monitoring device comprises a deployment module 301, a first creation module 302, a second creation module 303 and a calling module 304; wherein,
The deployment module 301 is configured to deploy monitoring software in a target device, where the monitoring software is configured to obtain monitoring information by monitoring the target device.
The first creating module 302 is configured to create WebHook in chat software; wherein the address WebHook is determined according to the channel on which the monitoring information is received.
The second creating module 303 is configured to create a monitoring script in the target device; wherein the monitoring software is configured to transmit the monitoring information into the monitoring script; the execution authority of the monitoring script comprises invoking the WebHook.
The calling module 304 is configured to call WebHook the monitoring script to transmit the monitoring information to the chat software.
In a possible implementation manner, the calling module 304 is specifically configured to: the monitoring software is controlled to monitor the target equipment at regular time through the monitoring script, and monitoring information is obtained; when the monitoring information meets a preset condition, invoking WebHook through the monitoring script, and sending the monitoring information to WebHook; and transmitting the monitoring information to the chat software by the WebHook.
In a possible implementation manner, the calling module 304 is specifically configured to: when the monitoring information is abnormal information, invoking WebHook through the monitoring script, and sending the monitoring information to WebHook; or, in the case that the monitoring information triggers an alarm, invoking WebHook through the monitoring script, and sending the monitoring information to WebHook.
In a possible implementation manner, the monitoring device further comprises a configuration module, configured to configure a media type of the monitoring script; wherein the media type of the monitoring script is configured as WebHook; and configuring user information of the monitoring software; the user information configuration of the monitoring software comprises type configuration and user address configuration; the WebHook is configured in the type configuration and the address of the WebHook is configured in the user address.
In a possible implementation manner, the configuration module is further configured to: adding the user information configured by the monitoring software to an action tag of the monitoring software; the monitoring software is configured to send the monitoring information to the corresponding user according to the action tag; configuring said WebHook as a media type into said monitoring software; and configuring alarm information in the monitoring information.
In a possible implementation manner, the deployment module 301 is specifically configured to: deploying the Agent in the monitored Agent; the Agent is configured to acquire monitoring information by monitoring the corresponding monitored Agent; and deploying the Server in the processing Server.
In a possible implementation manner, the second creation module 303 is specifically configured to: creating the monitoring script in the processing server; the Server is configured to transmit the monitoring information acquired by each Agent into the monitoring script.
In a possible implementation manner, the configuration module is further configured to: configuring host information of the monitored Agent and interface information of the Agent to the Server; and configuring monitoring information to be monitored of each monitored Agent into a corresponding host configuration module of the Agent.
Furthermore, the embodiment of the present application also provides a computer readable storage medium, on which a computer program is stored, which when being executed by a processor, performs the steps of the monitoring method described in the above-mentioned method embodiment.
The computer program product of the monitoring method provided by the embodiment of the present application includes a computer readable storage medium storing a program code, where the program code includes instructions for executing the steps of the monitoring method described in the above method embodiment, and specifically, reference may be made to the above method embodiment, which is not described herein.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. The apparatus embodiments described above are merely illustrative, for example, of the flowcharts and block diagrams in the figures that illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional modules in the embodiments of the present application may be integrated together to form a single part, or each module may exist alone, or two or more modules may be integrated to form a single part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a target device, or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a usb disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes. It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above description is only of the preferred embodiments of the present application and is not intended to limit the present application, but various modifications and variations can be made to the present application by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the protection scope of the present application. It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures.
The foregoing is merely illustrative of the present application, and the present application is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present application. Therefore, the protection scope of the application is subject to the protection scope of the claims.

Claims (10)

1. A method of monitoring, applied to a privately deployed scenario, the method comprising:
deploying the monitoring software in the target equipment; the monitoring software is configured to acquire monitoring information by monitoring the target equipment;
Creating WebHook in chat software; wherein, the address of WebHook is determined according to the channel for receiving the monitoring information;
Creating a monitoring script in the target device; wherein the monitoring software is configured to transmit the monitoring information into the monitoring script; the execution authority of the monitoring script comprises invoking the WebHook;
and calling WebHook to transmit the monitoring information to the chat software through the monitoring script.
2. The method of claim 1, wherein said transferring said monitoring information to said chat software via said monitoring script invoking said WebHook comprises:
The monitoring software is controlled to monitor the target equipment at regular time through the monitoring script, and monitoring information is obtained;
When the monitoring information meets a preset condition, invoking WebHook through the monitoring script, and sending the monitoring information to WebHook;
and transmitting the monitoring information to the chat software by the WebHook.
3. The method according to claim 2, wherein said invoking said WebHook via said monitoring script and sending said monitoring information to said WebHook when said monitoring information meets a preset condition comprises:
When the monitoring information is abnormal information, invoking WebHook through the monitoring script, and sending the monitoring information to WebHook; or alternatively, the first and second heat exchangers may be,
And in the case that the monitoring information triggers an alarm, invoking WebHook through the monitoring script and sending the monitoring information to WebHook.
4. A method according to any one of claims 1-3, characterized in that the method further comprises:
Configuring the medium type of the monitoring script; wherein the media type of the monitoring script is configured as WebHook; and
Configuring user information of the monitoring software; the user information configuration of the monitoring software comprises type configuration and user address configuration; the WebHook is configured in the type configuration and the address of the WebHook is configured in the user address.
5. The method of claim 4, wherein after creating a monitoring script in the target device, the method further comprises:
Adding the user information configured by the monitoring software to an action tag of the monitoring software; the monitoring software is configured to send the monitoring information to the corresponding user according to the action tag;
Configuring said WebHook as a media type into said monitoring software;
And configuring alarm information in the monitoring information.
6. A method according to any of claims 1-3, wherein the target device comprises: a processing server and a monitored agent, the monitoring software comprising: server and Agent; the deploying the monitoring software in the target device includes:
Deploying the Agent in the monitored Agent; the Agent is configured to acquire monitoring information by monitoring the corresponding monitored Agent;
Deploying the Server in the processing Server;
The creating a monitoring script in the target device includes:
Creating the monitoring script in the processing server; the Server is configured to transmit the monitoring information acquired by each Agent into the monitoring script.
7. The method of claim 6, wherein after the deploying the monitoring software in the target device, the method further comprises:
Configuring host information of the monitored Agent and interface information of the Agent to the Server;
and configuring monitoring information to be monitored of each monitored Agent into a corresponding host configuration module of the Agent.
8. A monitoring device for use in a privately deployed scenario, the device comprising:
the deployment module is used for deploying the monitoring software in the target equipment, and the monitoring software is configured to acquire monitoring information by monitoring the target equipment;
A first creation deployment module for creating WebHook in chat software; wherein, the address of WebHook is determined according to the channel for receiving the monitoring information;
A second creation deployment module for creating a monitoring script in the target device; wherein the monitoring software is configured to transmit the monitoring information into the monitoring script; the execution authority of the monitoring script comprises invoking the WebHook;
and the calling module is used for calling WebHook to transmit the monitoring information to the chat software through the monitoring script.
9. An electronic device, comprising: a processor, a memory storing machine-readable instructions executable by the processor, which when executed by the processor perform the steps of the method of any of claims 1 to 7 when the electronic device is run.
10. A computer-readable storage medium, characterized in that it has stored thereon a computer program which, when executed by a processor, performs the steps of the method according to any of claims 1 to 7.
CN202410440079.3A 2024-04-12 2024-04-12 Monitoring method, monitoring device, electronic equipment and computer readable storage medium Pending CN118158121A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410440079.3A CN118158121A (en) 2024-04-12 2024-04-12 Monitoring method, monitoring device, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410440079.3A CN118158121A (en) 2024-04-12 2024-04-12 Monitoring method, monitoring device, electronic equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN118158121A true CN118158121A (en) 2024-06-07

Family

ID=91285030

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410440079.3A Pending CN118158121A (en) 2024-04-12 2024-04-12 Monitoring method, monitoring device, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN118158121A (en)

Similar Documents

Publication Publication Date Title
CN108270855B (en) Method for accessing Internet of things platform to equipment
CN106844137B (en) Server monitoring method and device
TWI480840B (en) Device for controlling security, monitoring and automation (sma), and method performed by an sma controller
US6718376B1 (en) Managing recovery of service components and notification of service errors and failures
EP2705429B1 (en) Remote cable access point reset
CN109450693B (en) Hybrid cloud monitoring system and monitoring method using same
US7370102B1 (en) Managing recovery of service components and notification of service errors and failures
CN106993043B (en) Data communication system and method based on agency
US11153405B2 (en) Transparent pattern processing in a service mesh
CN113794652B (en) Data processing method, device, electronic equipment and storage medium
JP2018092565A (en) Cloud relay device, cloud connection processing method, and program
CN113709247A (en) Resource acquisition method, device, system, electronic equipment and storage medium
US9942116B2 (en) Interconnecting electronic devices for reporting device status
US20150215414A1 (en) Out of band electronic signaling
EP3214824A1 (en) Smart home system
CN114679472A (en) Communication system, method, apparatus, storage medium, and electronic device
CN113434281A (en) Equipment scheduling method and cloud platform
CN118158121A (en) Monitoring method, monitoring device, electronic equipment and computer readable storage medium
CN116882959A (en) Computer room maintenance methods and computer room maintenance systems
CN113824595B (en) Link switching control method and device and gateway equipment
CN114185717A (en) Microservice exception handling method, microservice exception handling apparatus, microservice exception handling device, microservice exception handling medium, and program product
CN116760741B (en) Data state monitoring method, device, equipment and medium
EP2001157B1 (en) Method for data communication and device as well as communication system
WO2025094197A1 (en) System and method for performing operations by event routing manager
CN120295864A (en) Abnormal monitoring method and system for cloud platform

Legal Events

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