CN108153649A - Using the acquisition of daily record and inspection method and its device in docker containers - Google Patents

Using the acquisition of daily record and inspection method and its device in docker containers Download PDF

Info

Publication number
CN108153649A
CN108153649A CN201810065087.9A CN201810065087A CN108153649A CN 108153649 A CN108153649 A CN 108153649A CN 201810065087 A CN201810065087 A CN 201810065087A CN 108153649 A CN108153649 A CN 108153649A
Authority
CN
China
Prior art keywords
host
docker
docker containers
log
url
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
CN201810065087.9A
Other languages
Chinese (zh)
Inventor
高晨超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Chalk Blue Sky Technology Co Ltd
Original Assignee
Beijing Chalk Blue Sky Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Chalk Blue Sky Technology Co Ltd filed Critical Beijing Chalk Blue Sky Technology Co Ltd
Priority to CN201810065087.9A priority Critical patent/CN108153649A/en
Publication of CN108153649A publication Critical patent/CN108153649A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3065Monitoring arrangements determined by the means or processing involved in reporting the monitored data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3466Performance evaluation by tracing or monitoring
    • G06F11/3471Address tracing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/1805Append-only file systems, e.g. using logs or journals to store data
    • G06F16/1815Journaling file systems

Abstract

Using the acquisition of daily record and inspection method and its device in a kind of docker containers, the method includes the steps:Receive user's access instruction;Docker container lists and the correspondence with docker containers and its host are provided;The opening link of Log Directory in docker containers is provided;Judge whether the opening link of Log Directory is clicked, if it is, generation obtains the uniform resource locator url of the corresponding docker containers Log Directory of host;Log list is obtained so that user downloads or checks by url.Methods and apparatus of the present invention is without the running log collection procedure in docker, it is not required that other servers will be sent to using daily record by occupying network bandwidth, save computing resource and network bandwidth.

Description

