CN116185774A - Log monitoring installation method, device, computer equipment and storage medium - Google Patents

Log monitoring installation method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN116185774A
CN116185774A CN202310144461.5A CN202310144461A CN116185774A CN 116185774 A CN116185774 A CN 116185774A CN 202310144461 A CN202310144461 A CN 202310144461A CN 116185774 A CN116185774 A CN 116185774A
Authority
CN
China
Prior art keywords
server
log monitoring
script
log
candidate
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
CN202310144461.5A
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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202310144461.5A priority Critical patent/CN116185774A/en
Publication of CN116185774A publication Critical patent/CN116185774A/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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Quality & Reliability (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application relates to a log monitoring and installing method, a log monitoring and installing device, computer equipment and a storage medium, relates to the technical field of computers, and can be used in the technical field of finance and technology or other related fields. The method comprises the following steps: running a log monitoring checking script in the candidate server; selecting a target server needing to be monitored by the installation log from the candidate servers according to the operation result; and running a log monitoring installation script in the target server to install the log monitoring in the target server. Compared with the scheme of manually installing log monitoring to a server in the related art, the scheme realizes automatic installation of log monitoring by introducing the log monitoring checking script and the log monitoring installation script, reduces labor cost and improves log monitoring installation efficiency; furthermore, based on the log monitoring checking script and the log monitoring installation script, the log monitoring can be installed to a plurality of servers at the same time, namely, the effect of batch log monitoring is achieved.

Description

Log monitoring installation method, device, computer equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a log monitoring installation method, device, computer device, and storage medium.
Background
In recent years, data center server sizes have shown explosive growth, with the fastest growing numbers focusing primarily on inexpensive X86 open platform systems. The quantity of various linux databases, middleware and the like synchronously shows explosive growth. The log information of the database and the middleware is extremely important, and a plurality of errors are only stored in the log, so that a log monitoring module is introduced to strengthen the monitoring and alarming of the error information in the database and the middleware log.
However, currently log monitoring is typically installed to a server manually. Specifically, a person judges whether the server needs to be monitored by installing the log, and under the condition that the log is determined to be monitored by installing the log to the server, the log is manually installed to the server. Not only does this approach result in high labor costs, but also the installation efficiency is low, and improvements are needed.
Disclosure of Invention
Based on the above, it is necessary to provide a log monitoring installation method, device, computer equipment and storage medium, which can realize automatic log monitoring installation, so as to reduce labor cost and improve installation efficiency.
In a first aspect, the present application provides a log monitoring installation method. The method comprises the following steps:
running a log monitoring checking script in the candidate server;
selecting a target server needing to be monitored by the installation log from the candidate servers according to the operation result;
and running a log monitoring installation script in the target server to install the log monitoring in the target server.
In one embodiment, running a log monitoring check script within a candidate server includes:
determining candidate servers according to the server list;
transmitting a log monitoring checking script to a candidate server;
and if the current time is detected to meet the preset inspection period, running a log monitoring and checking script in the candidate server.
In one embodiment, determining a candidate server from the server manifest includes:
and selecting a candidate server from the servers in the server list according to at least one of the inspection times, the running environment change condition and the log monitoring installation condition of the servers in the server list.
In one embodiment, before the log monitoring check script is issued to the candidate server, the method further comprises:
At least one of an encoding format, an output format, and suitability of the log monitoring inspection script is detected.
In one embodiment, selecting a target server requiring installation log monitoring from candidate servers according to the operation result includes:
and for each candidate server, if the database and/or middleware exist in the candidate server according to the running result of the running log monitoring checking script in the candidate server, determining that the candidate server needs to be provided with log monitoring, and taking the candidate server as a target server.
In one embodiment, running a log monitor installation script within a target server to install log monitors within the target server includes:
if the current time is detected to meet the preset installation period, a log monitoring installation script is issued to the target server;
and running a log monitoring installation script in the target server to install the log monitoring in the target server.
In a second aspect, the present application further provides a log monitoring installation apparatus. The device comprises:
the script running module is used for running log monitoring and checking scripts in the candidate server;
The selection module is used for selecting a target server needing to be monitored by the installation log from the candidate servers according to the operation result;
and the installation module is used for running a log monitoring installation script in the target server so as to install log monitoring in the target server.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor which when executing the computer program performs the steps of:
running a log monitoring checking script in the candidate server;
selecting a target server needing to be monitored by the installation log from the candidate servers according to the operation result;
and running a log monitoring installation script in the target server to install the log monitoring in the target server.
In a fourth aspect, the present application also provides a computer-readable storage medium. The computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
running a log monitoring checking script in the candidate server;
selecting a target server needing to be monitored by the installation log from the candidate servers according to the operation result;
And running a log monitoring installation script in the target server to install the log monitoring in the target server.
In a fifth aspect, the present application also provides a computer program product. The computer program product comprises a computer program which, when executed by a processor, implements the steps of:
running a log monitoring checking script in the candidate server;
selecting a target server needing to be monitored by the installation log from the candidate servers according to the operation result;
and running a log monitoring installation script in the target server to install the log monitoring in the target server.
According to the log monitoring installation method, the log monitoring installation device, the computer equipment and the storage medium, the log monitoring inspection script is run in the candidate server, and according to the running result, the target server needing to install log monitoring is selected from the candidate server, and then the log monitoring installation script is run in the target server, so that the log monitoring is automatically installed in the target server. Compared with the scheme that log monitoring is manually installed on a server in the related art, the method has the advantages that the log monitoring checking script and the log monitoring installation script are introduced, the server needing log monitoring is determined based on the log monitoring checking script, the server needing log monitoring is automatically installed based on the log monitoring installation script, automatic installation of log monitoring is achieved, labor cost is reduced, and log monitoring installation efficiency is improved; furthermore, based on the log monitoring checking script and the log monitoring installation script, the log monitoring can be installed to a plurality of servers at the same time, namely, the effect of batch log monitoring is achieved.
Drawings
FIG. 1 is an application environment diagram of a log monitoring installation method in one embodiment;
FIG. 2 is a flow chart of a log monitor installation method according to one embodiment;
FIG. 3 is a flow diagram of a log monitoring and inspection script in one embodiment;
FIG. 4 is a flowchart of a log monitor installation method according to another embodiment;
FIG. 5 is a block diagram of a log monitor mounting device in one embodiment;
FIG. 6 is a block diagram of a log monitor mounting apparatus according to another embodiment;
fig. 7 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
The log monitoring and installing method provided by the embodiment of the application can be applied to the situation of installing log monitoring to a server. The embodiment is exemplified by the method applied to the central server. It will be appreciated that the method may also be applied to a terminal or may also be applied to a system comprising a terminal and a central server and implemented by interaction of the terminal and the central server. For example, in the case where the method is applied to a system including a terminal and a center server and is implemented through interaction of the terminal and the center server, it may be applied to an application environment as shown in fig. 1. Wherein the terminal 102 communicates with the central server 104 via a network. The data storage system may store data that the central server 104 needs to process. The data storage system may be integrated on the server 104 or may be located on a cloud or other network server. Optionally, a visual interface may be integrated in the terminal 102, where the service demander may fill in information of the candidate server, for example, information of an IP address of the candidate server; further, the terminal 102 may send an instruction for detecting whether the candidate server needs to install log monitoring to the central server 104, after the central server 104 receives the instruction, the instruction for running log monitoring checking script may be sent to the candidate server, and after the candidate server receives the instruction sent by the central server 104, the log monitoring checking script may be run in the running platform of the candidate server; if the running result is that the candidate server needs to install log monitoring, a log monitoring installation script can be run in the candidate server so as to install log monitoring in the candidate server. The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, internet of things devices, and portable wearable devices, where the internet of things devices may be smart speakers, smart televisions, smart air conditioners, smart vehicle devices, and the like. The portable wearable device may be a smart watch, smart bracelet, headset, or the like. The central server 104 may be implemented as a stand-alone server or as a server cluster of multiple servers.
In one embodiment, as shown in fig. 2, a log monitoring installation method is provided, and the method is applied to a central server for illustration, and includes the following steps:
s201, running a log monitoring checking script in the candidate server.
In this embodiment, all servers in communication with the center server may be considered as candidate servers. The log monitoring checking script is used for detecting whether the candidate server needs to be provided with log monitoring.
Specifically, the service demander can write a log monitoring inspection script and a log monitoring installation script, and store the log monitoring inspection script and the log monitoring installation script in the script management platform. The log monitoring inspection script and the log monitoring installation script stored in the script management platform can be further audited, and if the audit is passed, the log monitoring inspection script and the log monitoring installation script are stored in a script library; if the audit is not passed, continuing to modify the log monitoring inspection script and the log monitoring installation script, and then conducting the audit until the audit is passed, and storing the log monitoring inspection script and the log monitoring installation script after the audit is passed in a script library. The log monitoring and installing script is a script for installing log monitoring.
Further, the central server may determine candidate servers first, then send the log monitoring and checking scripts stored in the script library to each candidate server, and send a command for running the log monitoring and checking scripts to each candidate server; each candidate server runs the log monitoring and checking script in the respective running platform based on the command of the running log monitoring and checking script sent by the central server. Wherein the central server may determine the candidate server based on a predetermined determination logic. For example, the center server may take a server specified by the service demander as a candidate server. Alternatively, the center server may use a server deploying a certain application or function as a candidate server or the like.
S202, selecting a target server needing to be monitored by the installation log from the candidate servers according to the operation result.
The running result is the result of running log monitoring and checking scripts of each candidate server, and may include log monitoring required, log monitoring and checking script unnecessary to be installed, and the like. The target server is the server needing to be monitored by the installation log. Alternatively, the number of target servers may be one or more.
Specifically, after each candidate server runs the log monitoring checking script, the running result of each candidate server may be returned to the central server, and then the central server may select, from each candidate server, a target server to be monitored by the log to be installed based on the running result of each candidate server.
In one implementation manner, a candidate server whose operation result is that the installation log is required to be monitored may be selected from the candidate servers, and further, the candidate server whose operation result is that the installation log is required to be monitored may be used as the target server.
Alternatively, for each candidate server, if it is identified that a database and/or middleware exists in the candidate server according to the running result of the log monitoring checking script in the candidate server, it is determined that the candidate server needs to be monitored by the installation log, and the candidate server is used as a target server.
Alternatively, the running result of the running log monitoring checking script in the candidate server may be the presence database and/or middleware, or the absence database and/or middleware. Further, if the running result is that the database and/or the middleware exist, determining that log monitoring is required to be installed; if the running result is that the database and/or the middleware do not exist, the fact that log monitoring is not needed is determined.
Specifically, for each candidate server, according to the operation result of the operation log monitoring checking script in the candidate server, if the operation result of the candidate server is identified as the existence of a database and/or middleware, determining that the candidate server needs to be provided with log monitoring, and further taking the candidate server as a target server.
S203, running a log monitoring installation script in the target server to install log monitoring in the target server.
After determining all target servers needing log monitoring, the central server can send log monitoring installation scripts stored in a script library to each target server and send commands for running the log monitoring installation scripts to each target server; each target server runs the log monitoring installation script in each running platform based on the command of the running log monitoring installation script sent by the central server, and the log monitoring can be installed in each target server after the running of each target server is finished.
Or when the central server sends the log monitoring checking script to each candidate server, the central server simultaneously sends the log monitoring installation script to each candidate server, and each candidate server stores the sent log monitoring installation script in a relevant library for subsequent log monitoring installation. Further, after determining the target servers needing to install log monitoring, the central server may directly send a command of running log monitoring installation scripts to each target server, each target server may directly call the log monitoring installation scripts from the library after receiving the command of running log monitoring installation scripts sent by the central server, further running the log monitoring installation scripts in respective running platforms, and after the running of each target server is finished, the log monitoring may be installed in each target server.
In another implementation manner, if the current time is detected to meet the preset installation period, a log monitoring installation script is issued to the target server; and running a log monitoring installation script in the target server to install the log monitoring in the target server.
The installation period is a preset time period for monitoring the installation log; for example, it may be set to install log monitoring once a monday week. Optionally, the installation period can be determined according to the task processing condition of the server, so as to ensure that the log monitoring installation does not affect the normal business processing of the server. For example, by considering comprehensively that the business process of each server is typically 8:00-10:00 a day, this time period can be avoided when determining the installation period of the installation log monitoring.
Specifically, if the current time is detected to meet the preset installation period, the log monitoring installation script is sent to each target server. For example, the current time is 15:00 pm a week, it may be determined that the current time satisfies a preset installation period; and further sending the log monitoring installation script to each target server. Furthermore, each target server can run the log monitoring installation script in the own running platform based on the sent log monitoring installation script, and the log monitoring can be installed in each target server after the running of each target server is finished. It can be appreciated that the installation period is introduced in the embodiment, so that the whole log monitoring and installation flow is more standard.
In order to ensure that log monitoring is successfully installed in each target server, as an implementation manner of the embodiment of the application, each target server can also feed back the installation condition of each target server to the central server, and the central server can further determine whether the log monitoring of each target server is completed or not based on the installation condition of each target server. For example, in the afternoon of 15:00, each target server runs a log monitoring installation script, if the reserved installation time is 30 minutes, the central server can issue a query instruction of log monitoring installation condition to each target server in the period of 15:30, and each target server feeds back the respective installation condition to the central server after receiving the query instruction sent by the central server; further, the central server may determine whether log monitoring of each target server is completed based on feedback conditions of each target server. If the feedback condition of a certain target server is that the log monitoring of the target server is not completed, a manual log monitoring installation instruction can be issued to the service demand side so that the service demand side can manually install the log monitoring of the target server.
When the number of the target servers is a plurality of, the log monitoring and installing script can be run in each target server at the same time, so that the effect of automatically installing log monitoring to the servers in batches can be achieved.
According to the log monitoring and installing method, the log monitoring checking script is run in the candidate server, and the target server needing to be installed with the log monitoring is selected from the candidate server according to the running result, so that the log monitoring and installing script is run in the target server, and the log monitoring and installing in the target server is automatically achieved. Compared with the scheme that log monitoring is manually installed on a server in the related art, the method has the advantages that the log monitoring checking script and the log monitoring installation script are introduced, the server needing log monitoring is determined based on the log monitoring checking script, the server needing log monitoring is automatically installed based on the log monitoring installation script, automatic installation of log monitoring is achieved, labor cost is reduced, and log monitoring installation efficiency is improved; furthermore, based on the log monitoring checking script and the log monitoring installation script, the log monitoring can be installed to a plurality of servers at the same time, namely, the effect of batch log monitoring is achieved.
In one embodiment, based on the above embodiment, a detailed explanation of running the log monitoring and checking script in the candidate server in S201 is further described. As shown in fig. 3, the method specifically comprises the following steps:
s301, determining candidate servers according to the server list.
The server list is a list including all servers in the data center. Alternatively, information of each server, such as information of use of the server, monitoring of the server installation log, and the like, may be recorded in the server list.
Specifically, the server list may be input into a pre-trained model, the model selects a candidate server from the servers based on information of each server recorded in the server list, and outputs the selected candidate server. Alternatively, all servers in the server list may be grouped, and any one of the groups may be selected as a candidate server; for example, all servers in the server list are equally divided into 10 groups, and any one of the 10 groups may be taken as a candidate server.
S302, issuing a log monitoring checking script to the candidate server.
Specifically, after determining all candidate servers, the central server may send the log monitoring inspection script to each candidate server at a preset time point. For example, since there are many candidate servers, if the log monitoring and checking script is sent to all candidate servers, a situation may occur that a certain candidate server does not receive the log monitoring and checking script, and then all the determined candidate servers may be grouped, and the central server may sequentially send the log monitoring and checking script to each group of candidate servers.
And S303, if the current time is detected to meet the preset inspection period, running a log monitoring and checking script in the candidate server.
The inspection period is a preset time period for checking whether the server needs to be monitored by the installation log; for example, it may be set whether each server is log monitored once every friday patrol. Optionally, the inspection period can be determined according to the task processing condition of the server, so as to ensure that the normal business processing of the server is not affected by log monitoring and installation.
Specifically, if it is detected that the current time meets a preset inspection cycle, for example, the current time is 12:00 pm on friday, it can be determined that the current time meets the preset inspection cycle; and further sending an instruction of the running log monitoring checking script to each candidate server. Furthermore, each candidate server can run the log monitoring and checking script in the own running platform based on the transmitted command of the running log monitoring and checking script, and after the running of each candidate server is finished, the running result of each candidate server running log monitoring and checking script can be obtained.
In the embodiment, by determining the candidate servers, and further running log monitoring and checking scripts in each candidate server when the inspection period is satisfied, a target server needing log monitoring is obtained, and data support is provided for log monitoring in the target server; furthermore, by introducing a patrol period, the whole log monitoring automatic installation process can be more standard.
In one embodiment, based on the above embodiment, further explanation is given to S201 determining the candidate server according to the server list. The method comprises the specific process that candidate servers are selected from all servers in a server list according to at least one of the inspection times, the running environment changing conditions and the log monitoring installation conditions of all servers in the server list.
The inspection times are times for checking whether each server needs to be monitored by the installation log, and can comprise 0 times or 1 time, etc. The operating environment change condition may include that the operating environment is unchanged, that the operating environment has been changed, and the like. Log monitoring installation conditions may include installed log monitoring, uninstalled log monitoring, and the like.
Specifically, when a candidate server is determined from the server list according to the number of rounds of each server in the server list, for each server in the server list, if the number of rounds recorded by the server in the server list is 0, the server is taken as the candidate server.
In the case where a candidate server is determined from the server list based on the item of the change condition of the operating environment of each server in the server list, if the change condition of the operating environment recorded in the server list by the server is that the operating environment has been changed, the server is regarded as a candidate server for each server in the server list.
In the case where the candidate server is determined from the server list based on the log monitor installation condition of each server in the server list, for each server in the server list, if the log monitor installation condition recorded by the server in the server list is log monitor uninstalled, the server is taken as the candidate server.
It should be noted that, the candidate server may be selected from the servers in the server list according to one or more of the three types of inspection times, running environment changing conditions, and log monitoring installation conditions of the servers in the server list.
In this embodiment, by selecting the candidate server from the servers in the server list according to the number of inspection times, the running environment change condition, and the log monitoring installation condition of the servers, the candidate server can be quickly and accurately determined.
To ensure accurate installation of log monitoring, in one embodiment, log monitoring inspection scripts may be detected. Alternatively, the log monitoring inspection script may be detected before the log monitoring inspection script is issued to the candidate server, for example, after the central server obtains the log monitoring inspection script written by the service demander.
Optionally, the detecting the log monitoring inspection script may be detecting at least one of an encoding format, an output format, and suitability of the log monitoring inspection script.
The suitability of the log monitoring checking script is whether the log monitoring checking script is matched with the current running environment of the server. Optionally, the coding format and the output format of the log monitoring checking script are both preset formats.
Specifically, the coding format, the output format and the suitability of the log monitoring and checking script can be detected according to a detection system which is specially used for detecting whether the script meets the requirements of a service demander. For example, the log monitoring and checking script may be input into the detection system, and the coding format or the output format is detected, if the coding format/output format of the log monitoring and checking script is detected to not meet the preset format requirement, the visual interface of the detection system will display the result that the script does not meet the preset format requirement of the coding format/output format; the service demander can click the next step based on the visual interface of the detection system, and the detection system can directly display the log monitoring checking script with the correct coding format/output format;
Aiming at suitability, if the suitability of the log monitoring and checking script is detected to be insufficient, a visual interface of the detection system can display that the suitability of the script is insufficient and a specific problem can be displayed in the last row; the service requirement party can further modify the log monitoring and checking script based on the specific problems displayed in the visual interface of the detection system, and further detect the log monitoring and checking script according to the detection system after modification is completed until the log monitoring and checking script passes detection.
Further, the integrity, the coding neatness and the like of the log monitoring checking script can also be detected. For example, the log monitoring inspection script may be input into a dedicated detection system that may run the log monitoring inspection script within its own running platform to detect the integrity, coding cleanliness, etc. of the log monitoring inspection script. For example, it may be detected whether the log monitoring check script is complete in function (i.e., whether all functions required by the service demander are present in the log monitoring check script), whether a nonce is present in the log monitoring check script, or the like.
In this embodiment, by detecting the log monitoring and checking script from the aspects of encoding format, output format, suitability and the like, the obtained log monitoring and checking script can be more accurate, so as to more accurately determine the server to be installed with log monitoring.
Similarly, the log monitoring installation script can be detected. Alternatively, after the central server obtains the log monitoring installation script written by the service demander, the log monitoring installation script may be detected in the same manner as the log monitoring inspection script is detected. For example, the log monitoring installation script can be detected from multiple aspects of the coding format, the output format, the suitability, the integrity, the coding neatness and the like of the log monitoring installation script, and the specific detection process is the same as that described above, and is not described in detail.
In addition, in one embodiment, the present application also provides an alternative example of a log monitor installation method. Referring to fig. 4, the specific process includes:
s401, selecting a candidate server from each server in the server list according to at least one of the inspection times, the running environment change condition and the log monitoring installation condition of each server in the server list.
S402, detecting at least one of the coding format, the output format and the suitability of the log monitoring checking script.
S403, after the detection is passed, a log monitoring and checking script is issued to the candidate server.
S404, if the current time is detected to meet the preset inspection period, running a log monitoring and checking script in the candidate server.
S405, for each candidate server, if the database and/or middleware exist in the candidate server according to the running result of the running log monitoring checking script in the candidate server, determining that the candidate server needs to be provided with log monitoring, and taking the candidate server as a target server.
S406, if the current time is detected to meet the preset installation period, a log monitoring installation script is issued to the target server.
S407, running a log monitoring installation script in the target server to install log monitoring in the target server.
It should be noted that, the above-mentioned steps S401 to S407 give a specific order, but the step S402 of detecting at least one of the encoding format, the output format and the suitability of the log monitoring inspection script may be performed before step S401 or simultaneously with step S401. Further, the specific process of S401 to S407 may refer to the description of the foregoing method embodiment, and the implementation principle and technical effects are similar, and are not repeated herein.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a log monitoring installation device for realizing the log monitoring installation method. The implementation of the solution provided by the device is similar to the implementation described in the above method, so the specific limitation in the embodiments of the log monitoring installation device or devices provided below may refer to the limitation of the log monitoring installation method hereinabove, and will not be described herein.
In one embodiment, as shown in fig. 5, there is provided a log monitor mounting apparatus 1 including: script execution module 10, selection module 20, and installation module 30, wherein:
a script running module 10 for running a log monitoring check script in the candidate server;
a selection module 20, configured to select, according to the operation result, a target server that needs to be monitored by the installation log from the candidate servers;
an installation module 30 for running a log monitor installation script in the target server to install log monitor in the target server.
In one embodiment, as shown in fig. 6, the script running module 10 includes:
a determining unit 11 for determining candidate servers according to the server list;
A script issuing unit 12 for issuing a log monitoring inspection script to the candidate server;
and the script running unit 13 is configured to run the log monitoring inspection script in the candidate server if it is detected that the current time meets the preset inspection period.
In one embodiment, the determining unit 11 is specifically configured to:
and selecting a candidate server from the servers in the server list according to at least one of the inspection times, the running environment change condition and the log monitoring installation condition of the servers in the server list.
In one embodiment, the log monitoring installation device 1 further includes:
and the detection unit is used for detecting at least one of the coding format, the output format and the suitability of the log monitoring checking script.
In one embodiment, the selection module 20 is specifically configured to:
and for each candidate server, if the database and/or middleware exist in the candidate server according to the running result of the running log monitoring checking script in the candidate server, determining that the candidate server needs to be provided with log monitoring, and taking the candidate server as a target server.
In one embodiment, the mounting module 30 is specifically configured to:
If the current time is detected to meet the preset installation period, a log monitoring installation script is issued to the target server; and running a log monitoring installation script in the target server to install the log monitoring in the target server.
The various modules in the log monitor installation device described above may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 7. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is used to store log monitor installation data. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program, when executed by a processor, implements a log monitor installation method.
It will be appreciated by those skilled in the art that the structure shown in fig. 7 is merely a block diagram of some of the structures associated with the present application and is not limiting of the computer device to which the present application may be applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided comprising a memory and a processor, the memory having stored therein a computer program, the processor when executing the computer program performing the steps of:
running a log monitoring checking script in the candidate server;
selecting a target server needing to be monitored by the installation log from the candidate servers according to the operation result;
and running a log monitoring installation script in the target server to install the log monitoring in the target server.
In one embodiment, when the processor executes logic in the computer program to run the log monitoring and checking script in the candidate server, the following steps are specifically implemented:
determining candidate servers according to the server list; transmitting a log monitoring checking script to a candidate server; and if the current time is detected to meet the preset inspection period, running the log monitoring inspection script in the candidate server.
In one embodiment, when the processor executes logic of the candidate server according to the server list in the computer program, the following steps are specifically implemented:
and selecting a candidate server from the servers in the server list according to at least one of the inspection times, the running environment change condition and the log monitoring installation condition of the servers in the server list.
In one embodiment, when the processor executes logic before the log monitoring checking script is issued to the candidate server in the computer program, the following steps are specifically implemented:
at least one of an encoding format, an output format, and suitability of the log monitoring inspection script is detected.
In one embodiment, when the processor executes logic in the computer program for selecting a target server to be monitored by the installation log from the candidate servers according to the operation result, the following steps are specifically implemented:
and for each candidate server, if the database and/or middleware exist in the candidate server according to the running result of the running log monitoring checking script in the candidate server, determining that the candidate server needs to be provided with log monitoring, and taking the candidate server as a target server.
In one embodiment, when the processor executes the logic in the computer program to run the log monitor installation script in the target server to install the log monitor in the target server, the following steps are specifically implemented:
if the current time is detected to meet the preset installation period, a log monitoring installation script is issued to the target server; and running a log monitoring installation script in the target server to install the log monitoring in the target server.
The principles and specific processes of implementing the above-mentioned computer device in each embodiment may be referred to the description in the foregoing embodiment of the log monitoring installation method in the foregoing embodiment, which is not repeated herein.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of:
running a log monitoring checking script in the candidate server;
selecting a target server needing to be monitored by the installation log from the candidate servers according to the operation result;
and running a log monitoring installation script in the target server to install the log monitoring in the target server.
In one embodiment, the logic in the computer program for running the log monitor and check script in the candidate server, when executed by the processor, specifically performs the steps of:
Determining candidate servers according to the server list; transmitting a log monitoring checking script to a candidate server; and if the current time is detected to meet the preset inspection period, running a log monitoring and checking script in the candidate server.
In one embodiment, the logic in the computer program for determining the candidate server according to the server list is executed by the processor, and specifically implements the following steps:
and selecting a candidate server from the servers in the server list according to at least one of the inspection times, the running environment change condition and the log monitoring installation condition of the servers in the server list.
In one embodiment, the following steps are specifically implemented when logic before the computer program issues the log monitoring and checking script to the candidate server is executed by the processor:
at least one of an encoding format, an output format, and suitability of the log monitoring inspection script is detected.
In one embodiment, when logic in the computer program for selecting a target server to be monitored by the installation log from the candidate servers is executed by the processor according to the operation result, the following steps are specifically implemented:
and for each candidate server, if the database and/or middleware exist in the candidate server according to the running result of the running log monitoring checking script in the candidate server, determining that the candidate server needs to be provided with log monitoring, and taking the candidate server as a target server.
In one embodiment, the following steps are specifically implemented when a log monitor installation script is run in a target server in a computer program to install log monitor in logic in the target server to be executed by a processor:
if the current time is detected to meet the preset installation period, a log monitoring installation script is issued to the target server; and running a log monitoring installation script in the target server to install the log monitoring in the target server.
The principles and specific procedures of implementing the foregoing embodiments of the computer readable storage medium may be referred to the description of the embodiments of the log monitoring installation method in the foregoing embodiments, which are not repeated herein.
In one embodiment, a computer program product is provided comprising a computer program which, when executed by a processor, performs the steps of:
running a log monitoring checking script in the candidate server;
selecting a target server needing to be monitored by the installation log from the candidate servers according to the operation result;
and running a log monitoring installation script in the target server to install the log monitoring in the target server.
In one embodiment, the logic in the computer program for running the log monitor and check script in the candidate server, when executed by the processor, specifically performs the steps of:
Determining candidate servers according to the server list; transmitting a log monitoring checking script to a candidate server; and if the current time is detected to meet the preset inspection period, running a log monitoring and checking script in the candidate server.
In one embodiment, the logic in the computer program for determining the candidate server according to the server list is executed by the processor, and specifically implements the following steps:
and selecting a candidate server from the servers in the server list according to at least one of the inspection times, the running environment change condition and the log monitoring installation condition of the servers in the server list.
In one embodiment, the following steps are specifically implemented when logic before the computer program issues the log monitoring and checking script to the candidate server is executed by the processor:
at least one of an encoding format, an output format, and suitability of the log monitoring inspection script is detected.
In one embodiment, when logic in the computer program for selecting a target server to be monitored by the installation log from the candidate servers is executed by the processor according to the operation result, the following steps are specifically implemented:
and for each candidate server, if the database and/or middleware exist in the candidate server according to the running result of the running log monitoring checking script in the candidate server, determining that the candidate server needs to be provided with log monitoring, and taking the candidate server as a target server.
In one embodiment, the following steps are specifically implemented when a log monitor installation script is run in a target server in a computer program to install log monitor in logic in the target server to be executed by a processor:
if the current time is detected to meet the preset installation period, a log monitoring installation script is issued to the target server; and running a log monitoring installation script in the target server to install the log monitoring in the target server.
The principles and specific procedures of implementing the foregoing embodiments of the computer program product provided in the foregoing embodiments may be referred to in the foregoing embodiments of the log monitoring installation method, and are not described herein in detail.
The data (including but not limited to log monitoring inspection script, log monitoring installation script, related data of server, etc.) related in the present application are information and data authorized by the user or sufficiently authorized by each party.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the various embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the various embodiments provided herein may include at least one of relational databases and non-relational databases. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic units, quantum computing-based data processing logic units, etc., without being limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples only represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the present application. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application shall be subject to the appended claims.

Claims (10)

1. A log monitoring installation method, the method comprising:
running a log monitoring checking script in the candidate server;
selecting a target server needing to be monitored by the installation log from the candidate servers according to the operation result;
and running a log monitoring installation script in the target server to install log monitoring in the target server.
2. The method of claim 1, wherein running the log monitor check script in the candidate server comprises:
determining candidate servers according to the server list;
issuing a log monitoring checking script to the candidate server;
and if the current time is detected to meet the preset inspection period, running the log monitoring inspection script in the candidate server.
3. The method of claim 2, wherein determining candidate servers from the server inventory comprises:
and selecting a candidate server from the servers in the server list according to at least one of the inspection times, the running environment change condition and the log monitoring installation condition of the servers in the server list.
4. The method of claim 2, wherein prior to issuing a log monitoring check script to the candidate server, the method further comprises:
at least one of an encoding format, an output format, and suitability of the log monitoring inspection script is detected.
5. The method according to claim 1, wherein selecting a target server requiring installation log monitoring from the candidate servers according to the operation result comprises:
And for each candidate server, if the database and/or middleware exist in the candidate server according to the running result of the running log monitoring checking script in the candidate server, determining that the candidate server needs to be provided with log monitoring, and taking the candidate server as a target server.
6. The method of claim 1, wherein running a log monitor installation script within the target server to install log monitors within the target server comprises:
if the current time is detected to meet the preset installation period, a log monitoring installation script is issued to the target server;
and running a log monitoring installation script in the target server to install log monitoring in the target server.
7. A log monitor mounting apparatus, the apparatus comprising:
the script running module is used for running log monitoring and checking scripts in the candidate server;
the selection module is used for selecting a target server needing to be monitored by the installation log from the candidate servers according to the operation result;
and the installation module is used for running a log monitoring installation script in the target server so as to install log monitoring in the target server.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 6 when the computer program is executed.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
CN202310144461.5A 2023-02-07 2023-02-07 Log monitoring installation method, device, computer equipment and storage medium Pending CN116185774A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310144461.5A CN116185774A (en) 2023-02-07 2023-02-07 Log monitoring installation method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310144461.5A CN116185774A (en) 2023-02-07 2023-02-07 Log monitoring installation method, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116185774A true CN116185774A (en) 2023-05-30

Family

ID=86434172

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310144461.5A Pending CN116185774A (en) 2023-02-07 2023-02-07 Log monitoring installation method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116185774A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117076185A (en) * 2023-10-16 2023-11-17 太平金融科技服务(上海)有限公司 Server inspection method, device, equipment and medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117076185A (en) * 2023-10-16 2023-11-17 太平金融科技服务(上海)有限公司 Server inspection method, device, equipment and medium
CN117076185B (en) * 2023-10-16 2024-01-05 太平金融科技服务(上海)有限公司 Server inspection method, device, equipment and medium

Similar Documents

Publication Publication Date Title
CN109634587B (en) Method and equipment for generating warehousing script and warehousing data
CN116185774A (en) Log monitoring installation method, device, computer equipment and storage medium
CN111694684B (en) Abnormal construction method and device of storage device, electronic device and storage medium
US8725966B2 (en) Generation and update of storage groups constructed from storage devices distributed in storage subsystems
CN112346952A (en) Method, equipment and electronic equipment for regression testing of test cases
CN114756293A (en) Service processing method, device, computer equipment and storage medium
CN113760874A (en) Data quality detection method and device, electronic equipment and storage medium
CN113656263B (en) Data processing method, system, storage medium and terminal
CN114036171B (en) Application data management method, device, computer equipment and storage medium
CN117591260A (en) Task execution method, device, equipment, storage medium and program product
CN118113622A (en) Detection and repair method, device and equipment applied to batch operation scheduling
CN116932827A (en) System operation and maintenance graph processing method and device, computer equipment and storage medium
CN116339777A (en) System patch processing method, device, computer equipment and storage medium
CN116010268A (en) Test environment building method, device, computer equipment and storage medium
CN114374688A (en) Application program deployment method and device, computer equipment and storage medium
CN117971535A (en) System inspection method, device, computer equipment and storage medium
CN117992029A (en) Service end code production method, device, computer equipment and storage medium
CN118113530A (en) Chip fault positioning method, device, computer equipment and storage medium
CN116361149A (en) Batch processing automatic test method, device, computer equipment and storage medium
CN113962587A (en) Device inventory method, device, computer device and computer-readable storage medium
CN113392098A (en) Data writing method, device, equipment and storage medium
CN117453561A (en) Test script calling method, device, computer equipment and storage medium
CN115687074A (en) Business system testing method and device, computer equipment and storage medium
CN117593125A (en) Service data processing method, device, computer equipment and storage medium
CN116346671A (en) Platform connection testing method, device, computer equipment and storage medium

Legal Events

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