Method and device for realizing observability, readable storage medium, and electronic device

By creating observability resource declarations and parsing unit information, the problem of low efficiency in observability capability building in existing technologies is solved, data collection efficiency is improved, costs are reduced, and flexible collection control is achieved.

CN115437610BActive Publication Date: 2024-10-11CHINA TELECOM CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211117085.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-14
Publication Date
2024-10-11
Estimated Expiration
2042-09-14

Smart Images

  • Figure CN115437610B_ABST
    Figure CN115437610B_ABST
Patent Text Reader

Abstract

The present disclosure belongs to the field of cloud computing technology, and relates to a method and device for realizing observability, a readable storage medium, and an electronic device. The method includes: determining observability requirements, and creating an observability resource declaration according to the observability requirements; parsing the observability resource declaration to obtain unit information, and creating an observability component and an observation unit according to the unit information; deploying the observability component to the observation unit, and running the observation unit to collect data that meets the observability requirements. In the present disclosure, an observability resource declaration is created according to the observability requirements, the observability resource declaration is parsed to obtain unit information, and an observability component is created according to the unit information, which decouples the dependencies between various teams in the process of collecting observability data and improves the efficiency of collecting data that meets the observability requirements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of cloud computing, and in particular to a method for implementing observability, an apparatus for implementing observability, a computer-readable storage medium, and an electronic device. Background Art

[0002] As business applications continue to evolve towards microservices, systems become more complex, and observability is needed to describe the full picture of the business and applications.

[0003] In related technologies, developers and operation and maintenance personnel not only need to focus on the application itself, but also need to develop corresponding functions based on the observability software architecture provided by the infrastructure. This dependency and coupling relationship makes the observability capability construction inefficient. Not only that, due to this dependency and coupling relationship, the cognitive cost, coordination cost and adaptation cost between developers and operation and maintenance personnel are increased, and it is inevitable to repeat the development of a large number of the same indicators.

[0004] In view of this, there is an urgent need in the art to develop a new method and device for achieving observability.

[0005] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention

[0006] The purpose of the present disclosure is to provide a method for achieving observability, an apparatus for achieving observability, a computer-readable storage medium, and an electronic device, thereby at least to a certain extent overcoming the problem of inefficiency in building observability capabilities caused by related technologies.

[0007] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.

[0008] According to a first aspect of an embodiment of the present invention, a method for implementing observability is provided, the method comprising: determining observability requirements, and creating an observability resource declaration based on the observability requirements; parsing the observability resource declaration to obtain unit information, and creating an observability component and an observation unit based on the unit information; deploying the observability component to the observation unit, and running the observation unit to collect data that meets the observability requirements.

[0009] In an exemplary embodiment of the present invention, the observability resource declaration is used to define collection indicator information corresponding to the observability requirement and collection behavior information corresponding to the collection indicator information; the collection indicator information includes a collection indicator set, an indicator detail declaration and a custom indicator; the collection behavior information includes a collection frequency, a collection time range, a service entry, a target load and a deployment method; the service entry is the entry for exporting observability resources, the target load is the load of the observability resource application, and the deployment method is used to declare the mode of deployment of the observability resource.

[0010] In an exemplary embodiment of the present invention, parsing the observability resource declaration to obtain unit information includes: monitoring an application programming interface server; if observability resource change information is monitored, determining the observability resource declaration corresponding to the observability resource change information; and parsing the observability resource declaration to obtain unit information.

[0011] In an exemplary embodiment of the present invention, parsing the observability resource declaration to obtain unit information includes: obtaining a preset key field corresponding to the observability resource declaration; if there is a target key field in the observability resource declaration that corresponds one-to-one to the preset key field, parsing the observability resource declaration to obtain unit information.

[0012] In an exemplary embodiment of the present invention, running the observation unit to collect data that meets the observability requirement includes: performing resource scheduling on the observation unit to determine the target working node to establish a binding relationship between the observation unit and the target working node; based on the binding relationship, using the container process corresponding to the target working node to run the observation unit to collect data that meets the observability requirement.