Using the acquisition of daily record and inspection method and its device in docker containers
Technical field
The present invention relates to docker container technical fields, and in particular in a kind of docker containers using daily record acquisition and Inspection method and its device.
Background technology
The present invention is a kind of application blog management method based on containerization technique.It is related to cloud computing, docker containers Technology and log management technology.Under container technique scene, application program is to run in a reservoir, and the daily record of generation also stores In container, it has not been convenient to check and obtain.Common processing mode is one log collection program of operation in each container, is united One comes out log collection, centralized processing.The method consumes computing resource.Increase the use of network bandwidth simultaneously.
To solve using the collection and processing of daily record in docker, the prior art is typically to be run in each docker containers One log collection program.Daily record is sent to by the server concentrated and received by network, realize the administrative purposes of daily record. It causes deployment inconvenient, while consumes the computing resource of docker, occupy the network bandwidth of docker clusters.
Invention content
To solve the above problems, the present invention provides application log in a kind of docker cluster environment acquisition and look into See function.This method is without the running log collection procedure in docker, it is not required that occupying network bandwidth will apply daily record to send out Other servers are sent to, save computing resource and network bandwidth.
The present invention's realizes above-mentioned purpose by following technical solution.
The first aspect of the present invention is provided using the acquisition of daily record and inspection method in a kind of docker containers, including such as Lower step:
Receive user's access instruction;
Docker container lists and the correspondence with docker containers and its host are provided;
The opening link of Log Directory in docker containers is provided;
Judge whether the opening link of Log Directory is clicked, if it is, generation obtains the corresponding docker of host The uniform resource locator url of container Log Directory;
Log list in Log Directory is obtained so that user downloads or checks by url.
Further, the correspondence includes the ip addresses of host and host name information.
Further, the Log Directory in the docker containers is directly mounted under the catalogue of host.
Further, the catalogue of the host is associated with the id of docker containers.
Further, daily records of the url with the ip addresses of host, id the and docker containers of docker containers The information of catalogue.
Another aspect of the present invention is provided in a kind of docker containers using the acquisition of daily record and checking device, packet It includes:
Receiving module, for receiving user's access instruction;
Docker container web-based management modules, for storing the correspondence of docker container lists and its host, and carry The opening of Log Directory links in the user graphical interface and docker containers that are accessed for the user;
Uniform resource locator url generation modules, when the opening for judging Log Directory, which links, to be clicked, generation obtains place The url of the corresponding docker containers Log Directory of host;
Daily record downloading service module obtains the log list in Log Directory so that user downloads or checks by url.
Further, the correspondence includes the ip addresses of host and host name information.
Further, the Log Directory in the docker containers is directly mounted under the catalogue of host.
Further, the catalogue of the host is associated with the id of docker containers.
Further, daily records of the url with the ip addresses of host, id the and docker containers of docker containers The information of catalogue.
The catalogue of daily record in container is mounted in a manner of volume under the catalogue of host in the present invention, by host Catalogue is associated with docker containers id.In this way when by docker container web-based management module management daily records, band is generated There are host ip addresses and container id and the url of container Log Directory information.Daily record downloading service module is passed through according to this url Log list is obtained, realizes the function of checking and download.
The above-mentioned technical proposal of the present invention has following beneficial technique effect:It solves and is applied in docker cluster environment The acquisition of program daily record and look facility;Without the running log collection procedure in docker, it is not required that occupy network bandwidth Other servers will be sent to using daily record;Save what log collection program in network transmission bandwidth and each docker occupied The computing resources such as cpu and memory.
Description of the drawings
Fig. 1 is the flow chart of acquisition and inspection method that daily record is applied in the docker containers of the present invention.
Specific embodiment
Understand to make the object, technical solutions and advantages of the present invention clearer, With reference to embodiment and join According to attached drawing, the present invention is described in more detail.It should be understood that these descriptions are merely illustrative, and it is not intended to limit this hair Bright range.In addition, in the following description, the description to known features and technology is omitted, to avoid this is unnecessarily obscured The concept of invention.
Docker container techniques provide the mesh that the catalogue of container is directly mounted to host by a kind of mode of Volume Mode under record.The catalogue of daily record in container is mounted in a manner of volume under the catalogue of host in the present invention, and will The catalogue of host is associated with docker containers id.In this way by docker container web-based management module management daily records when It waits, generation is with host ip addresses and container id and url (the Uniform Resource of container Log Directory information Locator, uniform resource locator);According to this url by daily record downloading service module obtain log list, realization check and The function of download.User checks docker container lists by docker container web-based management modules.The module records whole The information such as the ip addresses host name of the list of container and host corresponding with container.It is Sino-Japan to provide docker for the module simultaneously The opening link of will catalogue.When user clicks this link, generation obtains host and corresponds to docker Log Directories url.Daily record download module on request host returns to the log list of the docker.User can by docker log lists To be directly viewable or download each journal entries.
According to the above, the present invention provides acquisition and the inspection method that daily record is applied in a kind of docker containers, such as Shown in Fig. 1, specifically comprise the following steps:
(1) user's access instruction is received;
User selects or searches for specific host from host list, and may search for or select and is specific docker.It will be appreciated that all docker containers under the host after user's one host of selection.
(2) docker container lists and the correspondence with docker containers and its host are provided;
Multiple docker containers can be created on one host.In the vlomun catalogues of host, i.e. docker passes through In the host catalogue that volumn mechanism can be accessed directly, creatied directory using the id of docker containers as directory name, for this Docker containers access.
(3) the opening link of Log Directory in docker containers is provided;Log Directory in the docker containers is direct It is mounted under the catalogue of host;The catalogue of host is associated with the id of docker containers.
Docker containers can be directly accessed on host and write journal file in volumn catalogues.Each host On using the volumn as root catalogues, open web services, it is possible to the download service of docker journal files is provided.
(4) judge whether the opening link of Log Directory is clicked, if it is, generation acquisition host is corresponding The uniform resource locator url of docker container Log Directories;
The log list of docker containers is provided by the daily record download module of the present invention, i.e., long-range connection should The host of docker, into the volumn catalogues where the docker, crawl log listed files is shown to web consoles Above.If some journal file of user click according to aforesaid way, can generate the url.For example, http:// host: Port/docker-volumen/docker-id/logs/demo.log, this downloads url for journal file.
Log list is obtained so that user downloads or checks by url;Ip addresses of the url with host, The information of the Log Directory of the id and docker containers of docker containers.
Another aspect of the present invention additionally provides obtaining using daily record in a kind of docker containers corresponding with the above method It takes and checking device, including:
Receiving module, for receiving user's access instruction;
Docker container web-based management modules, it is described for storing the correspondence of docker container lists and its host Correspondence includes the ip addresses of host and host name information;And provide user graphical interface that the user accesses and The opening of Log Directory links in docker containers, and the Log Directory in the docker containers is directly mounted to the mesh of host Under record, the catalogue of the host is associated with the id of docker containers;
Uniform resource locator url generation modules, when the opening for judging Log Directory, which links, to be clicked, generation obtains place The url of the corresponding docker containers Log Directory of host;Ids of the url with the ip addresses of host, docker containers with And the information of the Log Directory of docker containers;
Daily record downloading service module obtains log list so that user downloads or checks by url.
The catalogue of daily record in container is mounted in a manner of volume under the catalogue of host in the present invention, by host Catalogue is associated with docker containers id.In this way when by docker container web-based management module management daily records, band is generated There are host ip addresses and container id and the url of container Log Directory information.Daily record downloading service module is passed through according to this url Log list is obtained, realizes the function of checking and download.This method and device without the running log collection procedure in docker, Other servers will be sent to using daily record also without network bandwidth is occupied, save computing resource and network bandwidth.
It should be understood that the above-mentioned specific embodiment of the present invention is used only for exemplary illustration or explains the present invention's Principle, without being construed as limiting the invention.Therefore, that is done without departing from the spirit and scope of the present invention is any Modification, equivalent replacement, improvement etc., should all be included in the protection scope of the present invention.In addition, appended claims purport of the present invention Covering the whole variations fallen into scope and boundary or this range and the equivalent form on boundary and repairing Change example.

