CN116225854A - Method, system, medium and equipment for automatically collecting server log - Google Patents

Method, system, medium and equipment for automatically collecting server log Download PDF

Info

Publication number
CN116225854A
CN116225854A CN202310491193.4A CN202310491193A CN116225854A CN 116225854 A CN116225854 A CN 116225854A CN 202310491193 A CN202310491193 A CN 202310491193A CN 116225854 A CN116225854 A CN 116225854A
Authority
CN
China
Prior art keywords
log
application service
information
server
path
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
CN202310491193.4A
Other languages
Chinese (zh)
Inventor
董延昌
张子千
李菊
李达宽
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Mingyida Technology Co ltd
Original Assignee
Beijing Mingyida Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Mingyida Technology Co ltd filed Critical Beijing Mingyida Technology Co ltd
Priority to CN202310491193.4A priority Critical patent/CN116225854A/en
Publication of CN116225854A publication Critical patent/CN116225854A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3065Monitoring arrangements determined by the means or processing involved in reporting the monitored data
    • G06F11/3072Monitoring arrangements determined by the means or processing involved in reporting the monitored data where the reporting involves data filtering, e.g. pattern matching, time or event triggered, adaptive or policy-based reporting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3089Monitoring arrangements determined by the means or processing involved in sensing the monitored data, e.g. interfaces, connectors, sensors, probes, agents
    • G06F11/3093Configuration details thereof, e.g. installation, enabling, spatial arrangement of the probes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/951Indexing; Web crawling techniques
    • 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)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Databases & Information Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Data Mining & Analysis (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention relates to a method for automatically collecting a server log, which comprises the following steps: collecting and transmitting server system information, automatically finding application service process information, acquiring an application service log path, and transmitting the application service process information and the application service log path; receiving system information of a server and comparing the system information with preset system information, acquiring a corresponding system log path, automatically identifying a system log in the server according to the system log path, automatically identifying an application service log in the server based on application service process information and the application service log path, generating a system log character code and an application service log character code, and storing the system log character code and the application service log character code; and reading disk file information according to the system log path and the application service log path, analyzing the content, uniformly transcoding the analyzed system log and the analyzed application service log into a preset coding format, and transmitting the preset coding format to a receiving end. The invention also relates to a system, a medium and equipment for automatically collecting the server log.

Description

Method, system, medium and equipment for automatically collecting server log
Technical Field
The present invention relates to the field of application services, and in particular, to a method, a system, a medium, and an apparatus for automatically collecting a server log.
Background
At present, the existing log collection needs manual carding, and for large-scale data centers, especially for large-scale data centers, the number of servers reaches thousands or tens of thousands, a great deal of time and manpower are consumed in the configuration work of the log collection. When the application and the log relation change along with the system change, the log acquisition configuration needs to be readjusted, and a large amount of operation and maintenance resources are occupied.
With the increasing complexity of software system architecture, the scale of the system is expanding, and operations such as obstacle removal and positioning of the system through logs are becoming increasingly important. The log collection needs to do a large amount of configuration work, needs to comb the storage paths of the logs, needs to pay attention to the character coding format of the logs and the service for generating the logs, and has different log storage paths of different operating systems such as Linux and AIX, and different versions of the same operating system, so that the log collection needs a large amount of manual configuration and implementation work for different types or versions of systems, which is time-consuming and labor-consuming, and is easy to cause missing and inaccuracy.
In order to solve the problems in the prior art, there is a need to develop a method and a system for realizing automatic identification and collection of logs through a rule engine technology and a log crawler technology, and simultaneously realizing automatic identification of application service and log relation, and completing large-scale log collection without manual intervention; the system can realize real-time monitoring and find corresponding change information when the system is changed, and automatically adjust the acquisition configuration according to the change information, so that the input of operation and maintenance force is greatly reduced while the occurrence of log omission events is avoided.
Disclosure of Invention
The invention aims to solve the technical problem of providing a method, a system, a medium and equipment for automatically collecting server logs aiming at the defects of the prior art.
The technical scheme for solving the technical problems is as follows: a method for automatically collecting server logs includes:
and information acquisition: collecting and transmitting server system information, automatically finding application service process information, acquiring an application service log path based on the application service process information, and transmitting the application service process information and the application service log path;
log collection configuration management step: receiving system information of a server and comparing the system information with preset system information, acquiring a corresponding system log path, automatically identifying a system log in the server according to the system log path, automatically identifying an application service log in the server based on process information and the application service log path, generating a system log character code and an application service log character code, and storing the system log character code and the application service log character code;
and (3) log acquisition: and reading disk file information according to the system log path and the application service log path, respectively carrying out content analysis through the system log character codes and the application service log character codes, uniformly transcoding the analyzed system log and application service log into a preset coding format, and transmitting the preset coding format to a receiving end.
Preferably, the method further comprises:
and a system log management step: providing preset system information and managing a system log path corresponding to the preset system information, wherein the management comprises the steps of adding, modifying, deleting and inquiring the preset system information and the system log path.
Preferably, the information collecting step further includes:
and system information acquisition: automatically identifying and transmitting server system information, wherein the server system information comprises an operating system name and operating system version information;
and an application service information acquisition step: automatically discovering and transmitting application service process information and an application service log path, wherein the application service process information comprises a process name and a process PID; the application service log path is obtained by a process PID.
Preferably, the log collection configuration management step further includes:
and (3) code preservation: and saving the system log character codes and the application service log character codes, and saving server system information, a system log path, application service process information and an application service log path.
Preferably, the log collecting step includes:
and carrying out log content analysis through system log character coding and application service log character coding, uniformly transcoding the log content into UTF-8 coding, and sending the transcoded content to a receiving end in an event stream mode.
Preferably, the log collection configuration management step further includes:
the basic identification step of the log character code comprises the following steps: the first N bytes of the log are read by using a GBK coding mode, and coding types of the system log character coding and the application service log character coding are sequentially identified according to basic judging conditions, wherein the coding types comprise: ANSI, unicode, UTF-16BE and UTF-8.
Preferably, the log collection configuration management step further includes:
the step of advanced identification of the log character codes: when the coding type cannot be judged in the basic identification step of the log character coding, all byte contents after the (n+1) th are identified based on the advanced judgment condition, and whether the coding type belongs to the UTF-8 format is judged.
The embodiment of the invention also provides a system for automatically collecting the server logs, which adopts the method for automatically collecting the server logs, and comprises the following steps:
and the information acquisition module is used for: collecting and transmitting server system information, automatically finding application service process information, acquiring an application service log path based on the application service process information, and transmitting the application service process information and the application service log path;
log collection configuration management module: receiving system information of a server and comparing the system information with preset system information, acquiring a corresponding system log path, automatically identifying a system log in the server according to the system log path, automatically identifying an application service log in the server based on process information and the application service log path, generating a system log character code and an application service log character code, and storing the system log character code and the application service log character code;
the log acquisition module is used for: and reading disk file information according to the system log path and the application service log path, respectively carrying out content analysis through the system log character codes and the application service log character codes, uniformly transcoding the analyzed system log and application service log into a preset coding format, and transmitting the preset coding format to a receiving end.
The present invention provides a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of the method for automatically collecting server logs described above.
The invention provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor executes the steps of the method for automatically collecting server logs.
The method has the beneficial effects that:
the invention automatically identifies different operating systems and different system versions through a rule engine and a crawler technology, automatically generates a system log path and completes log acquisition, and also automatically acquires the application system through automatically identifying the application service in the system and the log path of the application service, simultaneously saves the relation information of the application service and the log, and can help operation and maintenance personnel to accurately position the service generating problems under the complex application architecture.
Additional aspects of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following description will briefly explain the embodiments of the present invention or the drawings used in the description of the prior art, and it is obvious that the drawings described below are only some embodiments of the present invention, and other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a method for automatically collecting logs of a server according to the present invention;
FIG. 2 is a schematic diagram of a system for automatic acquisition of server logs according to the present invention;
FIG. 3 is a schematic diagram of a system for automatic collection of server logs according to an embodiment of the present invention;
fig. 4 is a schematic diagram of log coding parsing flow according to an embodiment of the invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
The invention aims to provide a method and a system thereof, which realize the automatic identification and collection of the logs and the automatic identification of the relation between the application service and the logs at the same time through a rule engine technology and a log crawler technology, and can complete the collection of the large-scale logs without manual intervention. The technology monitors and finds corresponding change information in real time when the system is changed, and automatically adjusts the acquisition configuration according to the change information, so that the input of operation and maintenance force is greatly reduced while the occurrence of log omission events is avoided.
The technical scheme for solving the technical problems is as follows: as shown in fig. 1, a method for automatically collecting a server log includes:
information acquisition step S10: collecting and transmitting server system information, automatically finding application service process information, acquiring an application service log path based on the application service process information, and transmitting the application service process information and the application service log path;
log collection configuration management step S20: receiving system information of a server and comparing the system information with preset system information, acquiring a corresponding system log path, automatically identifying a system log in the server according to the system log path, automatically identifying an application service log in the server based on process information and the application service log path, generating a system log character code and an application service log character code, and storing the system log character code and the application service log character code;
log collection step S30: and reading disk file information according to the system log path and the application service log path, respectively carrying out content analysis through the system log character codes and the application service log character codes, uniformly transcoding the analyzed system log and application service log into a preset coding format, and sending the preset coding format to a receiving end.
Preferably, the method further comprises:
and a system log management step: providing preset system information and managing a system log path corresponding to the preset system information, wherein the management comprises the steps of adding, modifying, deleting and inquiring the preset system information and the system log path.
Preferably, the information collecting step S10 further includes:
and system information acquisition: automatically identifying and transmitting server system information, wherein the server system information comprises an operating system name and operating system version information;
and an application service information acquisition step: automatically discovering and transmitting application service process information and an application service log path, wherein the application service process information comprises a process name and a process PID; the application service log path is obtained by a process PID.
Preferably, the log collection configuration management step S20 further includes:
and (3) code preservation: and saving the system log character codes and the application service log character codes, and saving server system information, a system log path, application service process information and an application service log path.
Preferably, the step S30 of collecting the log includes:
and carrying out log content analysis through system log character coding and application service log character coding, uniformly transcoding the log content into UTF-8 coding, and sending the transcoded content to a receiving end in an event stream mode.
Preferably, the log collection configuration management step S20 further includes:
the basic identification step of the log character code comprises the following steps: the first N bytes of the log are read by using a GBK coding mode, and coding types of the system log character coding and the application service log character coding are sequentially identified according to basic judging conditions, wherein the coding types comprise: ANSI, unicode, UTF-16BE and UTF-8. In the embodiment of the present invention, N takes a value of 3, but the present invention is not limited thereto, and other values where N is greater than or less than 3 may be set.
Preferably, the log collection configuration management step S20 further includes:
the step of advanced identification of the log character codes: when the coding type cannot be judged in the basic identification step of the log character coding, all byte contents after the (n+1) th are identified based on the advanced judgment condition, and whether the coding type belongs to the UTF-8 format is judged.
The embodiment of the invention also provides a system for automatically collecting the server logs, which adopts the method for automatically collecting the server logs, as shown in fig. 2, and comprises the following steps:
information acquisition module 10: collecting and transmitting server system information, automatically finding application service process information, acquiring an application service log path based on the application service process information, and transmitting the application service process information and the application service log path;
log collection configuration management module 20: receiving system information of a server and comparing the system information with preset system information, acquiring a corresponding system log path, automatically identifying a system log in the server according to the system log path, automatically identifying an application service log in the server based on process information and the application service log path, generating a system log character code and an application service log character code, and storing the system log character code and the application service log character code;
log collection module 30: and reading disk file information according to the system log path and the application service log path, respectively carrying out content analysis through the system log character codes and the application service log character codes, uniformly transcoding the analyzed system log and application service log into a preset coding format, and transmitting the preset coding format to a receiving end.
Specific embodiments of the present invention are described in detail below with reference to the accompanying drawings:
in the system provided by the application, fig. 3 is a schematic diagram of a system for automatically collecting logs of a server according to a specific embodiment of the present invention, and as shown in fig. 3, the application provides a system for automatically collecting logs of a server, which includes a system information collecting module, an application service information collecting module, a system log management module, a log collection configuration management module and a log collection module, wherein the system is deployed in the server; the server also stores a system log and an application service log; the application service information acquisition module, the system information acquisition module and the log acquisition module can be deployed on a target server, and can be deployed in the system and access the target server in a remote mode. The log acquisition configuration management module is deployed in the system. The invention is not limited in this regard and other arrangements may be employed.
The system information acquisition module: the system information is used for automatically identifying the server system information and sending the system information to the log acquisition configuration management module;
further, the system information comprises an operating system name and operating system version information;
the application service information acquisition module: the system is used for automatically finding out application service process information, acquiring an application service log path according to the application service process information, and then sending the process information and the application service log path to a log acquisition configuration management module;
further, the application service process information comprises a process name and a process PID;
further, the application service log path is obtained through a process PID;
and a system log management module: providing preset system information and managing a system log path corresponding to the preset system information;
further, the management includes adding, modifying, deleting and inquiring preset system information and system log paths;
log collection configuration management module: comparing the server system information received from the system information acquisition module with preset system information acquired from the system log management module to acquire a corresponding system log path, automatically identifying a system log in a server according to the system log path, generating a system log character code, and storing the server system information, the system log path and the system log character code;
the log character code recognition process comprises the following steps: using GBK to read the content of the first 3 bytes of the log, and identifying the type (ANSI, unicode, UTF-16BE, UTF-8) to which the log character code belongs according to the basic judgment condition;
the above basic judgment conditions are as shown in fig. 4, and the character encoding type of 99% in the total amount of the approaching log can be recognized by the recognition method of the first 3 bytes.
Further, when the first 3 bytes of the GBK read log cannot confirm the type of the log character code, whether the log character code belongs to the UTF-8 format or not can be identified through a further judging condition;
the above-mentioned advanced judgment conditions are as shown in fig. 4, and the recognition accuracy can be further improved by the advanced recognition method.
The log acquisition configuration management module also automatically identifies an application service log in the server according to the process information and the application service log path received from the application service information acquisition module, generates an application service log character code, and then stores the process information, the application service log path and the application service log character code.
The log acquisition module is used for: and acquiring information such as a system log path, character codes, an application service log path, character codes and the like of the current server from the log acquisition configuration management module, reading disk file information according to the log path, carrying out content analysis through the character codes, uniformly transcoding log content into UTF-8 codes, and sending the transcoded content to a receiving end in an event stream mode. And identifying the log character codes from different systems, uniformly converting different character code types into UTF-8 on the basis of the identification, and then identifying.
The embodiment of the invention also provides a method for automatically collecting the server log, which is executed by the server and comprises the following steps:
step 1: acquiring server system information through a system information acquisition module, acquiring application service process information and an application service log path through an application service information acquisition module, and transmitting the server system information, the application service process information and the application service log path to a log acquisition configuration management module;
preferably, the server system information, the application service process information and the application service log path can be acquired simultaneously;
step 2: the log acquisition configuration management module compares the acquired server system information with preset system information in the system log management module to acquire a system log path corresponding to the server system information, and further identifies a system log in the server according to the system log path and generates a system log character code;
the application is characterized in that the automatic discovery of the logs is realized, namely, the process of grabbing the logs through manual configuration conditions is avoided, the logs from different systems are always acquired and analyzed by utilizing the acquisition module, and the application service logs in the server are automatically identified and the application service character codes are generated according to the process information and the application service log paths received from the application service information acquisition module;
step 3: then, the system log path, the system log character code, the application service log path and the application service log character code are sent to a log acquisition module;
step 4: the log acquisition module reads disk file information according to the system log path and the application service log path, analyzes the content through the system log character codes and the application service log character codes, uniformly transcodes the system log content and the application service log content into UTF-8 codes, and sends the transcoded content to the receiving end in an event stream mode. The specific parsing process is shown in fig. 4.
The present invention provides a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of the method for automatically collecting server logs described above.
The invention provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the method for automatically collecting server logs as described above when executing the program.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other manners. For example, the apparatus/terminal device embodiments described above are merely illustrative, e.g., the division of the modules or units is merely a logical function division, and there may be additional divisions in actual implementation, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection via interfaces, devices or units, which may be in electrical, mechanical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated modules/units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium.
Based on such understanding, the present invention may implement all or part of the flow of the method of the above embodiment, or may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, and when the computer program is executed by a processor, the computer program may implement the steps of each of the method embodiments described above. Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), an electrical carrier signal, a telecommunications signal, a software distribution medium, and so forth. It should be noted that the computer readable medium may include content that is subject to appropriate increases and decreases as required by jurisdictions in which such content is subject to legislation and patent practice, such as in certain jurisdictions in which such content is not included as electrical carrier signals and telecommunication signals.
Compared with the prior art: the key point and the protection point of the invention lie in the collection, analysis and call completing rate calculation process of the maritime satellite C system communication call record.
The above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention, and are intended to be included in the scope of the present invention.
The present invention is not limited to the above embodiments, and various equivalent modifications and substitutions can be easily made by those skilled in the art within the technical scope of the present invention, and these modifications and substitutions are intended to be included in the scope of the present invention. Therefore, the protection scope of the invention is subject to the protection scope of the claims.

