CN114500582A - Log collection method and device, storage medium and electronic device - Google Patents

Log collection method and device, storage medium and electronic device Download PDF

Info

Publication number
CN114500582A
CN114500582A CN202210130090.0A CN202210130090A CN114500582A CN 114500582 A CN114500582 A CN 114500582A CN 202210130090 A CN202210130090 A CN 202210130090A CN 114500582 A CN114500582 A CN 114500582A
Authority
CN
China
Prior art keywords
log
target
namespace information
account
namespace
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
CN202210130090.0A
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.)
Zhejiang Dahua Technology Co Ltd
Original Assignee
Zhejiang Dahua Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Dahua Technology Co Ltd filed Critical Zhejiang Dahua Technology Co Ltd
Priority to CN202210130090.0A priority Critical patent/CN114500582A/en
Publication of CN114500582A publication Critical patent/CN114500582A/en
Pending legal-status Critical Current

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
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/04Processing captured monitoring data, e.g. for logfile generation
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Mining & Analysis (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the invention provides a log acquisition method, a log acquisition device, a storage medium and an electronic device, wherein the method comprises the following steps: acquiring a log stored in a target container included in a target cluster; adding namespace information to each log based on a container identifier included in a storage address of each log in the log to obtain a first log; and pushing the first log to a target gateway to indicate the target gateway to send the target log included in the first log to a log storage component, wherein the namespace information of the target log is the namespace information included in a first namespace information list of a first account, and the first account is an account using a target container and in an open state of log collection. By the method and the device, the problem of resource waste caused by log acquisition in the related technology is solved, and the effect of saving resources is achieved.

Description

Log collection method and device, storage medium and electronic device
Technical Field
The embodiment of the invention relates to the field of communication, in particular to a log collection method, a log collection device, a log storage medium and an electronic device.
Background
In the related art, the management scheme using the log in the container cloud is generally EFK (elastic search, Filebeat or fluent, Kibana) or Loki + Grafana, and the like. And firstly, pushing container standard output logs stored under the docker directories on each node to a log storage component through a log collector component, and then inquiring. Although Kibana and Grafana have their own user right systems, the user right systems of container clouds cannot be docked. And because the logs of all containers on the collected nodes are collected, the logs of useless containers can be collected, so that the resource waste is caused. The log collection requirements for dynamically opening or closing different user deployment containers cannot be met.
Therefore, the problem of resource waste caused by collecting logs in the related art exists.
In view of the above problems in the related art, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the invention provides a log collection method, a log collection device, a storage medium and an electronic device, and aims to at least solve the problem of resource waste caused by log collection in the related technology.
According to an embodiment of the present invention, there is provided a log collection method, including: acquiring a log stored in a target container included in a target cluster; adding namespace information to each log based on a container identifier included in a storage address of each log in the logs to obtain a first log; and pushing the first log to a target gateway to indicate the target gateway to send the target log included in the first log to a log storage component, wherein the namespace information of the target log is the namespace information included in a first namespace information list of a first account, and the first account is the account which uses the target container and has a log collection state in an open state.
According to another embodiment of the present invention, there is provided an apparatus for collecting logs, including: the acquisition module is used for acquiring the logs stored in the target container included in the target cluster; the adding module is used for adding namespace information to each log based on a container identifier included in a storage address of each log in the logs to obtain a first log; the acquisition module is used for pushing the first log to a target gateway so as to indicate the target gateway to send the target log included in the first log to a log storage component, wherein the namespace information of the target log is the namespace information included in a first namespace information list of a first account, and the first account is the account using the target container and the log acquisition state is an open state.
According to yet another embodiment of the invention, there is also provided a computer-readable storage medium having a computer program stored therein, wherein the computer program, when executed by a processor, implements the steps of the method as set forth in any of the above.
According to yet another embodiment of the present invention, there is also provided an electronic device, including a memory in which a computer program is stored and a processor configured to execute the computer program to perform the steps in any of the above method embodiments.
According to the method and the device, the logs stored in the target container in the target cluster are obtained, the name space information is added to the target logs according to the container identification included in the storage address of each log in the logs, the first log is obtained, the first log is pushed to the target gateway, the target gateway can send the target logs included in the first log to the log storage component for storage after receiving the first log, the name space information of the target logs is the name space information included in the first name space information list of the first account, the first account is the account using the target container, and the log collection state is the account in the starting state. When the logs are collected, only the target logs corresponding to the account numbers with the log collection state being the open state are stored in the log storage component, and the logs of all containers in the target cluster do not need to be stored, so that the problem of resource waste caused by collecting the logs in the related technology can be solved, and the effect of saving resources is achieved.
Drawings
Fig. 1 is a block diagram of a hardware structure of a mobile terminal of a log collection method according to an embodiment of the present invention;
FIG. 2 is a flow chart of a method of collecting logs according to an embodiment of the present invention;
FIG. 3 is a flow chart of collecting logs according to an exemplary embodiment of the present invention;
FIG. 4 is a flowchart of a log query according to an exemplary embodiment of the present invention;
fig. 5 is a block diagram of a log collection apparatus according to an embodiment of the present invention.
Detailed Description
Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings in conjunction with the embodiments.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
The method embodiments provided in the embodiments of the present application may be executed in a mobile terminal, a computer terminal, or a similar computing device. Taking an example of the present invention running on a mobile terminal, fig. 1 is a block diagram of a hardware structure of the mobile terminal of a log collection method according to an embodiment of the present invention. As shown in fig. 1, the mobile terminal may include one or more (only one shown in fig. 1) processors 102 (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA), and a memory 104 for storing data, wherein the mobile terminal may further include a transmission device 106 for communication functions and an input-output device 108. It will be understood by those of ordinary skill in the art that the structure shown in fig. 1 is only an illustration and is not intended to limit the structure of the mobile terminal. For example, the mobile terminal may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
The memory 104 may be used to store a computer program, for example, a software program and a module of an application software, such as a computer program corresponding to the collection method of the log in the embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, so as to implement the method described above. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely from the processor 102, which may be connected to the mobile terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a Network adapter (NIC) that can be connected to other Network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used to communicate with the internet in a wireless manner.
In this embodiment, a method for collecting a log is provided, and fig. 2 is a flowchart of the method for collecting a log according to the embodiment of the present invention, as shown in fig. 2, the flowchart includes the following steps:
step S202, acquiring logs stored in a target container included in a target cluster;
step S204, based on the container identifier included in the storage address of each log in the logs, adding namespace information to each log to obtain a first log;
step S206, pushing the first log to a target gateway to instruct the target gateway to send the target log included in the first log to a log storage component, wherein the namespace information of the target log is the namespace information included in a first namespace information list of a first account, and the first account is the account using the target container and in which the log collection state is an open state.
In the above embodiment, the target cluster may be kubernets, the target cluster may include a plurality of nodes, each node may include one or more target containers, and the target containers may store logs generated by different applications, that is, the target containers may store logs of applications deployed by different users. When the log stored in the target container is acquired, the log can be acquired through the log acquisition component. After the logs are obtained, namespace information can be added to each log according to container identifiers included in log storage addresses, and a first log is obtained. And pushing the first log to a target gateway, wherein after receiving the first log, the target gateway can determine the log collection state of an account connected to the target gateway, determine the account with the log collection state being an open state, determine a namespace information list of the account with the log collection state being the open state, and determine the namespace information included in the first log as the target log in the first namespace information list to be stored in a log storage component. That is, after the first log is pushed to the target gateway, whether the namespace information in the first log reaching the gateway is in the namespace list of the account collected by the start log can be judged through the target gateway. And if the namespace information in the log is in the list of the namespace list of the account for starting log collection, forwarding the log request to a log storage component, and returning a response result of the log storage component. Otherwise, discarding the log push request. The first account deploys the application to an account corresponding to the user in the target container. The flow chart of collecting the logs can be seen in fig. 3.
In the above embodiment, a single log under a docker directory may be collected, a storage address of the log may be/var/lib/docker/clients/< container id >/json.
In the above embodiment, the target gateway may monitor changes in the account configuration and the namespace through the apiserver, and maintain a namespace list of accounts for opening log collection in the memory. And if the account configuration is changed into the opening monitoring, inserting all the namespaces of the account into the namespace list, and otherwise, deleting the namespaces from the namespace list.
In the above embodiment, the log collection status of the first account may be determined according to the account configuration stored in the container cloud platform. The user can adjust the log collection state of the first account by modifying the account configuration.
In the above embodiment, when the target log is a log of the first account, but the namespace information matching the namespace information list of the target log does not exist in the first namespace information list of the first account, a prompt message may be sent, where the prompt message is used to prompt the user whether the target log does not exist in the first namespace information list, whether to newly create namespace information in the first namespace information list, or whether to delete the target log. And based on the received instruction, executing new creation or deletion operation.
Optionally, the execution subject of the above steps may be a container cloud platform, a background processor, or other devices with similar processing capabilities, and may also be a machine integrated with at least a data processing device, where the data processing device may include a terminal such as a computer, a mobile phone, and the like, but is not limited thereto.
According to the method and the device, the logs stored in the target container in the target cluster are obtained, the name space information is added to the target logs according to the container identification included in the storage address of each log in the logs, the first log is obtained, the first log is pushed to the target gateway, the target gateway can send the target logs included in the first log to the log storage component for storage after receiving the first log, the name space information of the target logs is the name space information included in the first name space information list of the first account, the first account is the account using the target container, and the log collection state is the account in the starting state. When the logs are collected, only the target logs corresponding to the account numbers with the log collection state being the open state are stored in the log storage component, and the logs of all containers in the target cluster do not need to be stored, so that the problem of resource waste caused by collecting the logs in the related technology can be solved, and the effect of saving resources is achieved.
In one exemplary embodiment, obtaining the log stored in the target container included in the target cluster includes: monitoring container group information in a container group included in the target cluster through an apiserver, wherein the container group includes a target container; and under the condition that the information of the target container included in the container group information is determined to be updated, acquiring the log stored in the target container. In this embodiment, when acquiring the log, the log collection component may monitor the pod resource, i.e., the container group information, through the apiserver. And acquiring the log stored in the target container when the information corresponding to the target container included in the container group information is updated.
In the above embodiment, the log may also be collected in the case of receiving a collection instruction. The acquisition instruction may include a container in which the log to be acquired is located, and the log stored in the container in which the log to be acquired is located may be acquired according to the acquisition instruction.
In one exemplary embodiment, the method further comprises: receiving a control instruction for instructing to adjust the first namespace information list; adjusting the first namespace information list based on the control instruction. In this embodiment, the first namespace information list is also allowed to be adjusted. When a control instruction for adjusting the first namespace information list is received, the first namespace information list may be adjusted according to the control instruction. Wherein the control instruction may be an instruction that is triggered when the first namespace information list is selected.
In an exemplary embodiment, adjusting the first namespace information list based on the control instruction includes at least one of: deleting the namespace information to be deleted indicated in the deleting instruction from the first namespace information list under the condition that the control instruction is the deleting instruction; and under the condition that the control instruction is a new instruction, newly creating the namespace information to be newly created, which is indicated in the new instruction, in the first namespace information list. In this embodiment, when the control instruction is a delete instruction, the namespace information to be deleted may be deleted from the first namespace information list. The namespace information to be deleted may be selected namespace information or namespace information included in the control instruction. When the control instruction is a new instruction, the namespace information to be newly created indicated in the new instruction can be created in the first namespace information list. When the new name space information is created, the name space information to be created can be input into the first name space information list.
In one exemplary embodiment, the method further comprises: receiving a query instruction input by a second account; verifying the legality of the second account number; and under the condition that the second account is legal, inquiring a second log corresponding to the second account in the first log based on the inquiry instruction. In this embodiment, when a user queries a log, a query instruction may be input, when a query instruction input by a second account is received, validity of the second account may be verified, and when the second account is legal, a second log corresponding to the second account is queried in the first log according to the query instruction. The user can call the log query interface to request the header to add user information, and the query instruction can include the log query syntax. If there is no authentication information, i.e. in case of non-legitimacy along the second account, the gateway may directly return an unauthenticated error.
In one exemplary embodiment, querying, in the first log, a second log corresponding to the second account based on the query instruction includes: acquiring a second namespace information list of the second account; querying the second log in the first log based on namespace information included in the second namespace information list. In this embodiment, when a tenant (i.e., a user of the second account) adds a new namespace, the container cloud platform may add a tenant id (i.e., the second account) to the tag of the namespace. The gateway can obtain a second namespace list of the tenant according to the tenant id. After receiving a query instruction input by a second account, a second namespace information list of the second account can be obtained, and a second log is queried in the first log according to namespace information included in the second namespace information list.
In one exemplary embodiment, querying the first log for the second log based on the namespace information included in the second list of namespace information comprises: adding the namespace information included in the second namespace information list to the query statement included in the query instruction to obtain a target query instruction; sending the target query instruction to a log query component to instruct the log query component to query the second log which has the same namespace information as the target log query instruction. In this embodiment, the gateway may modify the log query syntax included in the query instruction, add a namespace filter condition to the query statement to obtain a target query instruction, and forward the modified target query instruction to the log query component. The log query component may query a first log for a log that is identical to the namespace information included in the target log query instruction, determine the log as a second log, and return a query result. The flowchart of log query can be seen in fig. 4.
In the foregoing embodiment, the logs of the applications deployed for different tenants have namespaces as the minimum division unit. And the log management authority is related to the name space authority owned by the tenant. And the log collector collects logs of all containers on the node and monitors the pod information to attach the namespace information through the apiserver. And changing the address of the log storage component pushed in the log acquisition component into a gateway address. The log switch configuration of all tenants of the container cloud platform is obtained through plug-in units in the gateway, and then a name space list of the tenants starting log collection is obtained. The tenant configuration is stored in kubernets as a self-defined resource, the plug-in monitors the change of the tenant configuration and the name space through the apiserver, and the name space list for starting log collection is stored in the memory. If the namespace in the collected log is not in the list, the namespace is discarded, and the namespace is forwarded to the log storage component by the gateway in the list. When the tenant calls the interface to inquire the log, user information needs to be added into the request, and the request is submitted to the gateway first. The gateway acquires a name space list owned by the tenant according to the tenant information, and then adds the name space information to a filtering condition of a log query request of the tenant.
And the log is filtered in the log acquisition and query process according to the tenant authority configuration by introducing a gateway plug-in according to the namespace authority owned by the tenant. The log management requirement of multiple tenants is met under the condition that the technical architecture of the original log management scheme is not changed. The method not only meets the requirement of checking the log according to the tenant permission to prevent sensitive information from being leaked, but also can acquire the log according to the tenant permission to save resources. By storing tenant configuration as a custom resource in kubernets and taking namespace as a configuration validation unit. The association between the tenant and the name space is used as the basis for reading and writing the log, so that the condition that the tenant information is changed and cannot be associated with the log is avoided. Configuration can be validated in real time by cooperating with apiserver monitoring tenant configuration and namespace resource change.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
In this embodiment, a log collecting device is further provided, and the log collecting device is used to implement the foregoing embodiments and preferred embodiments, which have already been described and are not described again. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 5 is a block diagram of a structure of an apparatus for collecting logs according to an embodiment of the present invention, and as shown in fig. 5, the apparatus includes:
an obtaining module 52, configured to obtain a log stored in a target container included in a target cluster;
an adding module 54, configured to add namespace information to each log based on a container identifier included in a storage address of each log in the logs, to obtain a first log;
the acquisition module 56 is configured to push the first log to a target gateway to instruct the target gateway to send the target log included in the first log to a log storage component, where namespace information of the target log is namespace information included in a first namespace information list of a first account, and the first account is an account using the target container and in which a log acquisition state is an open state.
In an exemplary embodiment, the obtaining module 52 may obtain the logs stored in the target containers included in the target cluster by: monitoring container group information in a container group included in the target cluster through an apiserver, wherein the container group includes a target container; and under the condition that the information of the target container included in the container group information is determined to be updated, acquiring the log stored in the target container.
In an exemplary embodiment, the apparatus is configured to receive a control instruction for instructing adjustment of the first namespace information list; adjusting the first namespace information list based on the control instruction.
In an exemplary embodiment, the apparatus may enable adjusting the first namespace information list based on the control instruction by at least one of: deleting the namespace information to be deleted indicated in the deleting instruction from the first namespace information list under the condition that the control instruction is the deleting instruction; and under the condition that the control instruction is a new instruction, newly creating the namespace information to be newly created, which is indicated in the new instruction, in the first namespace information list.
In an exemplary embodiment, the apparatus is further configured to receive a query instruction input by a second account; verifying the legality of the second account number; and under the condition that the second account is legal, inquiring a second log corresponding to the second account in the first log based on the inquiry instruction.
In an exemplary embodiment, the apparatus may enable querying, based on the query instruction, a second log corresponding to the second account in the first log by: acquiring a second namespace information list of the second account; querying the second log in the first log based on namespace information included in the second namespace information list.
In one exemplary embodiment, the apparatus may enable querying the first log for the second log based on namespace information included in the second namespace information list by: adding the namespace information included in the second namespace information list to the query statement included in the query instruction to obtain a target query instruction; sending the target query instruction to a log query component to instruct the log query component to query the second log which has the same namespace information as the target log query instruction.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
Embodiments of the present invention also provide a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method as set forth in any of the above.
In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Embodiments of the present invention also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
In an exemplary embodiment, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary embodiments, and details of this embodiment are not repeated herein.
It will be apparent to those skilled in the art that the various modules or steps of the invention described above may be implemented using a general purpose computing device, they may be centralized on a single computing device or distributed across a network of computing devices, and they may be implemented using program code executable by the computing devices, such that they may be stored in a memory device and executed by the computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into various integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A log collection method is characterized by comprising the following steps:
acquiring a log stored in a target container included in a target cluster;
adding namespace information to each log based on a container identifier included in a storage address of each log in the logs to obtain a first log;
and pushing the first log to a target gateway to indicate the target gateway to send the target log included in the first log to a log storage component, wherein the namespace information of the target log is the namespace information included in a first namespace information list of a first account, and the first account is the account which uses the target container and has a log collection state in an open state.
2. The method of claim 1, wherein obtaining logs stored in target containers included in a target cluster comprises:
monitoring container group information in a container group included in the target cluster through an apiserver, wherein the container group includes a target container;
and under the condition that the information of the target container included in the container group information is determined to be updated, acquiring the log stored in the target container.
3. The method of claim 1, further comprising:
receiving a control instruction for instructing to adjust the first namespace information list;
adjusting the first namespace information list based on the control instruction.
4. The method of claim 3, wherein adjusting the first list of namespace information based on the control instruction comprises at least one of:
deleting the namespace information to be deleted indicated in the deleting instruction from the first namespace information list under the condition that the control instruction is the deleting instruction;
and under the condition that the control instruction is a new instruction, creating new namespace information to be created indicated in the new instruction in the first namespace information list.
5. The method of claim 1, further comprising:
receiving a query instruction input by a second account;
verifying the legality of the second account number;
and under the condition that the second account is legal, inquiring a second log corresponding to the second account in the first log based on the inquiry instruction.
6. The method of claim 5, wherein querying, in the first log, a second log corresponding to the second account number based on the query instruction comprises:
acquiring a second namespace information list of the second account;
querying the second log in the first log based on namespace information included in the second namespace information list.
7. The method of claim 6, wherein querying the first log for the second log based on namespace information included in the second list of namespace information comprises:
adding the namespace information included in the second namespace information list to the query statement included in the query instruction to obtain a target query instruction;
sending the target query instruction to a log query component to instruct the log query component to query the second log which has the same namespace information as the target log query instruction.
8. An apparatus for collecting logs, comprising:
the acquisition module is used for acquiring the logs stored in the target container included in the target cluster;
the adding module is used for adding namespace information to each log based on a container identifier included in a storage address of each log in the logs to obtain a first log;
the acquisition module is used for pushing the first log to a target gateway so as to indicate the target gateway to send the target log included in the first log to a log storage component, wherein the namespace information of the target log is the namespace information included in a first namespace information list of a first account, and the first account is the account using the target container and the log acquisition state is an open state.
9. A computer-readable storage medium, in which a computer program is stored, which computer program, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
10. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, and wherein the processor is arranged to execute the computer program to perform the method of any of claims 1 to 7.
CN202210130090.0A 2022-02-11 2022-02-11 Log collection method and device, storage medium and electronic device Pending CN114500582A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210130090.0A CN114500582A (en) 2022-02-11 2022-02-11 Log collection method and device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210130090.0A CN114500582A (en) 2022-02-11 2022-02-11 Log collection method and device, storage medium and electronic device

Publications (1)

Publication Number Publication Date
CN114500582A true CN114500582A (en) 2022-05-13

Family

ID=81480001

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210130090.0A Pending CN114500582A (en) 2022-02-11 2022-02-11 Log collection method and device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN114500582A (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140156618A1 (en) * 2012-12-03 2014-06-05 Vmware, Inc. Distributed, Transactional Key-Value Store
WO2015065361A1 (en) * 2013-10-30 2015-05-07 Aetherpal Inc. Method and system for collection of device logs during a remote control session
US20160337167A1 (en) * 2014-01-15 2016-11-17 Nec Corporation Log data collection system, terminal device, and log data collection method
US20180183690A1 (en) * 2016-12-28 2018-06-28 Fujitsu Limited Information processing apparatus for acquiring log and method of controlling information processing apparatus therefor
CN111885159A (en) * 2020-07-22 2020-11-03 曙光信息产业(北京)有限公司 Data acquisition method and device, electronic equipment and storage medium
CN112887351A (en) * 2019-11-29 2021-06-01 阿里巴巴集团控股有限公司 Log information collection system, method and device and electronic equipment
CN113010377A (en) * 2021-03-03 2021-06-22 中国工商银行股份有限公司 Method and device for collecting operation logs of operation
US11061770B1 (en) * 2020-06-30 2021-07-13 EMC IP Holding Company LLC Reconstruction of logical pages in a storage system
CN114006916A (en) * 2020-07-16 2022-02-01 京东方科技集团股份有限公司 Method, device and system for collecting device logs

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140156618A1 (en) * 2012-12-03 2014-06-05 Vmware, Inc. Distributed, Transactional Key-Value Store
WO2015065361A1 (en) * 2013-10-30 2015-05-07 Aetherpal Inc. Method and system for collection of device logs during a remote control session
US20160337167A1 (en) * 2014-01-15 2016-11-17 Nec Corporation Log data collection system, terminal device, and log data collection method
US20180183690A1 (en) * 2016-12-28 2018-06-28 Fujitsu Limited Information processing apparatus for acquiring log and method of controlling information processing apparatus therefor
CN112887351A (en) * 2019-11-29 2021-06-01 阿里巴巴集团控股有限公司 Log information collection system, method and device and electronic equipment
US11061770B1 (en) * 2020-06-30 2021-07-13 EMC IP Holding Company LLC Reconstruction of logical pages in a storage system
CN114006916A (en) * 2020-07-16 2022-02-01 京东方科技集团股份有限公司 Method, device and system for collecting device logs
CN111885159A (en) * 2020-07-22 2020-11-03 曙光信息产业(北京)有限公司 Data acquisition method and device, electronic equipment and storage medium
CN113010377A (en) * 2021-03-03 2021-06-22 中国工商银行股份有限公司 Method and device for collecting operation logs of operation

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
黄加顺;赵新宇;罗顺;邱卫东;: "基于USN日志的取证技术研究", 信息安全与通信保密, no. 02, 10 February 2013 (2013-02-10) *

Similar Documents

Publication Publication Date Title
EP2357860B1 (en) Device management server, client and method for locating target operation object
CN110413845B (en) Resource storage method and device based on Internet of things operating system
KR20150016207A (en) Service process control method and network device
CN113010378B (en) Log processing method and device of microservice module, storage medium and electronic device
CN112506670B (en) Multi-node automatic operation and maintenance task processing method, system and storage medium
CN108429739B (en) Method, system and terminal equipment for identifying honeypots
CN113296859B (en) Page loading method and device, storage medium and electronic device
CN113645304A (en) Data service processing method and related equipment
CN105656643B (en) Method and equipment for performing compatible management based on network configuration protocol
CN111585815A (en) Port data acquisition method and device
CN111356182A (en) Resource scheduling and processing method and device
CN112738019B (en) Method and device for displaying device information, storage medium and electronic device
CN110087226B (en) Flow statistical method and device, storage medium and electronic device
CN113434462A (en) HDFS data transfer method and device, storage medium and electronic equipment
CN115706741A (en) Method and device for returning slice file
US20170279686A1 (en) Terminal Topology Management Service Method, Device, and System for Internet of Things
CN113965463A (en) Network slice switching method and terminal, storage medium and electronic device
US10750356B2 (en) Configuration management method, apparatus, and system for terminal in internet of things
CN114500582A (en) Log collection method and device, storage medium and electronic device
CN111131324A (en) Login method and device of business system, storage medium and electronic device
EP3174322A1 (en) Method for deleting notification resource, and common service entity
CN111385110B (en) Network management method and device
CN116032762A (en) Processing method, system and gateway equipment of network service
US20130205013A1 (en) Network management in a communications network
CN113472808B (en) Log processing method and device, storage medium and electronic device

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