CN110515696A - Information monitoring method and device - Google Patents

Information monitoring method and device Download PDF

Info

Publication number
CN110515696A
CN110515696A CN201910736149.9A CN201910736149A CN110515696A CN 110515696 A CN110515696 A CN 110515696A CN 201910736149 A CN201910736149 A CN 201910736149A CN 110515696 A CN110515696 A CN 110515696A
Authority
CN
China
Prior art keywords
monitoring
web
object information
information
web page
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
CN201910736149.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.)
Inspur Jinan data Technology Co ltd
Original Assignee
Inspur Jinan data 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 Inspur Jinan data Technology Co ltd filed Critical Inspur Jinan data Technology Co ltd
Priority to CN201910736149.9A priority Critical patent/CN110515696A/en
Publication of CN110515696A publication Critical patent/CN110515696A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention relates to the technical field of computers, in particular to an information monitoring method and device. The method comprises the following steps: when a monitoring instruction sent by a user is received, determining an object to be monitored; starting Web service, establishing a monitoring query request, and sending the monitoring query request to K8S; receiving each object information returned by K8S, and sending each object information to WebSocket service; determining a web page corresponding to the WebSocket service, and displaying each object information on the web page, so that a user can monitor each object information through the web page. By applying the method, when a user needs to monitor each pod in the K8S, each object information of the object to be monitored is displayed on the web page, and each object information in the pod does not need to be searched by inputting various complex commands, so that the management and monitoring efficiency of each pod is improved.

Description