[0013] In an exemplary embodiment of the present invention, the method further includes: if the container process receives a stop signal, terminating the observation unit to terminate the collection of the data that meets the observability requirement.

[0014] In an exemplary embodiment of the present invention, the method also includes: assigning a label to the observation unit; obtaining a target observation unit with the same label, and determining the target data collected in the target observation unit that meets the target observability requirement; the target observability requirement corresponds to the target observation unit; and storing the target data in the same storage area.

[0015] According to a second aspect of an embodiment of the present invention, there is provided an apparatus for implementing observability, the apparatus comprising: a declaration module, configured to determine observability requirements, and create an observability resource declaration according to the observability requirements; a control module, configured to parse the observability resource declaration to obtain unit information, and create an observability component and an observation unit according to the unit information; and a node module, configured to deploy the observability component to the observation unit, and run the observation unit to collect data that meets the observability requirements.

[0016] According to a third aspect of an embodiment of the present invention, there is provided an electronic device, comprising: a processor and a memory; wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the method for realizing observability of any of the above exemplary embodiments is implemented.

[0017] According to a fourth aspect of an embodiment of the present invention, there is provided a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the method for realizing observability in any of the above exemplary embodiments is realized.

[0018] It can be seen from the above technical solutions that the method for realizing observability, the device for realizing observability, the computer storage medium and the electronic device in the exemplary embodiments of the present invention have at least the following advantages and positive effects:

[0019] In the method and apparatus provided in the exemplary embodiments of the present disclosure, an observability resource declaration is created according to observability requirements, the observability resource declaration is parsed to obtain unit information, and an observability component is created according to the unit information. On the one hand, the above process decouples the dependencies between teams in the process of collecting observability resources, thereby improving the efficiency of collecting data that meets observability requirements; on the other hand, developers and operation and maintenance personnel do not need to care about the monitoring software and architecture used by the infrastructure to create observability resource declarations, reducing the cognitive cost, coordination cost and adaptation cost of different observability software to operation and maintenance personnel and developers; on the other hand, observability resource declarations can be flexibly created according to different observability requirements, thereby realizing refined collection control.

[0020] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.

[0022] Figure 1 A schematic diagram schematically shows a flow chart of a method for achieving observability in an embodiment of the present disclosure;

[0023] Figure 2 A schematic diagram of a process of parsing an observable resource declaration to obtain unit information in an embodiment of the present disclosure is schematically shown;

[0024] Figure 3 Another flowchart of parsing an observable resource declaration to obtain unit information in an embodiment of the present disclosure is schematically shown;

[0025] Figure 4 A schematic diagram of a process for collecting data that meets observability requirements in an embodiment of the present disclosure is schematically shown;

[0026] Figure 5 A schematic diagram of a process of operating an observation unit in an embodiment of the present disclosure is schematically shown;

[0027] Figure 6 A schematic diagram of a process of storing target data in the same storage area in an embodiment of the present disclosure is shown;

[0028] Figure 7 A flow chart of a method for realizing observability in an application scenario is shown;

[0029] Figure 8 A schematic diagram schematically shows a structure of a device for achieving observability in an embodiment of the present disclosure;

[0030] Fig. 9 An electronic device for implementing an observable method in an embodiment of the present disclosure is schematically shown;

[0031] Fig.10 A computer-readable storage medium for implementing a method for observability in an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION

[0032] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as being limited to the examples set forth herein; on the contrary, these embodiments are provided so that the present disclosure will be more comprehensive and complete, and the concepts of the example embodiments are fully conveyed to those skilled in the art. The described features, structures, or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.

[0033] The terms "a", "an", "the" and "said" are used in this specification to indicate the presence of one or more elements / components / etc.; the terms "including" and "having" are used to express an open-ended inclusion and mean that additional elements / components / etc. may exist in addition to the listed elements / components / etc.; the terms "first" and "second" etc. are used only as labels and are not intended to limit the quantity of their objects.

[0034] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings represent the same or similar parts, and their repeated descriptions will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities.