Claims (10)

1. using the acquisition of daily record and inspection method in a kind of docker containers, which is characterized in that include the following steps:
Receive user's access instruction;
Docker container lists and the correspondence with docker containers and its host are provided;
The opening link of Log Directory in docker containers is provided;
Judge whether the opening link of Log Directory is clicked, if it is, generation obtains the corresponding docker containers of host The uniform resource locator url of Log Directory;
Log list in Log Directory is obtained so that user downloads or checks by url.
2. according to the method described in claim 1, it is characterized in that, the correspondence includes ip addresses and the host of host Name information.
3. according to the method described in claim 1, it is characterized in that, the Log Directory in the docker containers is directly mounted to Under the catalogue of host.
4. according to the method described in claim 3, it is characterized in that, the catalogue of the host is related to the id of docker containers Connection.
5. according to the method described in claim 1, it is characterized in that, ip addresses of the url with host, docker containers Id and docker containers Log Directory information.
6. using the acquisition of daily record and checking device in a kind of docker containers, which is characterized in that including:
Receiving module, for receiving user's access instruction;
Docker container web-based management modules, for storing the correspondence of docker container lists and its host, and provide institute State the opening link of Log Directory in the user graphical interface of user's access and docker containers;
Uniform resource locator url generation modules, when the opening for judging Log Directory, which links, to be clicked, generation obtains host The url of corresponding docker containers Log Directory;
Daily record downloading service module obtains the log list in Log Directory so that user downloads or checks by url.
7. device according to claim 6, which is characterized in that the correspondence includes ip addresses and the host of host Name information.
8. device according to claim 6, which is characterized in that the Log Directory in the docker containers is directly mounted to Under the catalogue of host.
9. device according to claim 8, which is characterized in that the catalogue of the host is related to the id of docker containers Connection.
10. device according to claim 6, which is characterized in that ip addresses of the url with host, docker hold The information of the Log Directory of the id and docker containers of device.
CN201810065087.9A 2018-01-23 2018-01-23 Using the acquisition of daily record and inspection method and its device in docker containers Pending CN108153649A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810065087.9A CN108153649A (en) 2018-01-23 2018-01-23 Using the acquisition of daily record and inspection method and its device in docker containers

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810065087.9A CN108153649A (en) 2018-01-23 2018-01-23 Using the acquisition of daily record and inspection method and its device in docker containers

Publications (1)

Publication Number Publication Date
CN108153649A true CN108153649A (en) 2018-06-12

Family

ID=62456819

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810065087.9A Pending CN108153649A (en) 2018-01-23 2018-01-23 Using the acquisition of daily record and inspection method and its device in docker containers