Information monitoring method and device
Technical field
The present invention relates to field of computer technology, more particularly to a kind of information monitoring method and device.
Background technique
In container cluster management system (Kurbernetes, K8S), there are multiple containers group pod, have in each pod One or more container docker, wherein loading person one or more thread in each container.In the service for being provided with K8S When running application program in device, each thread of the application program can be loaded by each container, and running the application program When, each thread corresponding with the application program can be run in each container.The process of thread in each container in operation In, user can monitor the running state information and log information of each pod by K8S, to realize to the thread in each container Corresponding operating status is managed and monitors.
With the fast development of computer technology, the quantity of the setting pod in K8S is more and more, and user is each in inquiry The running state information and log information of pod is more and more difficult.In the prior art, user needs disposing the K8S server Middle input repeatedly instruction, and repeatedly searched in the server, it could obtain and check the operation shape of each pod in K8S State information and log information.And the side that the running state information to each pod and log information are inquired in the prior art Formula is not only difficult, but also inquiry velocity is slow, process is complicated, to reduce the efficiency for managing each pod and monitoring.
Summary of the invention
Technical problem to be solved by the invention is to provide a kind of information monitoring methods, in this way, can pass through web The page is managed and monitors to each information of each pod in K8S, does not need the command lookup by inputting various complexity Information in pod improves the efficiency of management and the monitoring to each pod.
The present invention also provides a kind of information monitoring devices, to guarantee the realization and application of the above method in practice.
A kind of information monitoring method, comprising:
When receiving the monitoring instruction of user's transmission, object to be monitored corresponding with the monitoring instruction is determined, it is described Object to be monitored is the operating status or pod log of each container group pod in pre-set container cluster management system K8S;
Start pre-set Web service, and establishes monitoring corresponding with the monitoring instruction according to the Web service and look into Ask request;
It instructs corresponding monitoring and inquiry request to be sent in the K8S monitoring, triggers the K8S according to the prison Inquiry request is controlled, object information corresponding with the object to be monitored in each pod is searched;
When each object information corresponding with the object to be monitored that receives that the K8S returns, will it is each described in Object information is sent to pre-set full-duplex communication protocol Web Socket service;
It determines web page corresponding with WebSocket service, and is serviced by the WebSocket by each institute Object information is stated to be shown on the web page so that the user by the web page to each object information into Row monitoring.
Above-mentioned method, it is optionally, described to establish monitoring and inquiry corresponding with the monitoring instruction according to the Web service Request, comprising:
The corresponding web subprocess of the Web service is obtained, and monitoring instruction is sent to the web subprocess;
Determine system identification format corresponding with the K8S, and the application web subprocess is according to the system identification lattice Formula establishes monitoring and inquiry request corresponding with the monitoring instruction.
Above-mentioned method, it is optionally, described to receive the corresponding each with the object to be monitored of the K8S return When object information, each object information is sent to pre-set full-duplex communication protocol Web Socket service, is wrapped It includes:
When receiving the object information for each object to be monitored that the K8S is returned, using web into Each object information is ranked up by journey according to pre-set arrangement mode;
Each ordering object information is sequentially input in pre-set information list, and saves the information column Table;
The information list is sent in the WebSocket service using the web subprocess.
Above-mentioned method is optionally serviced by the WebSocket and shows each object information described After on web page, further includes:
It calls the web subprocess according to pre-set polling cycle, sends the monitoring and inquiry to the K8S in real time Request;
Each existing object information corresponding with monitoring and inquiry request that the K8S is returned is obtained in real time, and will be each A existing object information is sent in the WebSocket service;
By WebSocket service according to each existing object information, the web page is updated, and by institute It states existing object information and is shown in the web page.
Above-mentioned method, optionally, further includes:
When receiving the out code that user is sent by the web page, stop showing each in the web page A object information, and close the web page.
A kind of information monitoring device, comprising:
Determination unit, for when receive user transmission monitoring instruction when, determine it is corresponding with the monitoring instruction to Monitored object, the object to be monitored are the operation shape of each container group pod in pre-set container cluster management system K8S State or pod log;
Unit is established, for starting pre-set Web service, and establishes according to the Web service and refers to the monitoring Corresponding monitoring and inquiry is enabled to request;
Trigger unit, for instructing corresponding monitoring and inquiry request to be sent in the K8S monitoring, described in triggering K8S is requested according to the monitoring and inquiry, searches object information corresponding with the object to be monitored in each pod;
Transmission unit, for when each object information corresponding with the object to be monitored that receive that the K8S returns When, each object information is sent to pre-set full-duplex communication protocol Web Socket service;
Display unit for determining web page corresponding with WebSocket service, and passes through the WebSocket Service shows each object information on the web page, so that the user is by the web page to each institute Object information is stated to be monitored.
Above-mentioned device, it is optionally, described to establish unit, comprising:
Subelement is obtained, is sent to for obtaining the corresponding web subprocess of the Web service, and by monitoring instruction The web subprocess;
Establish subelement, for determining corresponding with K8S system identification format, and apply the web subprocess according to According to the system identification format, monitoring and inquiry request corresponding with the monitoring instruction is established.
Above-mentioned device, optionally, the transmission unit, comprising:
Sorting subunit, for answering when receiving the object information for each object to be monitored that the K8S is returned With the web subprocess, each object information is ranked up according to pre-set arrangement mode;
Saving subunit, for each ordering object information to be sequentially input in pre-set information list, and Save the information list;
The information list is sent to the WebSocket for the application web subprocess and serviced by transmission sub-unit In.
Above-mentioned device, optionally, further includes:
Updating unit is sent out to the K8S in real time for calling the web subprocess according to pre-set polling cycle The monitoring and inquiry is sent to request;Each existing object corresponding with monitoring and inquiry request that the K8S is returned is obtained in real time Information, and each existing object information is sent in the WebSocket service;It is serviced by the WebSocket According to each existing object information, the web page is updated, and the existing object information is shown in the Web page Face.
Above-mentioned device, optionally, further includes:
Closing unit, for stopping described in display when receiving the out code that user is sent by the web page Each object information in web page, and close the web page.
A kind of storage medium, the storage medium include the instruction of storage, wherein in described instruction operation described in control Equipment where storage medium executes above-mentioned information monitoring method.
A kind of electronic equipment, including memory and one perhaps one of them or one of more than one instruction with Upper instruction is stored in memory, and is configured to execute above-mentioned information monitoring side by one or more than one processor Method.
Compared with prior art, the present invention includes the following advantages:
The present invention provides an information monitoring methods, comprising: when receiving the monitoring instruction of user's transmission, determining and institute It states monitoring and instructs corresponding object to be monitored, the object to be monitored is each in pre-set container cluster management system K8S The operating status or pod log of a container group pod;Start pre-set Web service, and according to the Web service establish with The monitoring instructs corresponding monitoring and inquiry request;Corresponding monitoring and inquiry request is instructed to be sent to the K8S monitoring In, it triggers the K8S and is requested according to the monitoring and inquiry, it is corresponding right with the object to be monitored in each pod to search Image information;It, will be each described right when each object information corresponding with the object to be monitored that receives that the K8S returns Image information is sent to pre-set full-duplex communication protocol Web Socket service;Determination is corresponding with WebSocket service Web page, and serviced by the WebSocket and show each object information on the web page, so that institute It states user and each object information is monitored by the web page.Using this method, when user needs in K8S Each pod when being monitored, each object information of object to be monitored is shown on web page, does not need to pass through input Each object information in the command lookup pod of various complexity improves the efficiency of management and the monitoring to each pod.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this The embodiment of invention for those of ordinary skill in the art without creative efforts, can also basis The attached drawing of offer obtains other attached drawings.
Fig. 1 is a kind of method flow diagram of information monitoring method provided in an embodiment of the present invention;
Fig. 2 is a kind of another method flow diagram of information monitoring method provided in an embodiment of the present invention;
Fig. 3 is a kind of another method flow diagram of information monitoring method provided in an embodiment of the present invention;
Fig. 4 is a kind of method exemplary diagram of information monitoring method provided in an embodiment of the present invention;
Fig. 5 is a kind of structure drawing of device of information monitoring device provided in an embodiment of the present invention;
Fig. 6 is the structural schematic diagram of an electronic equipment provided in an embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
In this application, relational terms such as first and second and the like be used merely to by an entity or operation with Another entity or operation distinguish, and without necessarily requiring or implying between these entities or operation, there are any this realities The relationship on border perhaps sequence the terms "include", "comprise" or any other variant thereof is intended to cover non-exclusive inclusion, from And to include the process, method, article or equipments of a series of elements not only to include those elements, but also including not bright The other element really listed, or further include for elements inherent to such a process, method, article, or device.Do not having In the case where more limitations, the element that is limited by sentence "including a ...", it is not excluded that include the element process, There is also other identical elements in method, article or equipment.
The present invention can be used in numerous general or special purpose computing device environment or configurations.Such as: personal computer, service Device computer, handheld device or portable device, laptop device, multi-processor device including any of the above devices or devices Distributed computing environment etc..
The embodiment of the invention provides a kind of information monitoring method, this method can be applied in multiple systems platform, be held Row main body can be terminal or the processor of various mobile devices, and the method flow diagram of the method is as shown in Figure 1, tool Body includes:
S101: when receiving the monitoring instruction of user's transmission, determining object to be monitored corresponding with the monitoring instruction, The object to be monitored is the operating status of each container group pod in pre-set container cluster management system K8S or pod days Will;
In embodiments of the present invention, when receive user send monitoring instruction when, determine it is corresponding with monitoring instruction to Monitored object, wherein the object to be monitored can be the operating status of each pod or pod log in K8S.
It should be noted that the object to be monitored may include the operating status and pod log of pod, but it is not limited only to transport Row state and pod log can specifically include operation process, restart and reconstruct.
S102: start pre-set Web service, and corresponding with the monitoring instruction according to Web service foundation Monitoring and inquiry request;
In embodiments of the present invention, it is instructed according to the monitoring that user sends, starts Web service, established and monitoring instruction pair The monitoring and inquiry request answered.
It should be noted that the Web service is previously deployed in the server for being provided with K8S, when user needs to monitor pod In each object when, by the Web service according to the monitoring of user instruction establish monitoring and inquiry request.
S103: it instructs corresponding monitoring and inquiry request to be sent in the K8S monitoring, triggers the K8S foundation Object information corresponding with the object to be monitored in each pod is searched in monitoring and inquiry request;
In embodiments of the present invention, monitoring and inquiry request is sent in K8S, triggers the K8S and is asked according to monitoring and inquiry Seek the object information for searching object to be monitored.Wherein, the object information of the object to be monitored is stored in pod, is arranged in the K8S There are multiple pod, therefore K8S obtains object corresponding with object to be monitored after receiving monitoring and inquiry request from each pod Information.
S104:, will be each when each object information corresponding with the object to be monitored that receives that the K8S returns The object information is sent to pre-set full-duplex communication protocol Web Socket service;
It in embodiments of the present invention, will when receiving each object information corresponding with object to be monitored of K8S return Each object information is sent to WebSocket service.
It should be noted that each object information of the WebSocket service for returning to K8S is opened up in real time Show.The WebSocket service is previously deployed in the server for being provided with the K8S.
S105: web page corresponding with WebSocket service is determined, and will be each by the WebSocket service A object information is shown on the web page, so that the user believes each object by the web page Breath is monitored.
In embodiments of the present invention, web page corresponding with the WebSocket is determined, it will be each right by WebSocket Image information is shown on the web page.Wherein, which is also possible to the web page of Web service, passes through WebSocket The display to object information is realized in service.User can check that each object information is checked by web page, to reach pair The purpose that each pod is monitored.
In method provided in an embodiment of the present invention, when user needs to be monitored the object in pod each in K8S, Monitoring instruction can be sent to the server where K8S.When receive user transmission monitoring instruction when, determine user need into The object to be monitored of row monitoring.Wherein, the object to be monitored include, the operating status of pod, pod log etc..Start Web service, Monitoring and inquiry corresponding with monitoring instruction is established by Web service to request, and monitoring and inquiry request is sent in K8S, K8S It is requested according to the monitoring and inquiry, inquires object information corresponding with the object to be monitored in each pod.It is returned when receiving K8S Each object information when, pass through the corresponding web page of WebSocket and show each object information.User can pass through the Web page Each object information is checked in face, to realize the monitoring to the object to be monitored.
It should be noted that can send monitoring when user sends monitoring instruction in the server by the web page and refer to It enables.The corresponding server page of the server that the Web page mask body can be user's current accessed.
Optionally, when the corresponding program code of the pod in K8S reconstructs, each pod is added according to new in the K8S Program code carry out mirror image and obtain the pod for having new program code, in the K8S after being reconstructed actively by pair after reconstruct Image information is returned, and updates the object information after web page display reconstruct.
Using method provided in an embodiment of the present invention, carried out by each information of the web page to each pod in K8S Management and monitoring, do not need to improve by the information in the command lookup pod that inputs various complexity management to each pod with The efficiency of monitoring.
In method provided in an embodiment of the present invention, it is based on above-mentioned steps S102, after receiving monitoring instruction, starting Web service and process according to Web service foundation corresponding with control instruction monitoring and inquiry request is as shown in Fig. 2, specifically include:
S201: obtaining the corresponding web subprocess of the Web service, and by monitoring instruction be sent to web into Journey;
In embodiments of the present invention, after starting Web service, the corresponding web subprocess of the Web service is obtained, and will prison Control instruction is sent in web subprocess, which is used for transmission monitoring instruction.
It should be noted that the Web service is attached by web subprocess with K8S, also by the web subprocess with Connection is established in WebSocket service.
S202: system identification format corresponding with the K8S is determined, and the application web subprocess is according to the system It identifies format, establishes monitoring and inquiry request corresponding with the monitoring instruction.
In embodiments of the present invention, after obtaining the corresponding web subprocess of Web service, determine that the corresponding system of the K8S is known Other format.And according to the system identification format, monitoring and inquiry request corresponding with monitoring instruction is established.
It should be noted that the system identification format is the lattice that K8S system can identify after receiving instructions or requests Formula, and monitoring and inquiry request is established according to the format, K8S system can request the monitoring and inquiry according to the system identification format It is identified, determines that user requests the object to be monitored of monitoring.
Row in method provided in an embodiment of the present invention is instructed when in the monitoring for receiving user's transmission, and the determining and prison After control instructs corresponding object to be monitored, monitoring and inquiry corresponding with monitoring instruction is established by the web subprocess of Web service Request, wherein monitoring and inquiry request is that the system identification format that can be is established according to K8S, so that the K8S is being received After monitoring and inquiry request, it can identify that user requests the object to be monitored of monitoring.
It should be noted that the monitoring instruction and monitoring and inquiry request are sent from web subprocess to K8S.
Using method provided in an embodiment of the present invention, the identifiable monitoring and inquiry of K8S system is established by web subprocess and is asked It asks, so that K8S returns to object information corresponding with object to be monitored according to the request, and by web page to each in K8S Each information of pod is managed and monitors, and does not need the information in the command lookup pod by the various complexity of input, improves To the efficiency of management and the monitoring of each pod.
It is described returning with the object pair to be monitored when receive the K8S in method provided in an embodiment of the present invention When each object information answered, each object information is sent to pre-set full-duplex communication protocol Web Socket The process of service is as shown in figure 3, specifically include:
S301: when receiving the object information for each object to be monitored that the K8S is returned, using the web Each object information is ranked up by subprocess according to pre-set arrangement mode;
It in embodiments of the present invention, will be each using the web subprocess when receiving K8S return each object information Object information is ranked up according to pre-set arrangement mode.
It should be noted that the arrangement mode is specially putting in order for pod, it is ranked up as unit of a pod, often A pod corresponds to multiple threads of application program, that is, multiple program codes;Each pod according to each thread execution sequence into Row sequence.
S302: each ordering object information is sequentially input in pre-set information list, and saves the letter Cease list;
In embodiments of the present invention, ordering each object information is sequentially input in information list, and by the information List is saved.
Optionally, it before by ordering each object information input to information list, can first obtain pre-set Information list.
Further, after being saved the information list, if subsequent update each object information, which is arranged Table is performed in accordance with update.
S303: the information list is sent in the WebSocket service by the application web subprocess.
It in embodiments of the present invention, should by the web subprocess after by each object information preservation to information list Information list is sent in WebSocket service, and WebSocket service shows the information list on web page.
In information monitoring method provided in an embodiment of the present invention, when K8S returns to object to be monitored according to monitoring and inquiry request When corresponding each object information, each object is ranked up by web subprocess, and by ordering each object It in information input information list and saves, WebSocket service finally will be connected by web subprocess, information list is sent to In WebSocket service.When WebSocket service after receiving information list, which is shown in web page On.
It should be noted that the information list is on web page when being shown, using each pod as information list in Selectionbar shown, when user checks each object information by web page, it is only necessary to it is corresponding to click each pod Selectionbar, the object information in pod that can be shown and be selected.Mode is particularly shown as shown in figure 4, the project in Fig. 4 arranges Table is the information list in the embodiment of the present invention, wherein the NAME in the list is the corresponding title of each pod.Should After bulleted list is shown on web page, user can be clicked the corresponding information of each pod by the list column of " operation " It checks.Such as click and check " log ", then it can check the corresponding history log information of pod being clicked;Click " real-time day Will " can then check the corresponding current real-time logs information of the pod being clicked;If clicking " restarting ", pod is restarted, and will Current " running " state of the pod is changed to " ContainerCreating " state, such as " icinder- entitled in Fig. 4 The pod current state of openstack-9bcb8bd98-npv6z " is " ContainerCreating ";If it exists in a pod Code change or when being added to new code, can check " reconstruct " by clicking, then can check the reconstruct of the pod Information, that is, check the new particular content that code is added and log information etc.;If clicking " entering container ", can check by point The history log information of each container and current real-time logs information in the pod hit.
It further illustrates, in the embodiment of the present invention, other than it may be implemented to be monitored pod, can also realize to K8S In various nodes, equipment monitoring.And it is shown in the information list shown on web page corresponding with each pod each When object information, each object information includes but are not limited to log, real-time logs, reconstructs, restarts, into container etc..
It optionally, can be on web page when user needs to check the log information of any one pod in web page The title that pod is inputted in search box, the pod monitored required for can inquiring.
Using method provided in an embodiment of the present invention, each object information is subjected to orderly arrangement and is saved to information list In, facilitate user to check each object information, improves the efficiency of management and the monitoring to each pod.
In method provided in an embodiment of the present invention, is serviced by the WebSocket and show each object information After on the web page, further includes:
It calls the web subprocess according to pre-set polling cycle, sends the monitoring and inquiry to the K8S in real time Request;
Each existing object information corresponding with monitoring and inquiry request that the K8S is returned is obtained in real time, and will be each A existing object information is sent in the WebSocket service;
By WebSocket service according to each existing object information, the web page is updated, and by institute It states existing object information and is shown in the web page.
In information monitoring method provided in an embodiment of the present invention, each object information is being obtained according to the inquiry instruction of user After being shown to web page, requested sending same monitoring and inquiry to K8S according to polling cycle by web subprocess.Due to setting It is equipped in the server of K8S and deploys WebSocket service, therefore it may only be necessary to send primary request to K8S, web subprocess will Obtain the object information of object to be monitored in K8S in real time, each web subprocess hair to be received such as WebSocket service only needs The object information sent.WebSocket is serviced after receiving each existing object information every time, is carried out more to web page Newly, and by each existing object information it is shown on web page.
Using method provided in an embodiment of the present invention, can on web page real-time update object information, to realize pair The real time monitoring of each pod in K8S inputs instruction every time without user and is updated the object information of each pod, improves pair The efficiency of management and the monitoring of each pod.
In method provided in an embodiment of the present invention, shown after web page by each object information, specifically further include:
When receiving the out code that user is sent by the web page, stop showing each in the web page A object information, and close the web page.
In method provided in an embodiment of the present invention, if user after having checked each object information of object to be monitored, can Send out code by web page, specifically include: user clicks the close button for closing web page or is connected by web page The outside port connect sends out code.When receiving out code, no longer each object information is shown, it will not It is updated again, which is closed.
Optionally, after receiving out code and closing web page, the web services originally started can also be closed It closes, when receiving the monitoring instruction of user's transmission again, restarts the Web service.
Using method provided in an embodiment of the present invention, when user needs to be monitored pod each in K8S, according to The monitoring instruction at family shows each object information to user, when user terminates monitoring, according to the out code of user Web page is closed, the usage experience of user is improved.
The specific implementation process and its deriving mode of above-mentioned each embodiment, it is within the scope of the present invention.
Corresponding with method described in Fig. 1, the embodiment of the invention also provides a kind of information monitoring devices, for Fig. 1 The specific implementation of middle method, information monitoring device provided in an embodiment of the present invention can be set with application computer terminal or various movements In standby, structural schematic diagram is as shown in figure 5, specifically include:
Determination unit 501, for when receiving the monitoring instruction of user's transmission, determination to be corresponding with the monitoring instruction Object to be monitored, the object to be monitored are the operation of each container group pod in pre-set container cluster management system K8S State or pod log;
Unit 502 is established, is established and the monitoring for starting pre-set Web service, and according to the Web service Corresponding monitoring and inquiry is instructed to request;
Trigger unit 503 is triggered for instructing corresponding monitoring and inquiry request to be sent in the K8S monitoring The K8S is requested according to the monitoring and inquiry, searches object information corresponding with the object to be monitored in each pod;
Transmission unit 504, for each object corresponding with the object to be monitored to be believed when receive that the K8S returns When breath, each object information is sent to pre-set full-duplex communication protocol Web Socket service;
Display unit 505, for determining web page corresponding with WebSocket service, and by described WebSocket service shows each object information on the web page, so that the user passes through the Web page It is monitored in face of each object information.
It is described to establish unit in device provided in an embodiment of the present invention, comprising:
Subelement is obtained, is sent to for obtaining the corresponding web subprocess of the Web service, and by monitoring instruction The web subprocess;
Establish subelement, for determining corresponding with K8S system identification format, and apply the web subprocess according to According to the system identification format, monitoring and inquiry request corresponding with the monitoring instruction is established.
In device provided in an embodiment of the present invention, the transmission unit, comprising:
Sorting subunit, for answering when receiving the object information for each object to be monitored that the K8S is returned With the web subprocess, each object information is ranked up according to pre-set arrangement mode;
Saving subunit, for each ordering object information to be sequentially input in pre-set information list, and Save the information list;
The information list is sent to the WebSocket for the application web subprocess and serviced by transmission sub-unit In.
In device provided in an embodiment of the present invention, further includes:
Updating unit is sent out to the K8S in real time for calling the web subprocess according to pre-set polling cycle The monitoring and inquiry is sent to request;Each existing object corresponding with monitoring and inquiry request that the K8S is returned is obtained in real time Information, and each existing object information is sent in the WebSocket service;It is serviced by the WebSocket According to each existing object information, the web page is updated, and the existing object information is shown in the Web page Face.
In device provided in an embodiment of the present invention, further includes:
Closing unit, for stopping described in display when receiving the out code that user is sent by the web page Each object information in web page, and close the web page.
Determination unit 501 in the above information monitoring device disclosed by the embodiments of the present invention, to establish unit 502, triggering single Member 503, the specific work process of transmission unit 504 and display unit 505, reference can be made to information disclosed in the above embodiment of the present invention Corresponding content in monitoring method, is not discussed here.
The embodiment of the invention also provides a kind of storage medium, the storage medium includes the instruction of storage, wherein in institute It states the equipment where controlling the storage medium when instruction operation and executes above- mentioned information monitoring method.
The embodiment of the invention also provides a kind of electronic equipment, structural schematic diagram is as shown in fig. 6, specifically include memory 601 and one perhaps more than one 602 one of them or more than one instruction of instruction 602 be stored in memory 601 In, and be configured to by one or more than one processor 603 execute the one or more instruction 602 carry out with Lower operation:
When receiving the monitoring instruction of user's transmission, object to be monitored corresponding with the monitoring instruction is determined, it is described Object to be monitored is the operating status or pod log of each container group pod in pre-set container cluster management system K8S;
Start pre-set Web service, and establishes monitoring corresponding with the monitoring instruction according to the Web service and look into Ask request;
It instructs corresponding monitoring and inquiry request to be sent in the K8S monitoring, triggers the K8S according to the prison Inquiry request is controlled, object information corresponding with the object to be monitored in each pod is searched;
When each object information corresponding with the object to be monitored that receives that the K8S returns, will it is each described in Object information is sent to pre-set full-duplex communication protocol Web Socket service;
It determines web page corresponding with WebSocket service, and is serviced by the WebSocket by each institute Object information is stated to be shown on the web page so that the user by the web page to each object information into Row monitoring.
All the embodiments in this specification are described in a progressive manner, same and similar portion between each embodiment Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for system or For system embodiment, since it is substantially similar to the method embodiment, so describing fairly simple, related place is referring to method The part of embodiment illustrates.System and system embodiment described above is only schematical, wherein the conduct The unit of separate part description may or may not be physically separated, component shown as a unit can be or Person may not be physical unit, it can and it is in one place, or may be distributed over multiple network units.It can root According to actual need that some or all of the modules therein is selected to achieve the purpose of the solution of this embodiment.Ordinary skill Personnel can understand and implement without creative efforts.
Professional further appreciates that, unit described in conjunction with the examples disclosed in the embodiments of the present disclosure And algorithm steps, it can be realized with electronic hardware, computer software, or a combination of the two.
In order to clearly illustrate the interchangeability of hardware and software, it is generally retouched according to function in the above description Each exemplary composition and step are stated.These functions are implemented in hardware or software actually, depending on technical solution Specific application and design constraint.Professional technician can to each specific application come using distinct methods to realize The function of description, but such implementation should not be considered as beyond the scope of the present invention.
The foregoing description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, as defined herein General Principle can be realized in other embodiments without departing from the spirit or scope of the present invention.Therefore, of the invention It is not intended to be limited to the embodiments shown herein, and is to fit to and the principles and novel features disclosed herein phase one The widest scope of cause.