[0035] In view of the problems existing in the related art, the present disclosure proposes a method for achieving observability. Figure 1 A flowchart of a method for achieving observability is shown, such as Figure 1 As shown, the method to achieve observability includes at least the following steps:

[0036] Step S110: Determine observability requirements and create observability resource declarations based on the observability requirements.

[0037] Step S120. Parse the observability resource declaration to obtain unit information, and create observability components and observation units based on the unit information.

[0038] Step S130. Deploy the observability component to the observation unit, and run the observation unit to collect data that meets the observability requirements.

[0039] In the method and apparatus provided in the exemplary embodiments of the present disclosure, an observability resource declaration is created according to observability requirements, the observability resource declaration is parsed to obtain unit information, and an observability component is created according to the unit information. On the one hand, the above process decouples the dependencies between teams in the process of collecting observability resources, thereby improving the efficiency of collecting data that meets observability requirements; on the other hand, developers and operation and maintenance personnel do not need to care about the monitoring software and architecture used by the infrastructure to create observability resource declarations, reducing the cognitive cost, coordination cost and adaptation cost of different observability software to operation and maintenance personnel and developers; on the other hand, observability resource declarations can be flexibly created according to different observability requirements, thereby realizing refined collection control.

[0040] The following is a detailed description of each step of the method to achieve observability.

[0041] In step S110 , observability requirements are determined, and observability resource declarations are created according to the observability requirements.

[0042] In the exemplary embodiment of the present disclosure, observability refers to the ability to output characteristics that fully reflect the state of the system. Specifically, the system may be a container cluster management system or any other system, and this exemplary embodiment does not specifically limit this.

[0043] Observability requirements are pre-set requirements that describe the needs of management or operation and maintenance personnel for data that reflects the characteristics of the system status. Observability resource declarations are used to define the data collected later to meet observability requirements.

[0044] For example, the determined observability requirement is the requirement to collect indicators related to the central processing unit. Based on this, an observability resource declaration corresponding to the requirement to collect indicators related to the central processing unit can be created.

[0045] In an optional embodiment, the observability resource declaration is used to define collection indicator information corresponding to the observability requirements and collection behavior information corresponding to the collection indicator information; the collection indicator information includes a collection indicator set, a detailed indicator declaration, and a custom indicator; the collection behavior information includes a collection frequency, a collection time range, a service entry, a target load, and a deployment method; the service entry is the entry for exporting observability resources, the target load is the load of the observability resource application, and the deployment method is used to declare the mode of observability resource deployment.

[0046] Among them, two contents are defined in the observability resource declaration, one of which is the collection indicator information corresponding to the observability requirement, and the other is the collection behavior information corresponding to the collection indicator information.

[0047] Specifically, the collected indicator information includes a collection indicator set (that is, all indicators that need to be collected. For example, the collection indicator set can be a set of indicators related to the central processing unit). The collected indicator information also includes an indicator detail statement. The indicator detail statement refers to which information corresponding to the collection indicator set is specifically collected. For example, the indicator detail statement can be the pressure of the network element application on the IP (Internet Protocol address) virtual server in the network proxy component among the indicators related to the central processing unit. The collected indicator information also includes custom indicators. There is an indicator library in the system itself, and there are some pre-set indicators in the indicator library. When there are no indicators that meet the observability requirements among these pre-set indicators, indicators that meet the observability requirements can be defined in a custom manner. At this time, the indicators that meet the observability requirements defined in a custom manner are custom indicators.

[0048] The collection behavior information may include the collection frequency (i.e., the frequency of collection). The collection behavior information may also include the collection time range (i.e., the time range consisting of the collection start time and the collection end time). The collection behavior information also includes the service entry (i.e., the service entry for exporting data that meets the observability requirements). Among them, observability resources are data that meet the observability requirements.

[0049] The collected behavior information also includes the target load (ie, the load that the observability resource will apply) and the deployment mode (ie, the mode in which the observability resource is deployed).