Country Status (1)

Country Link
CN (1) CN108153649A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110442506A (en) * 2019-08-16 2019-11-12 上海智臻智能网络科技股份有限公司 A kind of journal obtaining method, device, service server, system and storage medium
CN110688201A (en) * 2019-09-29 2020-01-14 重庆小雨点小额贷款有限公司 Log management method and related equipment
CN110704376A (en) * 2019-09-04 2020-01-17 广东浪潮大数据研究有限公司 Log file saving method and device
CN110955578A (en) * 2019-11-26 2020-04-03 深圳市信联征信有限公司 Log collection method and device based on host machine, computer equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106383852A (en) * 2016-08-30 2017-02-08 中国民生银行股份有限公司 Docker container-based log acquisition method and apparatus
CN106502905A (en) * 2016-10-26 2017-03-15 腾讯科技(深圳)有限公司 A kind of method of testing of application program, apparatus and system
US20170344291A1 (en) * 2016-05-31 2017-11-30 Vmware, Inc. Provisioning data volumes for containers running in virtual machines in which storage for the virtual machines are backed by heterogeneous storage devices

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170344291A1 (en) * 2016-05-31 2017-11-30 Vmware, Inc. Provisioning data volumes for containers running in virtual machines in which storage for the virtual machines are backed by heterogeneous storage devices
CN106383852A (en) * 2016-08-30 2017-02-08 中国民生银行股份有限公司 Docker container-based log acquisition method and apparatus
CN106502905A (en) * 2016-10-26 2017-03-15 腾讯科技(深圳)有限公司 A kind of method of testing of application program, apparatus and system

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110442506A (en) * 2019-08-16 2019-11-12 上海智臻智能网络科技股份有限公司 A kind of journal obtaining method, device, service server, system and storage medium
CN110442506B (en) * 2019-08-16 2023-12-12 上海智臻智能网络科技股份有限公司 Log acquisition method, device, service server, system and storage medium
CN110704376A (en) * 2019-09-04 2020-01-17 广东浪潮大数据研究有限公司 Log file saving method and device
CN110688201A (en) * 2019-09-29 2020-01-14 重庆小雨点小额贷款有限公司 Log management method and related equipment
CN110688201B (en) * 2019-09-29 2022-06-28 重庆小雨点小额贷款有限公司 Log management method and related equipment
CN110955578A (en) * 2019-11-26 2020-04-03 深圳市信联征信有限公司 Log collection method and device based on host machine, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN108153649A (en) Using the acquisition of daily record and inspection method and its device in docker containers
US9998533B2 (en) P2P content caching system and method
US9501345B1 (en) Method and system for creating enriched log data
US7555532B2 (en) Advanced content and data distribution techniques
CN106302445B (en) Method and apparatus for handling request
CN104348919B (en) Carry out the method, apparatus and browser of file download
CN109818934B (en) Method and device for automatically processing logs and computing equipment
CN103812882A (en) Method and system for transferring files
CN108984560A (en) File memory method and device
CN100563214C (en) A kind of method and system that improve accesses network resource speed
CN104391697B (en) The cloud resource management system and method for application program
CN109729187B (en) Proxy communication method, system, device and storage medium
US8370420B1 (en) Web-integrated display of locally stored content objects
CN103699597A (en) Method for downloading file through browser and browser
CN107947954A (en) Dynamic adjustment journal stage other system, method and server
CN111881394B (en) Request processing method and system for application middle layer
US10404651B2 (en) Domain name system network traffic management
CN102868938B (en) A kind of method and apparatus for being used to obtain segmented video files in network
CN106126419A (en) The adjustment method of a kind of application program and device
CN105099735B (en) A kind of method and system for obtaining magnanimity more detailed logging
Bujlow et al. Volunteer-Based System for classification of traffic in computer networks
US20150074290A1 (en) Browser based hostname resolution for non-dns (domain name service) and/or different dns environments
Porter et al. The Design and Implementation of a RESTful IoT Service Using the MERN Stack
US9680697B2 (en) Dynamic product installation based on user feedback
CN105930343A (en) Method and system for quoting favorited APP content

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20180612

RJ01 Rejection of invention patent application after publication