Claims (10)

1. a kind of information monitoring method characterized by comprising
When receiving the monitoring instruction of user's transmission, object to be monitored corresponding with the monitoring instruction is determined, it is described wait supervise Control the operating status or pod log that object is each container group pod in pre-set container cluster management system K8S;
Start pre-set Web service, and establishes monitoring and inquiry corresponding with the monitoring instruction according to the Web service and ask It asks;
It instructs corresponding monitoring and inquiry request to be sent in the K8S monitoring, triggers the K8S and looked into according to the monitoring Request is ask, object information corresponding with the object to be monitored in each pod is searched;
When each object information corresponding with the object to be monitored that receives that the K8S returns, by each object Information is sent to pre-set full-duplex communication protocol Web Socket service;
Determine web page corresponding with WebSocket service, and will be each described right by WebSocket service Image information is shown on the web page, so that the user supervises each object information by the web page Control.
2. the method according to claim 1, wherein described establish according to the Web service refers to the monitoring Corresponding monitoring and inquiry is enabled to request, comprising:
The corresponding web subprocess of the Web service is obtained, and monitoring instruction is sent to the web subprocess;
It determines corresponding with K8S system identification format, and applies the web subprocess according to the system identification format, Establish monitoring and inquiry request corresponding with the monitoring instruction.
3. according to the method described in claim 2, it is characterized in that, described when receiving that the K8S returns with described wait supervise When controlling the corresponding each object information of object, each object information is sent to pre-set full-duplex communication agreement WebSocket service, comprising:
It, will using the web subprocess when receiving the object information for each object to be monitored that the K8S is returned Each object information is ranked up according to pre-set arrangement mode;
Each ordering object information is sequentially input in pre-set information list, and saves the information list;
The information list is sent in the WebSocket service using the web subprocess.
4. the method according to claim 1, wherein being serviced by the WebSocket by each object After information is shown on the web page, further includes:
It calls the web subprocess according to pre-set polling cycle, sends the monitoring and inquiry to the K8S in real time and ask It asks;
Obtain each existing object information corresponding with monitoring and inquiry request that the K8S is returned in real time, and by each institute Existing object information is stated to be sent in the WebSocket service;
By WebSocket service according to each existing object information, the web page is updated, and is worked as by described in Preceding object information is shown in the web page.
5. method according to claim 1 or 4, which is characterized in that further include:
When receiving the out code that user is sent by the web page, stop showing each institute in the web page Object information is stated, and closes the web page.
6. a kind of information monitoring device characterized by comprising
Determination unit, for when receiving the monitoring instruction of user's transmission, determination to be corresponding to be monitored with the monitoring instruction Object, the object to be monitored be pre-set container cluster management system K8S in each container group pod operating status or Pod log;
Unit is established, is established and monitoring instruction pair for starting pre-set Web service, and according to the Web service The monitoring and inquiry request answered;
Trigger unit triggers the K8S for instructing corresponding monitoring and inquiry request to be sent in the K8S monitoring It is requested according to the monitoring and inquiry, searches object information corresponding with the object to be monitored in each pod;
Transmission unit will for when each object information corresponding with the object to be monitored that receives that the K8S returns Each object information is sent to pre-set full-duplex communication protocol Web Socket service;
Display unit for determining web page corresponding with WebSocket service, and is serviced by the WebSocket Each object information is shown on the web page, so that the user is by the web page to each described right Image information is monitored.
7. device according to claim 6, which is characterized in that described to establish unit, comprising:
Subelement is obtained, for obtaining the corresponding web subprocess of the Web service, and described in monitoring instruction is sent to Web subprocess;
Subelement is established, for determining system identification format corresponding with the K8S, and the application web subprocess is according to institute System identification format is stated, monitoring and inquiry request corresponding with the monitoring instruction is established.
8. device according to claim 6, which is characterized in that the transmission unit, comprising:
Sorting subunit, for when receiving the object information for each object to be monitored that the K8S is returned, using institute Web subprocess is stated, each object information is ranked up according to pre-set arrangement mode;
Saving subunit for sequentially inputting each ordering object information in pre-set information list, and saves The information list;
The information list is sent in the WebSocket service by transmission sub-unit for the application web subprocess.
9. device according to claim 6, which is characterized in that further include:
Updating unit sends institute to the K8S in real time for calling the web subprocess according to pre-set polling cycle State monitoring and inquiry request;Each existing object information corresponding with monitoring and inquiry request that the K8S is returned is obtained in real time, And each existing object information is sent in the WebSocket service;By WebSocket service according to each A existing object information updates the web page, and the existing object information is shown in the web page.
10. device according to claim 6 or 9, which is characterized in that further include:
Closing unit shows the web for stopping when receiving the out code that user is sent by the web page Each object information in the page, and close the web page.
CN201910736149.9A 2019-08-09 2019-08-09 Information monitoring method and device Pending CN110515696A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910736149.9A CN110515696A (en) 2019-08-09 2019-08-09 Information monitoring method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910736149.9A CN110515696A (en) 2019-08-09 2019-08-09 Information monitoring method and device