[0050] For example, according to the observability requirements, an observability resource declaration in the YAML (another markup language) file format can be created. The reason why the observability resource declaration is created in the YAML file format is that the YAML file format is an intuitive data serialization format that can be recognized by computers. In addition, if the system is a container cluster management system, since the default file format of the container cluster management system is the YAML file format, by creating an observability resource declaration in the YAML format, the system can perform subsequent processing on the observability resource declaration more efficiently.

[0051] Specifically, the observability resource declaration created is

[0052] “modular:”cpu”

[0053] detail:”node_ipvs_backend_connections_active”

[0054] selector:

[0055] app:demo

[0056] deployment:side-car

[0057] interval:3s

[0058] exporters:Prometheus-server.svc

[0059] time:

[0060] starttime:8:05

[0061] endtime:9:23”

[0062] Among them, modular:"cpu" means that the set of collected indicators in the observability resource declaration is a set of indicators related to cpu; detail:"node_ipvs_backend_connections_active" means that the indicator detail information in the observability resource declaration is to only collect the pressure of the network element application on the IP (Internet Protocol address) virtual server in the network proxy component; ap p:demo means that the target load in the observability resource declaration is demo; deployme nt:side-car means that the deployment method in the observability resource declaration is to differentiate the functions of the application into separate processes; interval:3s means that the collection frequency in the observability resource declaration is 3 seconds; exporters:Prometheus-server.svc means that the service entry in the observability resource declaration is Prometheus-server.svc; starttime:8:05endtime:9:23" means the collection time range in the observability resource declaration.

[0063] In an optional embodiment, the observability resource declaration defines the collection indicator information and the collection behavior information. On the one hand, this lays the foundation for the subsequent creation of observability components and observation units based on the observability resource declaration. On the other hand, developers and operation and maintenance personnel only need to create observability resource declarations and no longer need to learn how to program code or collaborate with the basic collection framework, which reduces the cognitive cost, collaboration cost, and adaptation cost of developers and operation and maintenance personnel.

[0064] In step S120, the observability resource declaration is parsed to obtain unit information, and observability components and observation units are created according to the unit information.

[0065] In the exemplary embodiments of the present disclosure, a unit refers to a smallest unit that can be created and managed in a system, and correspondingly, the unit information is information used when creating the smallest unit.

[0066] Observability components refer to collection components that collect data that meets observability requirements and processing components that process data that meets observability requirements. Observation units refer to units where the above observability components are deployed.

[0067] For example, if the system is a container cluster management system, the unit information (i.e., pod information) can be obtained after parsing the observability resource declaration. According to the parsed pod information, the collection component, processing component, and pod unit can be created.

[0068] In an alternative embodiment, Figure 2 A schematic diagram of a process of parsing an observability resource declaration to obtain unit information in a method for implementing observability is shown, such as Figure 2 As shown, the method at least includes the following steps: In step S210, the application programming interface server is monitored.

[0069] The application programming interface server (API Server) refers to a server in the container cluster management system. For example, the container cluster management system can monitor the API Server using a message notification mechanism (i.e., list-watch mechanism).

[0070] In step S220, if observability resource change information is monitored, the observability resource declaration corresponding to the observability resource change information is determined.

[0071] The observability resource change information refers to the information describing the change of the observability resource declaration. It is worth noting that when the observability resource change information exists, it proves that the observability resource declaration exists in the API Server at this time.

[0072] For example, the list-watch mechanism is used to monitor the API Serve. When the observability resource change information A is monitored, the observability resource declaration corresponding to the observability change information A is determined.

[0073] In step S230, the observability resource declaration is parsed to obtain unit information.

[0074] Among them, after the observability resource declaration is determined, the observability resource declaration can be parsed to obtain unit information that will be used when creating an observation unit later.

[0075] For example, parsing the observable resource declaration may obtain pod information. Specifically, the pod information may include collection indicator information and collection behavior information.

[0076] In this exemplary embodiment, when observability resource change information is monitored, the observability resource declaration corresponding to the observability resource change information is determined, and then the observability resource can be parsed immediately after the observability resource declaration is created to obtain unit information, thereby improving the efficiency of subsequent collection of data that meets observability requirements.

