[go: up one dir, main page]

CN108737467B - Server log viewing method, device and system - Google Patents

Server log viewing method, device and system Download PDF

Info

Publication number
CN108737467B
CN108737467B CN201710256890.6A CN201710256890A CN108737467B CN 108737467 B CN108737467 B CN 108737467B CN 201710256890 A CN201710256890 A CN 201710256890A CN 108737467 B CN108737467 B CN 108737467B
Authority
CN
China
Prior art keywords
log
log data
server
service server
service
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.)
Active
Application number
CN201710256890.6A
Other languages
Chinese (zh)
Other versions
CN108737467A (en
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201710256890.6A priority Critical patent/CN108737467B/en
Publication of CN108737467A publication Critical patent/CN108737467A/en
Application granted granted Critical
Publication of CN108737467B publication Critical patent/CN108737467B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/22Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks comprising specially adapted graphical user interfaces [GUI]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • H04L67/63Routing a service request depending on the request content or context

Landscapes

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

Abstract

The invention discloses a method, a device and a system for checking a server log, which are used for reducing the processing load of a log server and improving the processing speed of server log storage and query. The server log viewing method comprises the following steps: receiving a log data query request sent by a requester, wherein the log data query request carries a service identifier; determining at least one service server identifier corresponding to the service identifier carried in the log data query request according to the corresponding relation between the service identifier and the service server identifier which is created in advance; according to the determined at least one service server identification, sending a log data acquisition request to a corresponding service server, wherein the log data of the self-running service is stored in the service server; receiving log data returned by the service server aiming at the log data acquisition request; and sending the received log data to the requester.

Description

Server log viewing method, device and system
Technical Field
The invention relates to the technical field of computers, in particular to a server log viewing method, device and system.
Background
This section is intended to provide a background or context to the embodiments of the invention that are recited in the claims. The description herein is not admitted to be prior art by inclusion in this section.
The server log records various kinds of original information such as a server reception processing request and a runtime error. By counting, analyzing and integrating the log, the operation state of the server can be effectively mastered, error reasons can be found and eliminated, user access distribution can be known, and the maintenance and management of the system can be better enhanced.
Since a service may be deployed on multiple servers, in order to facilitate a user to view a server log, a centralized management manner is usually adopted, as shown in fig. 1, which is a schematic diagram of a network structure in which a server log is stored in the prior art, and includes at least one service server 11, a log server 12 and a user terminal 13. The log server 12 is deployed with a storage system, each service server 11 sends server log data generated in the running process to the storage system of the log server 12 through a log client running on the service server for unified storage, and when a user needs to query the log data, the user terminal 13 can send a request to the log server to obtain a server log according to the actual requirement of the user.
Therefore, in the prior art, the log server uniformly stores the log data generated by each service server and responds to the log data query requests initiated by all the user terminals, namely, the storage and query request processing of the server logs are all borne by the log server, so that the processing load of the log server is increased, and the processing speed of the log data storage and query is reduced. If the storage request and the log data query request at the same time have large processing capacity, even the log server may be down in serious cases, and the stability of log data storage and query is reduced.
Disclosure of Invention
The embodiment of the invention provides a server log checking method, a server log checking device and a server log checking system, which are used for reducing the processing load of a log server and improving the processing speed of server log storage and query.
The embodiment of the invention provides a server log viewing method, which comprises the following steps:
receiving a log data query request sent by a requester, wherein the log data query request carries a service identifier;
determining at least one service server identifier corresponding to the service identifier carried in the log data query request according to the corresponding relation between the service identifier and the service server identifier which is created in advance;
according to the determined at least one service server identification, sending a log data acquisition request to a corresponding service server, wherein the log data of the self-running service is stored in the service server;
receiving log data returned by the service server aiming at the log data acquisition request;
and sending the received log data to the requester.
The embodiment of the invention provides a server log viewing device, which comprises:
the system comprises a first receiving unit, a second receiving unit and a third receiving unit, wherein the first receiving unit is used for receiving a log data query request sent by a requester, and the log data query request carries a service identifier;
a determining unit, configured to determine, according to a correspondence between a service identifier and a service server identifier that are created in advance, at least one service server identifier corresponding to the service identifier that is carried in the log data query request;
the first sending unit is used for sending a log data acquisition request to a corresponding service server according to the determined at least one service server identifier, wherein the service server stores log data of self-running services;
a second receiving unit, configured to receive log data returned by the service server in response to the log data acquisition request;
and the second sending unit is used for sending the received log data to the requester.
The embodiment of the invention provides a log server which comprises the server log viewing device.
The embodiment of the invention provides a server log viewing system, which comprises:
the system comprises a user terminal, a log server and a service server, wherein the user terminal is used for sending a log data query request to the log server, and the log data query request carries a service identifier;
the log server is used for determining at least one service server identifier corresponding to the service identifier carried in the log data query request according to the correspondence between the service identifier and the service server identifier which are created in advance; according to the determined at least one service server identification, sending a log data acquisition request to a corresponding service server; after receiving the log data returned by the service server, sending the received log data to the user terminal;
the service server is used for storing log data generated in the running process; and when receiving a log data acquisition request sent by the log server, returning log data to the log server according to the log data acquisition request.
According to the server log viewing method, the device and the system and the log server provided by the embodiment of the invention, log storage and log viewing functions are separated, wherein log data are stored in the local service servers, so that the log storage is dispersed on a plurality of service servers, and the requirement on the storage performance of the log server is reduced; when the server log data needs to be queried, the log data query requests can be dispersed to the corresponding service servers through the log servers for processing, so that the processing load of the log servers is reduced, and the processing speed of log storage and log query is increased.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the invention and not to limit the invention. In the drawings:
FIG. 1 is a diagram illustrating a network structure of server log storage in the prior art;
FIG. 2 is a schematic diagram of a network structure of server log storage according to an embodiment of the present invention;
FIG. 3 is a schematic diagram illustrating an implementation flow of a server log viewing method according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a visual interaction page according to an embodiment of the present invention;
FIG. 5 is a schematic flow chart illustrating a process of a user viewing log data of a service in an implementation of the present invention;
FIG. 6 is a schematic diagram of a server log viewing device in accordance with an embodiment of the present invention;
FIG. 7 is a schematic diagram of a server log viewing system in accordance with an embodiment of the present invention.
Detailed Description
In order to reduce the processing load of a log server and improve the processing speed of log storage and log query, the embodiment of the invention provides a server log viewing method, a device and a system and a log server.
The preferred embodiments of the present invention will be described below with reference to the accompanying drawings of the specification, it being understood that the preferred embodiments described herein are merely for illustrating and explaining the present invention, and are not intended to limit the present invention, and that the embodiments and features of the embodiments in the present invention may be combined with each other without conflict.
As shown in fig. 2, which is a schematic diagram of a network structure of server log storage in an embodiment of the present invention, including a log server 21, a service server 22 and a user terminal 23, different from the prior art, in the embodiment of the present invention, the log server 21 does not separately deploy a storage system, but the service server 22 stores log data generated in its operation process, and when a user needs to query a server log, the log server 21 can initiate a log data query request to the log server 21 through the user terminal 23, and the log server 21 distributes the log data query request to the corresponding service server 22 for processing, so that according to the embodiment of the present invention, log storage and log data query request processing can be distributed to multiple service servers 22, thereby reducing the processing load of the log server 21, and reducing the requirements on storage performance and request processing performance of the log server 21, the processing speed of log storage and log query is improved.
A server log viewing method according to an exemplary embodiment of the present invention is described below with reference to fig. 3 in conjunction with the network configuration diagram of fig. 2. It should be noted that fig. 2 is only illustrated for the convenience of understanding the spirit and principle of the present invention, and the embodiments of the present invention are not limited in any way in this respect. Rather, embodiments of the present invention may be applied to any scenario where applicable.
Example one
As shown in fig. 3, which is a schematic implementation flow diagram of a server log viewing method provided by an embodiment of the present invention, the method may include the following steps:
and S31, receiving the log data query request sent by the requester.
In specific implementation, when a user needs to query log data, the user terminal can initiate a log data query request to the log server.
Preferably, in implementation, the user can access the log server through a browser. In order to improve user experience, the embodiment of the invention also provides a visual interactive interface for a user to access the log server, and the user can submit a log data query request to the log server through the visual interface.
In the visual interactive interface, a user can configure in advance for each service deployed on the service server. When initially creating the service, the user needs to create a correspondence between the service identifier and the identifier of the service server that deploys the service. Each service may be deployed on one server or multiple servers, if a service is deployed on one server, the configured service server identifier may be one, and if a service is deployed on multiple servers, the configured service server identifier may be multiple, where the service identifier may be a service name or a service number, and the service server identifier may be a service server IP address, which is not limited in the embodiment of the present invention. After the configuration is completed, the user may modify or view the corresponding configuration of the service through the visual interactive interface, as shown in fig. 4, which is a possible schematic diagram of the visual interactive interface provided by the embodiment of the present invention.
After the configuration information of the service is completed, a user can initiate a log data query request to the log server through a visual interaction interface, and the log data query request carries a service identifier corresponding to the service for which the user wants to query the log data.
Preferably, in the implementation, the user may also pre-configure log configuration information such as a log path and a log directory of each service, and carry the corresponding log path and log directory when sending a log data query request to the log server. As shown in table 1, it is a structural schematic of a database table of a correspondence relationship between a service identifier and a server identifier that are configured in advance and log configuration information:
TABLE 1
Figure BDA0001273662280000061
S32, determining at least one service server identifier corresponding to the service identifier carried in the log data query request according to the correspondence between the service identifier and the service server identifier created in advance.
In this step, if the log data query request carries a service identifier, the corresponding service server identifier may be found according to a service identifier and a service server identifier that are created in advance, and taking the service identifier carried in the log query request as B1 as an example, the log server may determine that the server identifier corresponding to B1 is { S1, S2, S3 }.
And S33, according to the determined at least one service server identification, sending a log data acquisition request to the corresponding service server.
And sending a log data acquisition request to the corresponding service server according to the determined service server identifier. And if a plurality of service server identifications corresponding to the service identification exist, respectively sending log data acquisition requests to the service server corresponding to each determined service server identification.
If the log data query request also carries log configuration information, the log server also needs to carry the log configuration information when sending a log data acquisition request to the service server, and the service server searches corresponding log data according to the log configuration information and returns the corresponding log data to the log server.
And S34, receiving the log data returned by the service server aiming at the log data acquisition request.
In specific implementation, after receiving a log acquisition request sent by the log server, the service server may read log data from local and return the log data.
And S35, sending the received log data to the requester.
In this step, the received log data is sent to the requester.
Example two
In specific implementation, the service server, the log server, and the user terminal may establish a TCP (Transmission Control Protocol) connection for communication. The TCP connection comprises a long connection and a short connection, wherein the short connection means that when two communication parties have data interaction, a connection is established, and after the data transmission is completed, the connection is disconnected, namely, only one service is transmitted in each connection. In the application scene of long connection, the client and the server are always connected, and the client and the server can send or receive information to each other at any time. In a C/S (client/server) architecture, TCP connections are typically client initiated and the server does not actively request a connection to be established with the client. According to the embodiment of the invention, after receiving the log data query request, the log server needs to actively request the service server to acquire the corresponding log data, so that in order to improve the response speed of log query and support real-time log data query, the log server and the service server can establish long connection. In specific implementation, a log client can be operated or a log query thread can be established on the service server side, and long connection with the log server can be established. When the log server needs to acquire the log data, the log server can send a log data acquisition request to the service server in real time through the long connection.
Similarly, the user terminal and the log server may also send the log data query request by establishing a long connection, and certainly, the user terminal and the log server may also establish a short connection to send the log data query request, which is not limited in the embodiment of the present invention.
Preferably, in a specific implementation, to avoid malicious connection and ensure security of log data access, a user may pre-configure a port number list and/or a service server identifier (for example, an IP address of a service server) list of clients allowed to establish a long connection, when a log client deployed on the service server requests to establish a TCP connection with the log server, the log server first determines whether the port number of the client requesting to establish the connection or the service server identifier is in the stored list after receiving the TCP connection establishment request, and if so, after establishing a TCP connection with the client, the TCP connection established with the client is kept unreleased. Otherwise, the client-initiated TCP connection establishment request may be denied, or a short connection may be established with the client.
EXAMPLE III
In order to meet the diversified requirements of the user, the third embodiment can provide a log query function according to different requirements of the user on the basis of the first embodiment. Based on this, the server log viewing method provided in the embodiment of the present invention may further include a log data filtering condition in the daily indication query request, and preferably, the log filtering condition may include at least one of the following: log query time period, log query keywords, and log level information. The log level is that an identifier is added to each log according to the importance degree of each log, different identifiers represent different levels, and the log level generally comprises: TRACE, DEBUG, INFO, WARN, ERROR, and FATAL.
Based on this, if the received log data query request carries the log data filtering condition, the log data acquiring request sent to the service server in step S32 also carries the log data filtering condition, and after receiving the log data acquiring request, the service server can screen out the log data meeting the condition by using the log data filtering condition carried in the log data acquiring request, return the log data to the log server, and send the log data to the user terminal by the log server.
In specific implementation, the query keyword may be an inclusion keyword, that is, the log data to be queried includes the query keyword, or an exclusion keyword, that is, the log data to be queried does not include the query keyword.
In specific implementation, a user can query real-time log data and historical log data, and if the user needs to query the historical log data, the log data query request can carry a start-stop time period of the log data expected to be queried. Therefore, the log server needs to carry corresponding start-stop time periods in the log data acquisition request sent to the service server, the service server searches the log data of the corresponding time periods according to the start-stop time periods and returns the log data to the log server, and the log server sends the log data to the user terminal.
For better understanding of the embodiment of the present invention, a detailed description is given below to a specific implementation process of the embodiment of the present invention in conjunction with a flow of a user viewing log data of a certain service.
When initially deploying the service, the user configures the service through the visual interaction interface to establish a corresponding relationship between the service identifier and the service server deploying the service, and further, the user can configure log configuration information such as a log path and a log directory of the service. After the service is created, the user can send a log data query request to the log server through the visual interactive interface. It should be understood that before the user terminal sends the log data query request to the log server, a communication connection needs to be established with the log server, where the communication connection may be a short TCP connection or a long TCP connection, and similarly, in order to facilitate the log server to obtain the log data from the service server at any time according to the user request, the log server may establish a long TCP connection with the log client running on the service server, as shown in fig. 5, a process of the user checking the log data of a certain service may include the following steps:
s51, the user submits the access request to the log server through the browser installed on the user terminal.
In particular, the user can input http:// xxx.
And S52, returning the visual interactive page to the user by the log server.
In this step, after receiving the access request submitted by the user, the log server returns the page shown in fig. 4 to the user terminal.
S53, the user submits the log data inquiry request to the log server through the visual interactive page.
In this step, the user selects the service identifier of the service requiring log data query through the visual interactive page, and preferably, the user can also input query keywords and exclude keywords through the visual interactive page, and select log level information and the like through the visual interactive page. According to the input information or selection of the user, the log data query request sent by the user terminal to the log server carries a service identifier and a query keyword, and information such as the keyword, a start-stop time period of log data to be queried, a log path or a log directory and the like is excluded.
And S54, the log server sends a log data acquisition request to the corresponding service server according to the log data query request.
In this step, the log server determines the corresponding service server identifier according to the service identifier carried in the log data query request, and sends a log data acquisition request to the corresponding service server through the long connection established between the log server and the service server, and preferably, the log data request may carry a log directory or a log path of the log data to be acquired. If the log query request carries information such as query keywords, exclusion keywords, log configuration information or start and stop time periods, the log server carries the information in the log data acquisition request sent to the service server.
S55, the service server searches corresponding log data for the log data acquisition request.
In this step, the service server that receives the log data acquisition request acquires corresponding log data according to a log directory or a log path, etc. carried in the received log data acquisition request. If the log obtaining request also carries information such as query keywords, exclusion keywords, log levels and the like, the service server needs to screen out log data meeting the conditions.
And S56, the service server returns the searched log data to the log server.
And S57, the log server sends the log data returned by the service server to the user terminal.
According to the server log viewing method provided by the embodiment of the invention, the log storage function and the log viewing function are separated, wherein the log data are stored in the local service servers, so that the log storage is dispersed on a plurality of service servers, and the requirement on the storage performance of the log servers is reduced; when the server log data needs to be queried, the log data query requests can be dispersed to the corresponding service servers through the log servers for processing, so that the processing load of the log servers is reduced, and the processing speed of log storage and log query is increased.
Based on the same inventive concept, the embodiment of the invention also provides a server log viewing device, a system and a corresponding log server, and because the principle of solving the problems of the device, the system and the equipment is similar to the server log viewing method, the implementation of the device, the system and the equipment can refer to the implementation of the method, and repeated parts are not repeated.
As shown in fig. 6, a schematic structural diagram of a server log viewing apparatus provided in an embodiment of the present invention includes:
a first receiving unit 61, configured to receive a log data query request, where the log data query request carries a service identifier;
a determining unit 62, configured to determine, according to a correspondence between a service identifier and a service server identifier that are created in advance, at least one service server identifier corresponding to the service identifier that is carried in the log data query request;
a first sending unit 63, configured to send a log data acquisition request to a corresponding service server according to the determined at least one service server identifier, where log data of a service running by the service server is stored in the service server;
a second receiving unit 64, configured to receive log data returned by the service server in response to the log data obtaining request;
a second sending unit 65, configured to send the received log data to the requester.
Optionally, the server log viewing apparatus provided in the embodiment of the present invention may further include a first communication connection establishing unit, where:
the first communication connection establishing unit is used for establishing long connection with the service server before the first sending unit sends a log data acquisition request to the corresponding service server according to the determined at least one service server identifier;
the first sending unit 63 is specifically configured to send a log data obtaining request to the service server through a long connection established between the first sending unit and the service server according to the determined at least one service server identifier.
Optionally, the server log viewing apparatus provided in the embodiment of the present invention may further include a second communication connection establishing unit, where:
the second communication connection establishing unit is used for establishing long connection with the requesting party;
the first receiving unit 61 is specifically configured to receive a log data query request sent by a requester through an established long connection.
Preferably, the log data query request carries a service identifier.
Preferably, the log data query request carries log configuration information, and the log configuration information includes log directory information and/or log path information; the first sending unit 63 is specifically configured to send a log data acquisition request to a corresponding service server according to the determined at least one service server identifier, where the log data acquisition request carries the log configuration information; the second receiving unit 64 is specifically configured to receive log data returned by the service server in response to the log data obtaining request, where the log data is obtained by the service server through screening from log data stored in the service server according to the log configuration information.
Preferably, the log data query request further carries a log data filtering condition. The first sending unit 63 is specifically configured to send a log data obtaining request to a corresponding service server according to the determined at least one service server identifier, where the log data obtaining request carries the log data filtering condition; the second receiving unit 64 is specifically configured to receive log data returned by the service server in response to the log data obtaining request, where the log data is screened by the service server from log data stored in the service server according to the log data filtering condition.
Preferably, the log data filtering condition includes at least one of: log query time period, log query keywords, and log level information.
For convenience of description, the above parts are separately described as modules (or units) according to functional division. Of course, the functionality of the various modules (or units) may be implemented in the same or in multiple pieces of software or hardware in practicing the invention. For example, the server log viewing device described above may be provided in a log server.
As shown in fig. 7, which is a schematic structural diagram of a server viewing system according to an embodiment of the present invention, the server viewing system may include a user terminal 71, a log server 72, and at least one service server 73, where:
the user terminal 71 is configured to send a log data query request to the log server, where the log data query request carries a service identifier;
the log server 72 is configured to determine, according to a correspondence between a service identifier and a service server identifier that are created in advance, at least one service server identifier corresponding to the service identifier carried in the log data query request; according to the determined at least one service server identification, sending a log data acquisition request to a corresponding service server; after receiving the log data returned by the service server, sending the received log data to the user terminal;
a service server 73 for storing log data generated during operation; and when receiving a log data acquisition request sent by the log server, returning log data to the log server according to the log data acquisition request.
Optionally, the log server 72 is further configured to establish a long connection with the service server before sending a log data acquisition request to the corresponding service server according to the determined at least one service server identifier; and according to the determined at least one service server identification, sending a log data acquisition request to the service server through a long connection established between the service server and the service server.
Optionally, the user terminal 71 is further configured to establish a long connection with the log server before sending the log data query request to the log server; and sending a log data query request to the log server through the established long connection.
Optionally, the log data query request carries a service identifier.
Optionally, the log data query request carries log configuration information, where the log configuration information includes log directory information and/or log path information.
The log server 72 is specifically configured to send a log data acquisition request to a corresponding service server according to the determined at least one service server identifier, where the log data acquisition request carries the log configuration information;
the service server 73 is specifically configured to search for corresponding log data according to the log configuration information carried in the log data acquisition request, and return the corresponding log data to the log server.
Optionally, the log data query request further carries a log data filtering condition.
The log server 72 is specifically configured to send a log data acquisition request to a corresponding service server according to the determined at least one service server identifier, where the log data acquisition request carries the log data filtering condition;
the service server 73 is specifically configured to screen out log data meeting the condition according to the log data filtering condition carried in the log data acquisition request, and return the log data to the log server.
Preferably, the log data filtering condition includes at least one of: log query time period, log query keywords, and log level information.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (12)

1. A server log viewing method is applied to a server log viewing system, the server log viewing system comprises a user terminal, a log server and at least one service server, and the method comprises the following steps:
the log server receives a log data query request sent by the user terminal, wherein the log data query request carries a service identifier;
the log server determines at least one service server identifier corresponding to the service identifier carried in the log data query request and log configuration information corresponding to the service identifier according to a pre-established service identifier, a correspondence between the service server identifier and the log configuration information, wherein the log configuration information comprises log directory information and/or log path information;
the log server sends a log data acquisition request to a corresponding service server according to the determined at least one service server identifier, wherein the service server stores log data of a self-running service, and the log data acquisition request comprises log configuration information corresponding to the service identifier;
the log server receives log data returned by the service server aiming at the log data acquisition request, wherein the log data are screened and searched from the log data stored by the service server according to the log configuration information included in the log data acquisition request;
and the log server sends the received log data to the user terminal.
2. The method of claim 1, wherein before the log server sends a log data acquisition request to the corresponding service server according to the determined at least one service server identifier, the method further comprises:
the log server establishes long connection with the service server; and
the log server sends a log data acquisition request to a corresponding service server according to the determined at least one service server identifier, and the method specifically includes:
and the log server sends a log data acquisition request to the service server through the long connection established between the log server and the service server according to the determined at least one service server identifier.
3. The method of claim 1, prior to the log server receiving the log data query request, further comprising:
the log server establishes long connection with a request party; and
the receiving, by the log server, the log data query request sent by the user terminal specifically includes:
and the log server receives a log data query request sent by the user terminal through the established long connection.
4. The method according to any one of claims 1 to 3, wherein the log data query request further carries a log data filtering condition; and
the log server sends a log data acquisition request to a corresponding service server according to the determined at least one service server identifier, and the method specifically includes:
the log server sends a log data acquisition request to a service server storing log data according to the log data query request, wherein the log data acquisition request carries the log data filtering condition; and
the receiving, by the log server, the log data returned by the service server in response to the log data acquisition request specifically includes:
and the log server receives log data returned by the service server aiming at the log data acquisition request, wherein the log data are screened out from the log data stored by the service server according to the log data filtering condition.
5. The method of claim 4, wherein the log data filtering condition comprises at least one of: log query time period, log query keywords, and log level information.
6. A server log viewing apparatus, comprising:
the system comprises a first receiving unit, a second receiving unit and a third receiving unit, wherein the first receiving unit is used for receiving a log data query request sent by a requester, and the log data query request carries a service identifier;
a determining unit, configured to determine, according to a correspondence between a service identifier created in advance, a service server identifier, and log configuration information, at least one service server identifier corresponding to the service identifier carried in the log data query request, and the log configuration information corresponding to the service identifier, where the log configuration information includes log directory information and/or log path information;
the system comprises a first sending unit, a second sending unit and a third sending unit, wherein the first sending unit is used for sending a log data acquisition request to a corresponding service server according to at least one determined service server identifier, the log data acquisition request comprises log configuration information corresponding to the service identifier, and log data of a self-running service is stored in the service server;
a second receiving unit, configured to receive log data returned by the service server in response to the log data acquisition request, where the log data is obtained by the service server through screening from log data stored in the service server according to log configuration information included in the log data acquisition request;
and the second sending unit is used for sending the received log data to the requester.
7. The apparatus of claim 6, further comprising a first communication connection establishing unit, wherein:
the first communication connection establishing unit is used for establishing long connection with the service server before the first sending unit sends a log data acquisition request to the corresponding service server according to the determined at least one service server identifier;
the first sending unit is specifically configured to send a log data acquisition request to the service server through a long connection established between the first sending unit and the service server according to the determined at least one service server identifier.
8. The apparatus according to claim 6 or 7, wherein the log data query request further carries a log data filtering condition; and
the first sending unit is specifically configured to send a log data acquisition request to a corresponding service server according to the determined at least one service server identifier, where the log data acquisition request carries the log data filtering condition;
the second receiving unit is specifically configured to receive log data returned by the service server in response to the log data acquisition request, where the log data is screened by the service server from log data stored in the service server according to the log data filtering condition.
9. A server log viewing system is characterized by comprising a user terminal, a log server and at least one service server:
the system comprises a user terminal, a log server and a service server, wherein the user terminal is used for sending a log data query request to the log server, and the log data query request carries a service identifier;
the log server is used for determining at least one service server identifier corresponding to the service identifier carried in the log data query request and log configuration information corresponding to the service identifier according to a pre-established service identifier, a correspondence between the service server identifier and the log configuration information, wherein the log configuration information comprises log directory information and/or log path information; according to the determined at least one service server identification, sending a log data acquisition request to a corresponding service server, wherein the log data acquisition request comprises log configuration information corresponding to the service identification; after receiving the log data returned by the service server, sending the received log data to the user terminal;
the service server is used for storing log data generated in the running process; and when receiving a log data acquisition request sent by the log server, returning log data to the log server according to the log data acquisition request, wherein the log data is screened and found by the service server from the log data stored by the service server according to the log configuration information included in the log data acquisition request.
10. The system of claim 9,
the log server is also used for establishing long connection with the service server before sending a log data acquisition request to the corresponding service server according to the determined at least one service server identifier; and according to the determined at least one service server identification, sending a log data acquisition request to the service server through a long connection established between the service server and the service server.
11. The system of claim 9,
the user terminal is also used for establishing long connection with the log server before sending a log data query request to the log server; and sending a log data query request to the log server through the established long connection.
12. The system according to any one of claims 9 to 11, wherein the log data query request further carries a log data filtering condition; and
the log server is specifically configured to send a log data acquisition request to a corresponding service server according to the determined at least one service server identifier, where the log data acquisition request carries the log data filtering condition;
and the service server is specifically used for screening out log data meeting the conditions according to the log data filtering conditions carried in the log data acquisition request and returning the log data meeting the conditions to the log server.
CN201710256890.6A 2017-04-19 2017-04-19 Server log viewing method, device and system Active CN108737467B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710256890.6A CN108737467B (en) 2017-04-19 2017-04-19 Server log viewing method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710256890.6A CN108737467B (en) 2017-04-19 2017-04-19 Server log viewing method, device and system

Publications (2)

Publication Number Publication Date
CN108737467A CN108737467A (en) 2018-11-02
CN108737467B true CN108737467B (en) 2021-03-26

Family

ID=63925259

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710256890.6A Active CN108737467B (en) 2017-04-19 2017-04-19 Server log viewing method, device and system

Country Status (1)

Country Link
CN (1) CN108737467B (en)

Families Citing this family (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110096485A (en) * 2019-03-18 2019-08-06 平安普惠企业管理有限公司 Log inquiring method, device, computer equipment and storage medium
CN111722920B (en) * 2019-03-22 2024-06-21 鼎捷软件股份有限公司 Load control method
CN110175152A (en) * 2019-05-30 2019-08-27 深圳前海微众银行股份有限公司 A kind of log inquiring method, transfer server cluster and log query system
CN112019362B (en) * 2019-05-30 2022-06-10 中移(苏州)软件技术有限公司 Data transmission method, device, server, terminal, system and storage medium
CN110597848A (en) * 2019-08-06 2019-12-20 上海数据交易中心有限公司 Data service settlement method and system, storage medium and server
CN112783842B (en) * 2019-11-07 2024-03-01 北京沃东天骏信息技术有限公司 A log collection method and device
CN111124815A (en) * 2019-12-05 2020-05-08 京东数字科技控股有限公司 Log checking method, device, equipment and storage medium
CN111522922B (en) * 2020-03-26 2023-08-22 浙江口碑网络技术有限公司 Log information query method, device, storage medium and computer equipment
CN111611138B (en) * 2020-04-10 2024-03-15 深圳市广和通无线股份有限公司 Log data grabbing method, device, computer equipment and storage medium
CN111522714A (en) * 2020-04-20 2020-08-11 京东数字科技控股有限公司 Log query method and device, electronic equipment and storage medium
CN112532424B (en) * 2020-11-03 2023-04-25 武汉悦学帮网络技术有限公司 Service system, server end and information processing method
CN112612752A (en) * 2020-12-17 2021-04-06 浪潮云信息技术股份公司 Log data management method and device
CN113010377B (en) * 2021-03-03 2024-06-14 中国工商银行股份有限公司 Method and device for collecting operation log of job
CN113765694B (en) * 2021-03-24 2024-04-19 北京京东拓先科技有限公司 Log information display method, device, electronic equipment and computer readable medium
CN113590572B (en) * 2021-07-21 2022-10-18 用友汽车信息科技(上海)股份有限公司 Log viewing method and device, electronic equipment and readable storage medium
CN114064597A (en) * 2021-11-18 2022-02-18 浙江中控技术股份有限公司 Log processing method and system, electronic equipment and storage medium
CN115438005A (en) * 2022-09-02 2022-12-06 北京百度网讯科技有限公司 Log query method and device, electronic equipment and storage medium
CN115622906A (en) * 2022-09-08 2023-01-17 中国银行股份有限公司 Application log capturing system and method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103678092A (en) * 2013-12-30 2014-03-26 北京网康科技有限公司 Log analysis method and system
CN103853743A (en) * 2012-11-29 2014-06-11 百度在线网络技术(北京)有限公司 Distributed system and log query method thereof
CN105100128A (en) * 2014-04-24 2015-11-25 北京金山网络科技有限公司 Server cluster log acquiring and providing methods, log server and node server
CN105389314A (en) * 2014-09-04 2016-03-09 中芯国际集成电路制造(上海)有限公司 Log file query system and query method
CN105824958A (en) * 2016-03-31 2016-08-03 广州华多网络科技有限公司 Method, device and system for inquiring log

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150379033A1 (en) * 2014-06-27 2015-12-31 International Business Machines Corporation Parallel matching of hierarchical records

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103853743A (en) * 2012-11-29 2014-06-11 百度在线网络技术(北京)有限公司 Distributed system and log query method thereof
CN103678092A (en) * 2013-12-30 2014-03-26 北京网康科技有限公司 Log analysis method and system
CN105100128A (en) * 2014-04-24 2015-11-25 北京金山网络科技有限公司 Server cluster log acquiring and providing methods, log server and node server
CN105389314A (en) * 2014-09-04 2016-03-09 中芯国际集成电路制造(上海)有限公司 Log file query system and query method
CN105824958A (en) * 2016-03-31 2016-08-03 广州华多网络科技有限公司 Method, device and system for inquiring log

Also Published As

Publication number Publication date
CN108737467A (en) 2018-11-02

Similar Documents

Publication Publication Date Title
CN108737467B (en) Server log viewing method, device and system
US11755371B1 (en) Data intake and query system with distributed data acquisition, indexing and search
CN107291750B (en) Data migration method and device
CN112199197B (en) Server management method and system
CN111861140B (en) Service processing method and device, storage medium and electronic device
US10285045B2 (en) Monitoring of embedded subscriber identity modules
US20140280859A1 (en) Sharing control system and method for network resources download information
CN110557284B (en) Data aggregation method and device based on client gateway
CN105447046A (en) Distributed system data consistency processing method, device and system
CN108234207B (en) Fault positioning method and device based on Content Delivery Network (CDN)
CN102739811B (en) The method and apparatus of domain name mapping
CN105871794A (en) Distributed file system date storage method and system, client and server
CN109274777B (en) A method, device, equipment and readable storage medium for exporting configuration files
CN114036236B (en) Multi-gateway cluster system
CN108833565A (en) A kind of method, apparatus of monitoring server, server and storage medium
WO2016018342A1 (en) Remote session information based on process identifier
CN111698281B (en) Resource downloading method and device, electronic equipment and storage medium
CN111225248B (en) On-demand content management method and content distribution network on-demand server
CN112272190B (en) Data access method and device
CN111897843B (en) Configuration method and device of data flow strategy of Internet of things and computer equipment
CN110149219B (en) Shooting equipment configuration method and device
CN113612811B (en) Method, system, equipment and medium for client mounting in multiple channels
CN114356456B (en) Business processing method, device, storage medium and electronic device
CN111191251A (en) A data access control method, device and storage medium
CN106028076A (en) Method for acquiring associated user video, server and terminal

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
GR01 Patent grant
GR01 Patent grant