Publications (1)

Publication Number Publication Date
CN110515696A true CN110515696A (en) 2019-11-29

Family

ID=68625414

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910736149.9A Pending CN110515696A (en) 2019-08-09 2019-08-09 Information monitoring method and device

Country Status (1)

Country Link
CN (1) CN110515696A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111708611A (en) * 2020-07-02 2020-09-25 浪潮云信息技术股份公司 Lightweight Kubernetes monitoring system and method
CN112165622A (en) * 2020-09-23 2021-01-01 上海网达软件股份有限公司 Single-Pod multi-protocol video file transcoding method and system
CN112383641A (en) * 2021-01-13 2021-02-19 国网汇通金财(北京)信息科技有限公司 Service keep-alive monitoring method and device
CN113810241A (en) * 2020-06-15 2021-12-17 北京金山云网络技术有限公司 Test method and device for kubernets cluster

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105337787A (en) * 2014-07-29 2016-02-17 北京奇虎科技有限公司 Multi-server monitoring method, device and system
US20170111241A1 (en) * 2015-10-19 2017-04-20 Draios Inc. Automated service-oriented performance management
EP3282356A1 (en) * 2016-08-11 2018-02-14 Entit Software LLC Container monitoring configuration deployment
CN109324892A (en) * 2018-07-24 2019-02-12 北京京东尚科信息技术有限公司 Distribution management method, distributed management system and device
CN109587233A (en) * 2018-11-28 2019-04-05 深圳前海微众银行股份有限公司 Cloudy Container Management method, equipment and computer readable storage medium
CN109697153A (en) * 2018-12-28 2019-04-30 浙江省公众信息产业有限公司 Monitoring method, monitoring system and computer readable storage medium
CN109960634A (en) * 2019-03-29 2019-07-02 新华三技术有限公司 A kind of method for monitoring application program, apparatus and system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105337787A (en) * 2014-07-29 2016-02-17 北京奇虎科技有限公司 Multi-server monitoring method, device and system
US20170111241A1 (en) * 2015-10-19 2017-04-20 Draios Inc. Automated service-oriented performance management
EP3282356A1 (en) * 2016-08-11 2018-02-14 Entit Software LLC Container monitoring configuration deployment
CN109324892A (en) * 2018-07-24 2019-02-12 北京京东尚科信息技术有限公司 Distribution management method, distributed management system and device
CN109587233A (en) * 2018-11-28 2019-04-05 深圳前海微众银行股份有限公司 Cloudy Container Management method, equipment and computer readable storage medium
CN109697153A (en) * 2018-12-28 2019-04-30 浙江省公众信息产业有限公司 Monitoring method, monitoring system and computer readable storage medium
CN109960634A (en) * 2019-03-29 2019-07-02 新华三技术有限公司 A kind of method for monitoring application program, apparatus and system

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113810241A (en) * 2020-06-15 2021-12-17 北京金山云网络技术有限公司 Test method and device for kubernets cluster
CN111708611A (en) * 2020-07-02 2020-09-25 浪潮云信息技术股份公司 Lightweight Kubernetes monitoring system and method
CN112165622A (en) * 2020-09-23 2021-01-01 上海网达软件股份有限公司 Single-Pod multi-protocol video file transcoding method and system
CN112165622B (en) * 2020-09-23 2023-06-27 上海网达软件股份有限公司 Single-Pod multi-coroutine video file transcoding method and system
CN112383641A (en) * 2021-01-13 2021-02-19 国网汇通金财(北京)信息科技有限公司 Service keep-alive monitoring method and device
CN112383641B (en) * 2021-01-13 2021-04-06 国网汇通金财(北京)信息科技有限公司 Service keep-alive monitoring method and device