[0077] In an alternative embodiment, Figure 3 Another method for implementing observability is to parse the observability resource declaration to obtain unit information. Figure 3 As shown, the method includes at least the following steps: In step S310, a preset key field corresponding to the observability resource declaration is obtained.

[0078] The preset key fields refer to the fields that must exist in the observability resource declaration.

[0079] For example, obtain the preset key fields corresponding to the observability resource declaration. Specifically, the preset key fields may include the apiVersion field (i.e., the field that describes the version of the application programming interface), the spec field (i.e., the field that describes the collection indicator information), and the action field (i.e., the field that describes the collection behavior information).

[0080] In step S320, if there is a target key field in the observability resource declaration that corresponds one-to-one with the preset key field, the observability resource declaration is parsed to obtain unit information.

[0081] Among them, if there is a target key field in the observability resource declaration that corresponds one-to-one to the preset key field, it proves that the observability resource declaration is in compliance with the specification. Only then can the observability resource declaration be parsed.

[0082] For example, the preset key fields obtained are the apiVersion field, the spec field, and the action field.

[0083] If there are target key fields in the observability resource declaration that correspond to the above three preset key fields one by one, the observability resource declaration can be parsed to obtain the pod information.

[0084] If there is no target key field corresponding to one or more of the above three preset key fields in the observability resource declaration, it proves that the observability resource declaration does not comply with the specification, and the observability resource declaration will not be parsed at this time.

[0085] In this exemplary embodiment, the observability resource declaration is parsed only if there is a target key field in the observability resource declaration that corresponds one-to-one to the preset key field, thereby improving the logic of parsing the observability resource, avoiding the situation where the observability resource declaration is parsed even if the observability resource declaration does not comply with the specification, and reducing unnecessary resource consumption.

[0086] In step S130, the observability component is deployed to the observation unit, and the observation unit is run to collect data that meets the observability requirements.

[0087] In an exemplary embodiment of the present disclosure, an observability component is deployed to an observation unit. For example, the observation component can be deployed to a pod unit according to the deployment method in the observability resource declaration. After the observability component is deployed to the observation unit, the observation unit is run, and data that meets the observability requirements can be collected.

[0088] For example, if the deployment mode defined in the observability resource declaration is side-car (i.e., the application functions are divided into separate processes), the observability component can be injected into the pod unit in the side-car mode. After the pod unit is run, data about the central processor can be collected.

[0089] In an alternative embodiment, Figure 4 A schematic diagram of the process of collecting data that meets observability requirements in the method of achieving observability is shown, such as Figure 4 As shown, the method includes at least the following steps: In step S410, resource scheduling is performed on the observation unit to determine the target working node to establish a binding relationship between the observation unit and the target working node.

[0090] Among them, after the observation unit is created, the system will use the scheduler to schedule an idle target working node in the working node, and after scheduling the target idle node, it will establish a binding relationship between the idle target working node and the observation unit.

[0091] For example, the scheduler schedules the idle target worker node as Worker Node1 at this time. At this time, a binding relationship is established between the pod unit and the target worker node Worker Node1.

[0092] In step S420, based on the binding relationship, the observation unit is run using the container process corresponding to the working node to collect data that meets the observability requirements.

[0093] Among them, there is a container process kubelet corresponding to the target working node. At this time, the container process kubelet can be used to run the observation unit to collect data that meets the observability requirements.

[0094] For example, Figure 5 The following is a schematic diagram showing the process of operating the observation unit in the embodiment of the present disclosure. Figure 5 As shown, object 510 is an operation and maintenance personnel or a developer, declaration 520 is an observability resource declaration, and declaration 520 includes collection indicator information and collection behavior information.

[0095] Node 530 is the master node, and there is a controller 531 observable resource controller in the master node. The observable resource controller 531 monitors the API Server. If the observable resource change information is monitored, the observable resource declaration is parsed to obtain the unit information, and the observable component is created according to the unit information. Specifically, the observable component includes a collection component 541 and a processing component 542. The unit 550 observation unit is a pod unit created according to the unit information.

