CN111522714A - Log query method and device, electronic equipment and storage medium - Google Patents

Log query method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111522714A
CN111522714A CN202010313538.3A CN202010313538A CN111522714A CN 111522714 A CN111522714 A CN 111522714A CN 202010313538 A CN202010313538 A CN 202010313538A CN 111522714 A CN111522714 A CN 111522714A
Authority
CN
China
Prior art keywords
server
identifier
log
application
deployed
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
CN202010313538.3A
Other languages
Chinese (zh)
Inventor
李秋林
任星旺
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
JD Digital Technology Holdings Co Ltd
Original Assignee
JD Digital Technology Holdings 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 JD Digital Technology Holdings Co Ltd filed Critical JD Digital Technology Holdings Co Ltd
Priority to CN202010313538.3A priority Critical patent/CN111522714A/en
Publication of CN111522714A publication Critical patent/CN111522714A/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/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/10File systems; File servers
    • G06F16/14Details of searching files based on file metadata
    • G06F16/148File search processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/1805Append-only file systems, e.g. using logs or journals to store data
    • G06F16/1815Journaling file systems
    • 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)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Quality & Reliability (AREA)
  • Library & Information Science (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the invention provides a log query method, a log query device, electronic equipment and a storage medium, wherein the method comprises the following steps: acquiring a first server identifier and a first application identifier input by a user; determining a log query condition input by a user; and according to the log query condition, querying a log corresponding to the first server identifier and the first application identifier from a server, wherein the server is used for collecting the log corresponding to the first application deployed on the first server. Therefore, the user can query the log only by inputting the server identifier and the corresponding application identifier, the user operation is simplified, the log query efficiency is improved, and the time and the energy are saved.

Description

Log query method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a log query method and apparatus, an electronic device, and a storage medium.
Background
With the rapid development of computer technology and the internet, the applications deployed on the terminal are more and more extensive, and the functions are more and more powerful. The applications deployed on the terminal generate a large amount of logs during running, such as running logs, safety logs, fault logs and the like, and the logs have very important significance for application running fault diagnosis, application running state analysis and the like, so that collection and query of the logs are gradually emphasized.
In the related art, when a user needs to query logs of some applications, the user needs to query the logs by using a log query instruction through a remote login server. For example, a Java application deployed in Tomcat has a log named as catalina.out file in a fixed directory, and when a user needs to query the log of the Java application, the user logs in a server remotely, enters the directory where the log is located, and queries the log through a tailf command.
Because the server is possibly isolated and cannot directly log in, a trigger is required to be tripped, so that the operation of querying the log by a user is more complicated, the log querying efficiency is lower, and a great deal of time and energy are required to be consumed.
Disclosure of Invention
The embodiment of the invention aims to provide a log query method, a log query device, electronic equipment and a storage medium, so as to achieve the beneficial effects of simplifying user operation, improving log query efficiency and saving time and energy. The specific technical scheme is as follows:
in a first aspect of the embodiments of the present invention, a log query method is first provided, where the method includes:
acquiring a first server identifier and a first application identifier input by a user;
determining a log query condition input by a user;
according to the log query condition, a log corresponding to the first server identifier and the first application identifier is queried from a server;
the server is used for collecting logs corresponding to the first application deployed on the first server.
In an optional embodiment, before performing the method, the method further comprises:
acquiring a second server identifier and a second application identifier;
sending a log acquisition request to a server, so that the server analyzes the second server identifier and the second application identifier carried in the log acquisition request, issues a log collector and a configuration file to a second server corresponding to the second server identifier, and starts the log collector;
the log collector is configured to collect a log of a second application corresponding to the second application identifier deployed on the second server according to the configuration file, and return the log to the server.
In an optional embodiment, the obtaining the second application identifier includes:
determining and displaying a second application identifier of a second application deployed on a second server corresponding to the second server identifier;
and acquiring the second application identifier selected by the user.
In an optional embodiment, the determining and presenting a second application identifier of a second application deployed on a second server corresponding to the second server identifier includes:
under the condition of receiving a query instruction, sending the second server identifier to a server, so that the server queries a second application deployed on a second server corresponding to the second server identifier, and returns a second application identifier of the second application deployed on the second server;
and receiving and displaying a second application identifier of a second application deployed on a second server corresponding to the second server identifier.
In an optional implementation manner, the querying, by the server, a second application deployed on a second server corresponding to the second server identifier includes:
and the server logs in a second server corresponding to the second server identifier through SSH, and inquires a second application deployed on the second server corresponding to the second server identifier.
In an optional implementation manner, before sending the log collection request to the server, the method further includes:
inquiring whether the server has logs corresponding to the second server identifier and the second application identifier;
and under the condition that the server does not have logs corresponding to the second server identifier and the second application identifier, executing a step of sending a log collection request to the server.
In an optional embodiment, the issuing a log collector and a configuration file to a second server corresponding to the second server identifier includes:
determining a configuration file corresponding to the second server identification and the second application identification;
and issuing a log collector and the configuration file to a second server corresponding to the second server identifier.
In a second aspect of the embodiments of the present invention, there is also provided a log query apparatus, including:
the identification acquisition module is used for acquiring a first server identification and a first application identification which are input by a user;
the condition determining module is used for determining log query conditions input by a user;
the log query module is used for querying logs corresponding to the first server identifier and the first application identifier from a server according to the log query condition;
the server is used for collecting logs corresponding to the first application deployed on the first server.
In a third aspect of the embodiments of the present invention, there is further provided an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
a processor, configured to implement the log query method according to any one of the first aspect when executing a program stored in a memory.
In a fourth aspect of the embodiments of the present invention, there is further provided a storage medium, where instructions are stored, and when the storage medium is run on a computer, the storage medium causes the computer to execute the log query method according to any one of the first aspect.
In a fifth aspect of embodiments of the present invention, there is also provided a computer program product containing instructions, which when run on a computer, cause the computer to perform the log querying method of any one of the above first aspects.
According to the technical scheme provided by the embodiment of the invention, the log query condition input by the user is determined by acquiring the first server identifier and the first application identifier input by the user, and the log corresponding to the first server identifier and the first application identifier is queried from the server side according to the log query condition. Therefore, the user can query the log only by inputting the server identifier and the corresponding application identifier, the user operation is simplified, the log query efficiency is improved, and the time and the energy are saved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
Fig. 1 is a schematic architecture diagram of a log query system shown in an embodiment of the present invention;
fig. 2 is a schematic flowchart of an implementation flow of a log query method shown in an embodiment of the present invention;
fig. 3 is a schematic flow chart illustrating an implementation of a log collection method according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a log query device shown in the embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device shown in the embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, are within the scope of the present invention.
In the embodiment of the invention, in order to simplify user operation, improve log query efficiency and save time and energy, a log query condition input by a user is determined by acquiring a first server identifier and a first application identifier input by the user, and a log corresponding to the first server identifier and the first application identifier is queried from a server according to the log query condition.
Specifically, as shown in fig. 1, in the embodiment of the present invention, the client is connected to the server, the server is connected to the N servers, and the log query system may be composed of the client, the server and the N servers. The server and the N servers may be deployed in an intranet, and the server may specifically be an Elasticsearch server, and is configured to collect logs corresponding to applications deployed on the N servers, such as an operation log, a safety log, and a fault log.
Based on the log query system, as shown in fig. 2, an implementation flow diagram of a log query method provided by the embodiment of the present invention is applied to a client, and the method specifically includes the following steps:
s201, acquiring a first server identifier and a first application identifier input by a user;
when a user needs to query a log corresponding to an application deployed on a server, for example, an operation log, a security log, a fault log, and the like, the user may input a first server identifier and a first application identifier on a log query page in a log query system.
For the first server identifier, for example, the server IP address, the server name, the server ID, and the like may be used, and for the first application identifier, for example, the application name, the application ID, and the like may be used, which is not limited in this embodiment of the present invention.
For example, in the embodiment of the present invention, the server IP address and the application name are shown in a list form, the user can freely input the server IP address and the application name according to the actual requirement of the user, and the client obtains the first server IP address (172.168.1.1) and the first application name (application name 1) input by the user.
S202, determining a log query condition input by a user;
in the embodiment of the present invention, the user may input a log query condition according to actual requirements, for example, the user wants to query the last N logs of the application (where N may be 10, 100, 500, 2000 and any number input), and for example, the user wants to scroll the logs of the query application in real time.
When a user inputs a corresponding log query condition, the embodiment of the invention determines the log query condition input by the user, namely any log query condition.
S203, according to the log query condition, a log corresponding to the first server identifier and the first application identifier is queried from a server.
In the embodiment of the present invention, for the server, an index, for example, an Elasticsearch index named by the server identifier and the application identifier, is established according to the server identifier and the application identifier, and a log corresponding to the server identifier and the application identifier is stored in the Elasticsearch index, for example, as shown in table 1 below.
Figure BDA0002458579320000061
TABLE 1
For the query condition determined in the above step, in the embodiment of the present invention, according to the log query condition, the server queries the log corresponding to the first server identifier and the first application identifier, and may display the log corresponding to the first server identifier and the first application identifier. The server is used for collecting logs corresponding to the first application deployed on the first server.
Specifically, according to the log query condition, the embodiment of the present invention may query the log corresponding to the first server identifier and the first application identifier from the Elasticsearch index in the server, and may display the log corresponding to the first server identifier and the first application identifier.
For example, when a user inputs a query application with the last 10 logs, the embodiment of the present invention queries the last 10 logs corresponding to the first server identifier and the first application identifier from the server-side Elasticsearch index; when a user inputs a log of a real-time rolling query application, the embodiment of the invention queries the log corresponding to the first server identifier and the first application identifier from the server-side Elasticissearch index in real time.
Principle for real-time scrolling through logs for query applications: after a user inputs a server IP address and an application name, a client and a server establish socket connection, an Elasticissearch index corresponding to the server IP address and the application name is inquired from an Elasticissearch server, the last log in the Elasticissearch index is inquired, the serial number, namely the starting serial number (from), is obtained, a certain number of logs (size, such as 100 logs) are obtained each time, the logs in the Elasticissearch index are inquired according to the from + size, the logs are sent to the client through the socket connection and displayed, and the process is circulated until the user decides to stop inquiring and close the socket connection.
Through the above description of the technical solution provided by the embodiment of the present invention, the log query condition input by the user is determined by obtaining the first server identifier and the first application identifier input by the user, and the log corresponding to the first server identifier and the first application identifier is queried from the server according to the log query condition. Therefore, the user can query the log only by inputting the server identifier and the corresponding application identifier, the user operation is simplified, the log query efficiency is improved, and the time and the energy are saved.
Based on the log query system, as shown in fig. 3, an implementation flow diagram of a log collection method provided by the embodiment of the present invention is applied to a client, and the method specifically includes the following steps:
s301, acquiring a second server identifier and a second application identifier;
in the embodiment of the present invention, when a user needs to acquire a log corresponding to an application deployed on a certain server, a second server identifier and a second application identifier may be input on a log acquisition page of a log query system, where the second server identifier and the second application identifier uniquely specify an object of the log to be acquired.
The server identifier may be a server IP address, a server ID, a server name, and the like, which is not limited in this embodiment of the present invention. For example, the embodiment of the present invention obtains the IP address of the second server input by the user: 172.168.1.1, and a second application name: java application 1.
The embodiment of the invention obtains the second server identifier, determines and displays the second application identifier of the second application deployed on the second server corresponding to the second server identifier, and obtains the second application identifier input by the user, so that the second server identifier and the second application identifier can also be obtained.
For example, the user may input a second server IP address (172.168.1.1) on a log collection page of the log query system, and in the embodiment of the present invention, a second application identifier of a second application deployed on a second server corresponding to the second server IP address (172.168.1.1) may be determined and presented for selection, and the user may select one or more of the second application identifiers for log collection, so as to obtain the second application identifier selected by the user, that is, the log collection object selected by the user.
Specifically, under the condition that an inquiry instruction is received, the client sends the second server identifier to the server, so that the server inquires the second application deployed on the second server corresponding to the second server identifier and returns the second application identifier of the second application deployed on the second server, and the client receives and displays the second application identifier of the second application deployed on the second server corresponding to the second server identifier and can display the second application identifier in a list form.
In this way, the client may determine and display the second application identifier of the second application deployed on the second server corresponding to the second server identifier, and the application identifier may be an application name, an application ID, or the like. In addition, the server side can also return a log path of the second application, and the log path can be displayed in a list form in the embodiment of the invention.
For the second server identifier and the second application identifier, the second server identifier and the second application identifier may be used to establish an Elasticsearch index, and the globally unique identifier may determine the corresponding log. For the log path, the path may be the path of the log file to be queried.
For example, for the IP address (172.168.1.1), when the user clicks the query button, a query instruction is triggered, and the embodiment of the present invention may receive the query instruction triggered by the user, send the IP address to the server, so that the server may receive the IP address, query the second application deployed on the second server corresponding to the IP address, and return the application identifier of the second application and the log path of the second application to the client, and the client may receive and display the second application identifier of the second application deployed on the second server and the log path of the second application, as shown in table 2 below.
IP address Application name Log path
172.168.1.1 Application name 1 Log Path 1
172.168.1.1 Application name 2 Log Path 2
…… …… ……
TABLE 2
The server may log in a second server corresponding to the second server identifier through an SSH (Secure Shell, Secure Shell protocol), and query a second application deployed on the second server corresponding to the second server identifier. The user name and the password used in the login process may be predetermined, which is not limited in the embodiment of the present invention.
S302, sending a log acquisition request to a server, so that the server analyzes the second server identifier and the second application identifier carried in the log acquisition request, issuing a log collector and a configuration file to a second server corresponding to the second server identifier, and starting the log collector;
in the embodiment of the present invention, after obtaining the second server identifier and the second application identifier, the client may send a log collection request to the server, where the log collection request carries the second server identifier and the second application identifier.
The server side can receive the log acquisition request, analyze a second server identifier and a second application identifier carried in the log acquisition request, issue a log collector and a configuration file to a second server corresponding to the second server identifier, and start the log collector.
The log collector is used for collecting logs of a second application corresponding to a second application identifier deployed on a second server according to the configuration file and returning the logs to the server.
For example, the log collector may be filehead software, and for the configuration file, for example, the configuration file may be a dynamically generated configuration file, yml, where the configuration file includes a second server identifier and a second application identifier for collecting a log, which is not limited in the embodiment of the present invention.
In this way, the server may determine the configuration file corresponding to the second server identifier and the second application identifier, and issue the log collector and the configuration file to the second server corresponding to the second server identifier.
For example, the configuration file may correspond to a second server identification and a second application identification, as shown in table 3 below.
Figure BDA0002458579320000091
Figure BDA0002458579320000101
TABLE 3
The server may determine the configuration file corresponding to 172.168.1.1 and Java application 1, and issue a journal logger and the configuration file to the second server.
In addition, before sending a log acquisition request to a server, inquiring whether the server has a log corresponding to the second server identifier and the second application identifier; sending a log acquisition request to the server under the condition that the log corresponding to the second server identifier and the second application identifier does not exist in the server; and under the condition that the server has the logs corresponding to the second server identifier and the second application identifier, the log collection of the second application deployed on the second server is represented, that is, the log query system does not need to be accessed again.
Furthermore, for a second application deployed on a second server that has performed log collection, the embodiment of the present invention may stop log collection, that is, remove access to the log query system, and therefore, may send a log collection stop request to the server, where the log collection stop request carries a second server identifier and a second application identifier, and the server receives the log collection stop request, analyzes the second server identifier and the second application identifier carried in the log collection stop request, stops running a log collector on the second server corresponding to the second server identifier, and deletes a configuration file corresponding to the second server identifier and the second application identifier.
Corresponding to the foregoing method embodiment, an embodiment of the present invention further provides a log query apparatus, as shown in fig. 4, where the apparatus may include: an identification acquisition module 410, a condition determination module 420, and a log query module 430.
An identifier obtaining module 410, configured to obtain a first server identifier and a first application identifier input by a user;
a condition determining module 420, configured to determine a log query condition input by a user;
a log query module 430, configured to query, from a server, a log corresponding to the first server identifier and the first application identifier according to the log query condition;
the server is used for collecting logs corresponding to the first application deployed on the first server.
In a specific implementation manner of the embodiment of the present invention, the apparatus further includes:
an obtaining module 440, configured to obtain a second server identifier and a second application identifier;
a request sending module 450, configured to send a log acquisition request to a server, so that the server analyzes the second server identifier and the second application identifier carried in the log acquisition request, issues a log collector and a configuration file to a second server corresponding to the second server identifier, and starts the log collector;
the log collector is configured to collect a log of a second application corresponding to the second application identifier deployed on the second server according to the configuration file, and return the log to the server.
In a specific implementation manner of the embodiment of the present invention, the obtaining module 440 includes:
the identifier determining submodule 441 is configured to determine and display a second application identifier of a second application deployed on a second server corresponding to the second server identifier;
the second obtaining sub-module 442 is configured to obtain the second application identifier selected by the user.
In a specific implementation manner of the embodiment of the present invention, the identifier determining submodule 441 is specifically configured to:
under the condition of receiving a query instruction, sending the second server identifier to a server, so that the server queries a second application deployed on a second server corresponding to the second server identifier, and returns a second application identifier of the second application deployed on the second server;
and receiving and displaying a second application identifier of a second application deployed on a second server corresponding to the second server identifier.
In a specific implementation manner of the embodiment of the present invention, the querying, by the server, a second application deployed on a second server corresponding to the second server identifier includes:
and the server logs in a second server corresponding to the second server identifier through SSH, and inquires a second application deployed on the second server corresponding to the second server identifier.
In a specific implementation manner of the embodiment of the present invention, the apparatus further includes:
the query module 460 is configured to query whether the server has a log corresponding to the second server identifier and the second application identifier;
and under the condition that the server does not have logs corresponding to the second server identifier and the second application identifier, executing a step of sending a log collection request to the server.
In a specific implementation manner of the embodiment of the present invention, the issuing a log collector and a configuration file to a second server corresponding to the second server identifier includes:
determining a configuration file corresponding to the second server identification and the second application identification;
and issuing a log collector and the configuration file to a second server corresponding to the second server identifier.
An embodiment of the present invention further provides an electronic device, as shown in fig. 5, including a processor 51, a communication interface 52, a memory 53 and a communication bus 54, where the processor 51, the communication interface 52, and the memory 53 complete mutual communication through the communication bus 54,
a memory 53 for storing a computer program;
the processor 51 is configured to implement the following steps when executing the program stored in the memory 53:
acquiring a first server identifier and a first application identifier input by a user; determining a log query condition input by a user; according to the log query condition, a log corresponding to the first server identifier and the first application identifier is queried from a server; the server is used for collecting logs corresponding to the first application deployed on the first server.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
In another embodiment of the present invention, there is also provided a storage medium having stored therein instructions, which when run on a computer, cause the computer to execute the log query method described in any one of the above embodiments.
In yet another embodiment of the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the log query method of any of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored on a storage medium or transmitted from one storage medium to another, for example, from one website, computer, server, or data center to another website, computer, server, or data center via wire (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The storage medium may be any available medium that can be accessed by a computer or a data storage device including one or more available media integrated servers, data centers, and the like. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (10)

1. A method of log querying, the method comprising:
acquiring a first server identifier and a first application identifier input by a user;
determining a log query condition input by a user;
according to the log query condition, a log corresponding to the first server identifier and the first application identifier is queried from a server;
the server is used for collecting logs corresponding to the first application deployed on the first server.
2. The method of claim 1, further comprising, prior to performing the method:
acquiring a second server identifier and a second application identifier, wherein the second application identifier is an identifier of a second application deployed on a second server;
sending a log acquisition request to a server, so that the server analyzes the second server identifier and the second application identifier carried in the log acquisition request, issues a log collector and a configuration file to a second server corresponding to the second server identifier, and starts the log collector;
the log collector is configured to collect a log of a second application corresponding to the second application identifier deployed on the second server according to the configuration file, and return the log to the server.
3. The method of claim 2, wherein the obtaining the second application identifier comprises:
determining and displaying a second application identifier corresponding to the second server identifier;
and acquiring the second application identifier selected by the user.
4. The method of claim 3, wherein determining and presenting the second application identifier of the second application deployed on the second server corresponding to the second server identifier comprises:
under the condition of receiving a query instruction, sending the second server identifier to a server, so that the server queries a second application deployed on a second server corresponding to the second server identifier, and returns a second application identifier of the second application deployed on the second server;
and receiving and displaying a second application identifier of a second application deployed on a second server corresponding to the second server identifier.
5. The method of claim 4, wherein the querying, by the server, the second application deployed on the second server corresponding to the second server identifier comprises:
and the server logs in a second server corresponding to the second server identifier through SSH, and inquires a second application deployed on the second server corresponding to the second server identifier.
6. The method of claim 2, wherein before sending the log collection request to the server, the method further comprises:
inquiring whether the server has logs corresponding to the second server identifier and the second application identifier;
and under the condition that the server does not have logs corresponding to the second server identifier and the second application identifier, executing a step of sending a log collection request to the server.
7. The method of claim 2, wherein the issuing a log collector and a configuration file to a second server corresponding to the second server identifier comprises:
determining a configuration file corresponding to the second server identification and the second application identification;
and issuing a log collector and the configuration file to a second server corresponding to the second server identifier.
8. An apparatus for log query, the apparatus comprising:
the identification acquisition module is used for acquiring a first server identification and a first application identification which are input by a user;
the condition determining module is used for determining log query conditions input by a user;
the log query module is used for querying logs corresponding to the first server identifier and the first application identifier from a server according to the log query condition;
the server is used for collecting logs corresponding to the first application deployed on the first server.
9. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any one of claims 1 to 7 when executing a program stored in the memory.
10. A storage medium on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 7.
CN202010313538.3A 2020-04-20 2020-04-20 Log query method and device, electronic equipment and storage medium Pending CN111522714A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010313538.3A CN111522714A (en) 2020-04-20 2020-04-20 Log query method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010313538.3A CN111522714A (en) 2020-04-20 2020-04-20 Log query method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111522714A true CN111522714A (en) 2020-08-11

Family

ID=71901734

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010313538.3A Pending CN111522714A (en) 2020-04-20 2020-04-20 Log query method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111522714A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112231287A (en) * 2020-09-06 2021-01-15 厦门天锐科技股份有限公司 System log processing method and device, electronic equipment and medium
CN113010377A (en) * 2021-03-03 2021-06-22 中国工商银行股份有限公司 Method and device for collecting operation logs of operation
CN113918526A (en) * 2021-10-12 2022-01-11 平安国际智慧城市科技股份有限公司 Log processing method and device, computer equipment and storage medium
CN115277382A (en) * 2022-07-27 2022-11-01 腾讯音乐娱乐科技(深圳)有限公司 Log acquisition method, log platform and computer program product

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105205167A (en) * 2015-10-10 2015-12-30 国网信息通信产业集团有限公司 Log data system
CN106559241A (en) * 2015-09-29 2017-04-05 阿里巴巴集团控股有限公司 Using the collection of daily record, sending method, device, system and log server
CN108737467A (en) * 2017-04-19 2018-11-02 腾讯科技(深圳)有限公司 A kind of server log inspection method, device and system
CN109800223A (en) * 2018-12-12 2019-05-24 平安科技(深圳)有限公司 Log processing method, device, electronic equipment and storage medium
WO2019140828A1 (en) * 2018-01-17 2019-07-25 平安科技(深圳)有限公司 Electronic apparatus, method for querying logs in distributed system, and storage medium
CN110781143A (en) * 2019-11-05 2020-02-11 北纬通信科技南京有限责任公司 Method and device for querying and extracting server logs
CN110851234A (en) * 2019-10-25 2020-02-28 中信梧桐港供应链管理有限公司 Log processing method and device based on docker container

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106559241A (en) * 2015-09-29 2017-04-05 阿里巴巴集团控股有限公司 Using the collection of daily record, sending method, device, system and log server
CN105205167A (en) * 2015-10-10 2015-12-30 国网信息通信产业集团有限公司 Log data system
CN108737467A (en) * 2017-04-19 2018-11-02 腾讯科技(深圳)有限公司 A kind of server log inspection method, device and system
WO2019140828A1 (en) * 2018-01-17 2019-07-25 平安科技(深圳)有限公司 Electronic apparatus, method for querying logs in distributed system, and storage medium
CN109800223A (en) * 2018-12-12 2019-05-24 平安科技(深圳)有限公司 Log processing method, device, electronic equipment and storage medium
CN110851234A (en) * 2019-10-25 2020-02-28 中信梧桐港供应链管理有限公司 Log processing method and device based on docker container
CN110781143A (en) * 2019-11-05 2020-02-11 北纬通信科技南京有限责任公司 Method and device for querying and extracting server logs

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112231287A (en) * 2020-09-06 2021-01-15 厦门天锐科技股份有限公司 System log processing method and device, electronic equipment and medium
CN113010377A (en) * 2021-03-03 2021-06-22 中国工商银行股份有限公司 Method and device for collecting operation logs of operation
CN113918526A (en) * 2021-10-12 2022-01-11 平安国际智慧城市科技股份有限公司 Log processing method and device, computer equipment and storage medium
CN115277382A (en) * 2022-07-27 2022-11-01 腾讯音乐娱乐科技(深圳)有限公司 Log acquisition method, log platform and computer program product
CN115277382B (en) * 2022-07-27 2024-06-04 腾讯音乐娱乐科技(深圳)有限公司 Log acquisition method, log platform and computer program product

Similar Documents

Publication Publication Date Title
CN111522714A (en) Log query method and device, electronic equipment and storage medium
US10999384B2 (en) Method and system for identifying website visitors
US9444899B2 (en) Use of internet information services logging to collect user information in an asynchronous manner
WO2021189954A1 (en) Log data processing method and apparatus, computer device, and storage medium
CN106302595B (en) Method and equipment for carrying out health check on server
CN103593419A (en) Method, device, server and system for inquiring data
CN109669980B (en) Cross-database access method and device for data
CN107239701B (en) Method and device for identifying malicious website
CN108647240B (en) Method and device for counting access amount, electronic equipment and storage medium
CN111711533B (en) Fault diagnosis method, fault diagnosis device, electronic device and storage medium
US20150222649A1 (en) Method and apparatus for processing a webpage
WO2020088170A1 (en) Domain name system configuration method and related apparatus
CN109491733B (en) Interface display method based on visualization and related equipment
CN110737634A (en) Log searching method, client, server and computer readable storage medium
CN110430070B (en) Service state analysis method, device, server, data analysis equipment and medium
CN116055551A (en) Information pushing method, device and system, electronic equipment and storage medium
CN111522836A (en) Data query method and device, electronic equipment and storage medium
CN109862074B (en) Data acquisition method and device, readable medium and electronic equipment
CN114844771A (en) Monitoring method, device, storage medium and program product for micro-service system
CN112866062B (en) Distributed pressure test system, method, device, equipment and storage medium
CN107357562B (en) Information filling method, device and client
CN112988589A (en) Interface testing method, device and system
CN110737861A (en) webpage data processing method, device, equipment and storage medium
CN116545905A (en) Service health detection method and device, electronic equipment and storage medium
CN111752964A (en) Data processing method and device based on data interface

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
CB02 Change of applicant information

Address after: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant after: Jingdong Technology Holding Co.,Ltd.

Address before: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant before: Jingdong Digital Technology Holding Co.,Ltd.

Address after: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant after: Jingdong Digital Technology Holding Co.,Ltd.

Address before: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant before: JINGDONG DIGITAL TECHNOLOGY HOLDINGS Co.,Ltd.

CB02 Change of applicant information