Similar Documents

Publication Publication Date Title
CN110515696A (en) Information monitoring method and device
US11023270B2 (en) Configuration of decoupled upgrades for container-orchestration system-based services
US9876878B2 (en) Seamless cluster servicing
CN109002295A (en) A kind of static code scan method, system, server and storage medium
CN110489417A (en) A kind of data processing method and relevant device
CN108306917A (en) The register method and device of data processing method and device, micro services module
CN105656739A (en) Method and device for batch configuration of Internet of things devices
WO2015149505A1 (en) Sdn application integration, management and control method, system and device
WO2013075488A1 (en) Network element upgrading method and device
CN107920103A (en) A kind of method and system and client and server of information push
CN113297031B (en) Container group protection method and device in container cluster
CN115357198B (en) Mounting method and device of storage volume, storage medium and electronic equipment
US7805734B2 (en) Platform management of high-availability computer systems
CN114257550A (en) Automatic control method and device for interface access flow, storage medium and server
CN110069406A (en) The TPC-DS test method and system of automatic trigger
CN109729132A (en) Method of controlling switch, device, equipment and computer readable storage medium
CN112130889A (en) Resource management method and device, storage medium and electronic device
CN110347659A (en) Data processing method and device, transaction data processing method and device
CN110471897A (en) File management method and device
CN107402785A (en) A kind of collocation method and device
CN111400060B (en) Equipment linkage method, device, server and medium
CN110309120A (en) Data processing method and data processing equipment
CN111046160B (en) Interaction method, interaction device and computer system
CN114968505A (en) Task processing system, method, device, apparatus, storage medium, and program product
De Leoni et al. Mobile process management through web services

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: 20191129

RJ01 Rejection of invention patent application after publication