[0096] The collection component 541 and the processing component 542 are deployed to the pod unit 550. At this time, the target worker node Worker Node1 of node 560 is determined, and a binding relationship between the pod unit and the target worker node 560 is established. Based on the binding relationship, the container process 561kubelet corresponding to the target worker node 560 is used to run the pod unit, thereby realizing the collection of data that meets the observability requirements.

[0097] In this exemplary embodiment, resources are scheduled for the observation unit, the target working node is determined, and a binding relationship is established between the observation unit and the target working node. Based on the binding relationship, the observation unit is run using a container process, thereby realizing the collection of data that meets observability requirements.

[0098] In an optional embodiment, the method further includes: if the container process receives a stop signal, terminating the observation unit to terminate the collection of data that meets the observability requirements.

[0099] When the container process receives a stop signal, it means that the container process will be terminated. Since the observation unit is run through the container process, the observation unit will be terminated at this time, and no data that meets the observability requirements will be collected at this time.

[0100] For example, when the container process kubelet1 receives a stop signal, the pod unit will no longer run, and data related to the central processor will no longer be collected.

[0101] In this exemplary embodiment, when the container process receives a stop signal, the collection of data that meets the observability requirements is terminated, and then the life cycle of the observability components deployed in the observation unit is managed by managing the life cycle of the observation unit.

[0102] In an alternative embodiment, Figure 6 A schematic diagram of a process for storing target data in the same storage area in a method for achieving observability is shown, Figure 6 As shown, the method at least includes the following steps: In step S610, a label is assigned to the observation unit.

[0103] The label refers to a label assigned to the observation unit. Specifically, the label can be represented by letters, numbers, or strings, which is not specifically limited in this exemplary embodiment.

[0104] For example, if there are three observation units, namely pod1, pod2, and pod3, then label 1 can be assigned to pod1, label 1 can be assigned to pod2, and label 3 can be assigned to pod3.

[0105] In step S620, a target observation unit with the same label is obtained, and target data collected in the target observation unit that meets the target observability requirement is determined; the target observability requirement corresponds to the target observation unit.

[0106] If multiple observation units have the same label, then these multiple observation units are target observation units. The data collected in the target observation unit that meets the target observability requirement is determined.

[0107] For example, if there are three observation units, namely pod1, pod2, and pod3, then label 1 can be assigned to pod1, label 1 can be assigned to pod2, and label 3 can be assigned to pod3.

[0108] Obviously, pod1 and pod2 are target observation units with the same label. At this time, the target data X-1 collected by pod1 that meets the target observability requirement is determined, and the target data X-2 collected by pod2 that meets the target observability requirement is also determined.

[0109] In step S630, the target data is stored in the same storage area.

[0110] Wherein, the target data is stored in the same storage area.

[0111] For example, the target data X-1 collected by the determined pod1 unit and meeting the target observability requirement and the target data X-2 collected by the determined pod2 unit and meeting the target observability requirement are stored in the storage area D-1.

[0112] In this exemplary embodiment, target observation units with the same label are obtained, and target data collected in the target observation units that meet the target observability requirements are stored in the same storage unit, so that different observation units can be associated, solving the problem of data islands.

[0113] In the method and apparatus provided in the exemplary embodiments of the present disclosure, an observability resource declaration is created according to observability requirements, the observability resource declaration is parsed to obtain unit information, and an observability component is created according to the unit information. On the one hand, the above process decouples the dependencies between teams in the process of collecting observability resources, thereby improving the efficiency of collecting data that meets observability requirements; on the other hand, developers and operation and maintenance personnel do not need to care about the monitoring software and architecture used by the infrastructure to create observability resource declarations, reducing the cognitive cost, coordination cost and adaptation cost of different observability software to operation and maintenance personnel and developers; on the other hand, observability resource declarations can be flexibly created according to different observability requirements, thereby realizing refined collection control.