Claims (10)

1. A method for automatically collecting server logs, the method comprising:
and information acquisition: collecting and transmitting server system information, automatically finding application service process information, acquiring an application service log path based on the application service process information, and transmitting the application service process information and the application service log path;
log collection configuration management step: receiving the comparison of the server system information and preset system information, acquiring a corresponding system log path, automatically identifying a system log in a server according to the system log path, automatically identifying an application service log in the server based on the application service process information and the application service log path, generating a system log character code and an application service log character code, and storing the system log character code and the application service log character code;
and (3) log acquisition: and reading disk file information according to the system log path and the application service log path, respectively carrying out content analysis through the system log character codes and the application service log character codes, uniformly transcoding the analyzed system log and application service log into a preset coding format, and sending the preset coding format to a receiving end.
2. The method for automatically collecting server logs according to claim 1, further comprising:
and a system log management step: providing preset system information and managing a system log path corresponding to the preset system information, wherein the management comprises the steps of adding, modifying, deleting and inquiring the preset system information and the system log path.
3. The method for automatically collecting logs of a server according to claim 1 or 2, wherein the information collecting step further comprises:
and system information acquisition: automatically identifying and transmitting the server system information, wherein the server system information comprises an operating system name and operating system version information;
and an application service information acquisition step: automatically discovering and transmitting the application service process information and the application service log path, wherein the application service process information comprises a process name and a process PID; the application service log path is obtained by a process PID.
4. The method for automatically collecting logs of a server according to claim 1 or 2, wherein the log collection configuration management step further includes:
and (3) code preservation: and storing the system log character code and the application service log character code, and storing the server system information, the system log path, the application service process information and the application service log path.
5. The method for automatically collecting logs of a server according to claim 1 or 2, wherein the step of collecting logs further comprises:
and analyzing the log content through the system log character codes and the application service log character codes, uniformly transcoding the log content into UTF-8 codes, and sending the transcoded content to a receiving end in an event stream mode.
6. The method for automatically collecting logs in a server according to claim 4, wherein the log collecting configuration management step further comprises:
the basic identification step of the log character code comprises the following steps: the first N bytes of the log are read by using a GBK coding mode, and the coding types of the system log character codes and the application service log character codes are sequentially identified according to basic judging conditions, wherein the coding types comprise: ANSI, unicode, UTF-16BE and UTF-8.
7. The method of automatic acquisition of server logs according to claim 6, wherein the log acquisition configuration management step further includes:
the step of advanced identification of the log character codes: when the coding type cannot be judged in the log character coding basic identification step, all byte contents after the (n+1) th byte are identified based on a progressive judgment condition, and whether the coding type belongs to a UTF-8 format is judged.
8. A system for automatically collecting server logs, using the method for automatically collecting server logs according to any one of claims 1 to 7, characterized in that the system comprises:
and the information acquisition module is used for: collecting and transmitting server system information, automatically finding application service process information, acquiring an application service log path based on the application service process information, and transmitting the process information and the application service log path;
log collection configuration management module: receiving the comparison of the server system information and preset system information, acquiring a corresponding system log path, automatically identifying a system log in a server according to the system log path, automatically identifying an application service log in the server based on the application service process information and the application service log path, generating and storing the system log character code and the application service log character code;
the log acquisition module is used for: and reading disk file information according to the system log path and the application service log path, respectively carrying out content analysis through the system log character codes and the application service log character codes, and uniformly transcoding the analyzed system log and application service log into a preset coding format and sending the preset coding format to a receiving end.
9. A computer readable storage medium having stored thereon a computer program, characterized in that the program when executed by a processor realizes the steps of the method of automatic acquisition of server logs according to any of the claims 1-7.
10. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method for automatically collecting server logs according to any of the claims 1-7 when the program is executed by the processor.
CN202310491193.4A 2023-05-05 2023-05-05 Method, system, medium and equipment for automatically collecting server log Pending CN116225854A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310491193.4A CN116225854A (en) 2023-05-05 2023-05-05 Method, system, medium and equipment for automatically collecting server log

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310491193.4A CN116225854A (en) 2023-05-05 2023-05-05 Method, system, medium and equipment for automatically collecting server log