[0114] The following is a detailed description of the method for achieving observability in an embodiment of the present disclosure in conjunction with an application scenario.

[0115] Figure 7 A flow chart of a method for realizing observability in an application scenario is shown, such as Figure 7 As shown, server 710 is a program programming interface server, database 720 is an etcd database, controller 730 is an observability resource controller, and process 740 is a container process.

[0116] Step S741 is to determine the observability requirements, create an observability resource declaration according to the observability requirements, and send the observability resource declaration to the server 710 .

[0117] Step S742 is that the server 710 sends the received observability resource declaration to the database 720. Step S743 is that the controller 730 monitors the server 710, and if observability resource change information is monitored, determines the observability resource declaration corresponding to the observability resource change information.

[0118] Step S744 is a process of determining whether the observability resource declaration complies with the specification. Step S745 is a process of parsing the observability resource declaration to obtain unit information when the observability resource declaration complies with the specification, and creating an observable component and an observation unit according to the unit information.

[0119] Step S746 is the process of transmitting the unit information back to the server 710. Step S747 is the process of the server sending the unit information to the database 720. At this time, the scheduler will schedule the target working node for the observation unit. Step S747 is the process of the container process corresponding to the target working node running the observation unit, thereby collecting data that meets the observability requirements.

[0120] In this application scenario, an observability resource declaration is created according to the observability requirements, the observability resource declaration is parsed to obtain unit information, and the observability component is created according to the unit information. On the one hand, the above process decouples the dependencies between the various teams in the process of collecting observability resources, thereby improving the efficiency of collecting data that meets observability requirements; on the other hand, developers and operation and maintenance personnel do not need to care about the monitoring software and architecture used by the infrastructure to create observability resource declarations, reducing the cognitive cost, coordination cost and adaptation cost of different observability software to operation and maintenance personnel and developers; on the other hand, observability resource declarations can be flexibly created according to different observability requirements, realizing refined collection control.

[0121] In addition, in an exemplary embodiment of the present disclosure, a device for achieving observability is also provided. Figure 8 A schematic diagram of the structure of the device for achieving observability is shown, Figure 8 As shown, the apparatus 800 for implementing observability may include: a declaration module 810, a control module 820 and a node module 830. Among them:

[0122] The declaration module 810 is configured to determine the observability requirements and create an observability resource declaration based on the observability requirements; the control module 820 is configured to parse the observability resource declaration to obtain unit information, and create observability components and observation units based on the unit information; the node module 830 is configured to deploy the observability component to the observation unit and run the observation unit to collect data that meets the observability requirements.

[0123] The specific details of the above-mentioned device 800 for implementing observability have been described in detail in the corresponding secure access method, so they will not be repeated here.

[0124] It should be noted that, although several modules or units implementing the observability device 800 are mentioned in the above detailed description, such division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units for embodiment.

[0125] In addition, in an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.

[0126] Refer to the following Fig. 9 An electronic device 900 according to such an embodiment of the present invention will be described. Fig. 9 The electronic device 900 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0127] like Fig. 9 As shown, the electronic device 900 is in the form of a general computing device. The components of the electronic device 900 may include, but are not limited to: the at least one processing unit 910, the at least one storage unit 920, a bus 930 connecting different system components (including the storage unit 920 and the processing unit 910), and a display unit 940.

[0128] The storage unit stores program codes, which can be executed by the processing unit 910, so that the processing unit 910 executes the steps according to various exemplary embodiments of the present invention described in the above “Exemplary Method” section of this specification.

[0129] The storage unit 920 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 921 and / or a cache memory unit 922 , and may further include a read-only memory unit (ROM) 923 .

[0130] The storage unit 920 may also include a program / utility 924 having a set (at least one) of program modules 925, such program modules 925 including but not limited to: an operating system, one or more application programs, other program modules and program data, each of which or some combination may include the reality of a network environment.

[0131] Bus 930 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0132] The electronic device 900 may also communicate with one or more external devices 970 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 900, and / or communicate with any device that enables the electronic device 900 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 950. Furthermore, the electronic device 900 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 960. As shown, the network adapter 960 communicates with other modules of the electronic device 900 via a bus 930. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 900, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.

[0133] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the embodiment of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiment of the present disclosure.

[0134] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the above method of the present specification is stored. In some possible embodiments, various aspects of the present invention can also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to perform the steps according to various exemplary embodiments of the present invention described in the above "Exemplary Method" section of the present specification.

[0135] refer to Fig.10 As shown, a program product 1000 for implementing the above method according to an embodiment of the present invention is described, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.

[0136] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0137] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0138] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.

[0139] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).

[0140] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.

Claims

1. A method for achieving observability, characterized in that: The method comprises: Determine observability requirements, and create observability resource declarations according to the observability requirements; wherein observability refers to the ability to output characteristics that fully reflect the system state, the observability requirements refer to pre-set requirements that describe the management personnel or operation and maintenance personnel's requirements for data that reflects the characteristics of the system state, and the observability resource declaration includes collection indicator information corresponding to the observability requirements and collection behavior information corresponding to the collection indicator information; Listen to the application programming interface server; If observability resource change information is monitored, determine the observability resource declaration corresponding to the observability resource change information; Obtaining a preset key field corresponding to the observability resource declaration; If there is a target key field in the observability resource declaration that corresponds one-to-one to the preset key field, the observability resource declaration is parsed to obtain unit information, and an observability component and an observation unit are created according to the unit information; Deploy the observability component to the observation unit, perform resource scheduling on the observation unit, determine the target working node, and establish a binding relationship between the observation unit and the target working node; Based on the binding relationship, the observation unit is run using a container process corresponding to the target working node to collect data that meets the observability requirement.

2. The method for achieving observability according to claim 1, characterized in that: The observability resource declaration is used to define the collection indicator information corresponding to the observability requirement and the collection behavior information corresponding to the collection indicator information; the collection indicator information includes a collection indicator set, an indicator detail declaration and a custom indicator; the collection behavior information includes a collection frequency, a collection time range, a service entry, a target load and a deployment method; the service entry is the entry for exporting observability resources, the target load is the load of the observability resource application, and the deployment method is used to declare the mode of deployment of the observability resource.

3. The method for achieving observability according to claim 1, characterized in that: The method further comprises: If the container process receives a stop signal, the observation unit is terminated to terminate the collection of the data that meets the observability requirement.

4. The method for achieving observability according to claim 1, characterized in that: The method further comprises: Assigning a label to the observation unit; Acquire a target observation unit having the same label, and determine target data collected in the target observation unit that meets the target observability requirement; the target observability requirement corresponds to the target observation unit; The target data is stored in the same storage area.

5. A device for achieving observability, characterized in that The device comprises: A declaration module is configured to determine observability requirements and create an observability resource declaration according to the observability requirements; wherein observability refers to the ability to output characteristics that fully reflect the system state, the observability requirement refers to a pre-set requirement that describes the management personnel or operation and maintenance personnel's requirements for data that reflects the characteristics of the system state, and the observability resource declaration includes collection indicator information corresponding to the observability requirement and collection behavior information corresponding to the collection indicator information; The control module is configured to monitor the application programming interface server; if observability resource change information is monitored, determine the observability resource declaration corresponding to the observability resource change information; obtain the preset key field corresponding to the observability resource declaration; if there is a target key field corresponding to the preset key field in the observability resource declaration, parse the observability resource declaration to obtain unit information, and create an observability component and an observation unit according to the unit information; The node module is configured to deploy the observability component to the observation unit, run the observation unit, schedule resources for the observation unit, determine the target working node, and establish a binding relationship between the observation unit and the target working node; based on the binding relationship, use the container process corresponding to the target working node to run the observation unit to collect data that meets the observability requirements.

6. An electronic device, characterized in that: include: processor; A memory, configured to store executable instructions of the processor; The processor is configured to perform the method for achieving observability as described in any one of claims 1 to 4 by executing the executable instructions.

7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for achieving observability described in any one of claims 1 to 4 is implemented.