Publications (1)

Publication Number Publication Date
CN116225854A true CN116225854A (en) 2023-06-06

Family

ID=86582890

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310491193.4A Pending CN116225854A (en) 2023-05-05 2023-05-05 Method, system, medium and equipment for automatically collecting server log

Country Status (1)

Country Link
CN (1) CN116225854A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120185936A1 (en) * 2011-01-19 2012-07-19 General Electric Company Systems and Methods for Detecting Fraud Associated with Systems Application Processing
CN105141448A (en) * 2015-07-28 2015-12-09 杭州华为数字技术有限公司 Method and device for collecting log
CN109324996A (en) * 2018-10-12 2019-02-12 平安科技(深圳)有限公司 Journal file processing method, device, computer equipment and storage medium
CN112506755A (en) * 2020-12-18 2021-03-16 北京顺达同行科技有限公司 Log collection method and device, computer equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120185936A1 (en) * 2011-01-19 2012-07-19 General Electric Company Systems and Methods for Detecting Fraud Associated with Systems Application Processing
CN105141448A (en) * 2015-07-28 2015-12-09 杭州华为数字技术有限公司 Method and device for collecting log
CN109324996A (en) * 2018-10-12 2019-02-12 平安科技(深圳)有限公司 Journal file processing method, device, computer equipment and storage medium
CN112506755A (en) * 2020-12-18 2021-03-16 北京顺达同行科技有限公司 Log collection method and device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN103684898A (en) Method and device for monitoring operation of user request in distributed system
CN111866016B (en) Log analysis method and system
CN114548706A (en) Early warning method for business risk and related equipment
US20120303641A1 (en) Method and system for processing log information
CN110210228A (en) A kind of host equipment vulnerability scanning method and system
CN116204385A (en) Computer log monitoring method and system
CN115220995A (en) Agent probe-based micro-service full-link analysis method
CN111224807B (en) Distributed log processing method, device, equipment and computer storage medium
US20020026433A1 (en) Knowledge system and methods of business alerting and business analysis
US6901449B1 (en) System and method for encapsulating data with a formatted data protocol
CN112416557B (en) Method and device for determining call relation, storage medium and electronic device
CN116225854A (en) Method, system, medium and equipment for automatically collecting server log
CN113760634A (en) Data processing method and device
CN114915922B (en) Maritime satellite C system communication call completing rate calculating method, device, medium and equipment
CN111884883A (en) Quick auditing processing method for service interface
CN115033625A (en) Enterprise business data docking method and device and electronic equipment
CN114492324A (en) Component data statistical method and device
CN113407415A (en) Log management method and device of intelligent terminal
CN114726880B (en) Information storage method based on cloud computing
CN111432077A (en) CDR-based normalized flow statistical device and method
CN113342861B (en) Data management method and device in service scene
CN114726766B (en) Fingerprint early warning implementation method, system, medium and equipment based on FTP service monitoring
CN210536660U (en) Data integration system of one-stop operation and maintenance management platform
CN117312104B (en) Visual link tracking method and system based on airport production operation system
KR19990079110A (en) Fault Management Method in Circuit Distribution Device Management System

Legal Events

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