CN114218039A - Method and system for automatically generating kubernets resource monitoring and data display diagram - Google Patents

Method and system for automatically generating kubernets resource monitoring and data display diagram Download PDF

Info

Publication number
CN114218039A
CN114218039A CN202111420771.2A CN202111420771A CN114218039A CN 114218039 A CN114218039 A CN 114218039A CN 202111420771 A CN202111420771 A CN 202111420771A CN 114218039 A CN114218039 A CN 114218039A
Authority
CN
China
Prior art keywords
data
service
alarm
index
kubernets
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
CN202111420771.2A
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.)
Sina Technology China Co Ltd
Original Assignee
Sina Technology China 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 Sina Technology China Co Ltd filed Critical Sina Technology China Co Ltd
Priority to CN202111420771.2A priority Critical patent/CN114218039A/en
Publication of CN114218039A publication Critical patent/CN114218039A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3006Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is distributed, e.g. networked systems, clusters, multiprocessor systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/32Monitoring with visual or acoustical indication of the functioning of the machine
    • G06F11/324Display of status information
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • G06T11/206Drawing of charts or graphs

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • General Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the invention provides a method and a system for automatically generating a kubernets resource monitoring and data display diagram, wherein the method comprises the following steps: acquiring and storing various index data packets related to services in the kubernets cluster; wherein, the service is selected according to the display requirement; according to chart generation rules set for various indexes related to the service, interpreting data in various index data packets related to the service in the kubernets cluster into graphic data capable of being rendered by a user interface, and generating a chart corresponding to the service through the graphic data capable of being rendered by the user interface; and displaying the generated chart corresponding to the service to the user through a user interface. The monitoring chart is automatically generated without human intervention.

Description

Method and system for automatically generating kubernets resource monitoring and data display diagram
Technical Field
The invention relates to the field of cloud computing, in particular to a method and a system for automatically generating a kubernets resource monitoring and data display diagram.
Background
In the process of migrating the container in the service, a kubernets orchestration tool needs to be used for deploying the container service, and after the service is deployed, a corresponding matched monitoring alarm component needs to be deployed to observe the running state of the service.
In the case of server deployment services, the solution can be selected by using configuration management and open source software, because the server is not always changed, so that the workload for adding, deleting and modifying alarms is not large, and the pressure on management personnel is small.
However, in the case of deploying services using containers, firstly, the traffic of our services needs to pass through many agents of components, so that the quality of service of these agents is also closely related to the services and needs to be monitored together.
In addition to components that run containers such as kubernets, the quality of the software that runs the containers itself is service-dependent and also needs to be monitored.
The containers are managed by using kubernets, the containers need to be replaced every time the service is on line, and for monitoring alarms, new containers need to be added into the system and old containers need to be deleted.
It is not easy for an administrator to maintain the container.
In addition, various display graphs need to be drawn, monitoring data in a container environment is more, drawing graphs is more, open source promemeus software and data display software are used at present, various monitoring data are collected manually, then the data are stored in another opentsdb component, and then the data are displayed through components similar to grafana.
In the process of implementing the invention, the applicant finds that at least the following problems exist in the prior art:
1. multiple different pieces of software need to be combined to accomplish the charting task of a business.
2. It is difficult to draw multiple data items together, requiring manual filling of the data items.
Disclosure of Invention
The embodiment of the invention provides a method and a system for automatically generating a kubernets resource monitoring and data display diagram, which can automatically generate a monitoring diagram without human intervention.
To achieve the above object, in one aspect, an embodiment of the present invention provides a method for automatically generating a kubernets resource monitoring and data presentation graph, including:
acquiring and storing various index data packets related to services in the kubernets cluster; wherein, the service is selected according to the display requirement;
according to chart generation rules set for various indexes related to the service, interpreting data in various index data packets related to the service in the kubernets cluster into graphic data capable of being rendered by a user interface, and generating a chart corresponding to the service through the graphic data capable of being rendered by the user interface;
and displaying the generated chart corresponding to the service to the user through a user interface.
On the other hand, an embodiment of the present invention provides a system for automatically generating a kubernets resource monitoring and data display diagram, including:
the data acquisition unit is used for acquiring and storing various index data packets related to the service in the kubernets cluster; wherein, the service is selected according to the display requirement;
the graph generation unit is used for interpreting data in various index data packets related to the service in the kubernets cluster into graphic data which can be rendered by a user interface according to graph generation rules set for various indexes related to the service, and generating a graph corresponding to the service through the graphic data which can be rendered by the user interface;
and the chart display unit is used for displaying the generated chart corresponding to the service to the user through a user interface.
The technical scheme has the following beneficial effects: the monitoring chart is automatically generated without human intervention.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow chart of a method of automatically generating a kubernets resource monitoring and data presentation graph in accordance with an embodiment of the present invention;
FIG. 2 is a block diagram of a system for automatically generating a kubernets resource monitoring and data presentation graph in accordance with an embodiment of the present invention;
fig. 3 is a flowchart of another method for automatically generating a kubernets resource monitoring and data presentation graph according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In combination with the embodiment of the present invention, a method for automatically generating a kubernets resource monitoring and data presentation graph is provided, which includes:
s101: acquiring and storing various index data packets related to services in the kubernets cluster; wherein, the service is selected according to the display requirement;
s102: according to chart generation rules set for various indexes related to the service, interpreting data in various index data packets related to the service in the kubernets cluster into graphic data capable of being rendered by a user interface, and generating a chart corresponding to the service through the graphic data capable of being rendered by the user interface;
s103: and displaying the generated chart corresponding to the service to the user through a user interface.
Preferably, the various types of indexes related to the service in the kubernets cluster include: indexes of running states of the kubernets cluster, indexes of flow agent layer software, indexes of container running states, indexes of service running states, indexes of quality and states of external resources depended by the service and indexes of kubernets resource states; wherein:
the indexes of the running state of the kubernets cluster comprise: operating state and pressure state data of each core component of the kubernets software;
the indexes of the flow agent layer software comprise: the running state of nginx, the pressure data of nginx, the quality of each proxied service, http status code, response time, the size body size of data body, and user ip;
the indicators of the operating state of the container include: CPU utilization rate, memory utilization rate, disk utilization rate and disk input and output utilization rate;
the indexes of the service running state comprise: the health state of a service program, whether the service is running, whether the service can be communicated, whether a service log is updated, and http various state data of the service;
the quality and state indicators of the external resources on which the service depends include: dns analysis time, tcp connection establishing time, http data exchange time and http state codes;
the indexes of the kubernets resource state are as follows: the number of copies of a minimum scheduling unit pod of the deployment resource, the number of healthy copies of the pod, the number of unhealthy copies of the pod, and the number of restart copies of the pod;
step 101 specifically includes:
according to a request of a user for generating a diagram corresponding to a service, various index data related to the service are determined according to a service name in kubernets software, various index data packets are formed, various index data packets related to the service formed in a kubernets cluster are obtained from the kubernets software and stored, wherein the kubernets software runs on the kubernets cluster and is used for collecting various index data related to the service in the kubernets cluster.
Preferably, after the obtaining of various types of index data packets related to the service in the kubernets cluster, the method further includes, S104:
checking whether the data formats and data labels of the data in various index data packets related to the service in the kubernets cluster are in compliance;
when the data format and the data label are not in compliance, marking the non-compliance data in the data related to the service as non-compliance data, and alarming aiming at the non-compliance data;
when the data format and the data label are in compliance, the compliance data in the data related to the business are marked as compliance data, and the compliance data are stored, wherein the compliance data are used for generating a chart corresponding to the business.
Preferably, before the obtaining of various types of index data packets related to the service in the kubernets cluster, the method further includes, S105:
the method comprises the following steps that a user sets chart generation rules for various indexes related to the business through a user interface, and specifically comprises the following steps:
selecting a service for generating a chart, configuring the style of the generated chart for the index of the selected service and configuring the display form of the generated chart for the index of the selected service by a user through a user interface;
setting a threshold value for judging whether the data is abnormal or not for the index of the service, and setting a special form adopted by the abnormal data when the chart is displayed;
setting whether a corresponding chart of the service is automatically generated according to the service name, which specifically comprises the following steps: automatically generating all charts set by a user by default, otherwise, generating the charts selected by the user;
and obtaining the chart generation rule after the user sets the chart to be generated for the indexes related to the business through the user interface.
Preferably, the method further comprises S106:
configuring an alarm rule for a service-related index, wherein the alarm rule is applicable to all services in a default state, and is set for a certain service independently in a non-default state;
the configuring of the alarm rule for the service-related index specifically includes:
a first comparative equation: configuring alarm rules which are larger than a threshold value, smaller than the threshold value or equal to the threshold value for the service related indexes; meanwhile, configuring an alarm time interval, alarm times, cooling time, an alarm receiver and an alarm mode;
the second comparative formula: setting an alarm rule for the index variance, wherein the alarm rule is larger than a threshold value, smaller than the threshold value or equal to the threshold value; meanwhile, configuring an alarm time interval, alarm times, cooling time, an alarm receiver and an alarm mode; the index variance is formed by calculating the variance of the related indexes of the service;
third comparative example: configuring an alarm rule of which the index comparison difference is greater than a threshold value, less than the threshold value or equal to the threshold value; meanwhile, configuring an alarm time interval, alarm times, cooling time, an alarm receiver and an alarm mode; the index similarity difference value is obtained by comparing the service-related index with data at the same time point before the first preset time interval;
fourth comparative example: configuring an alarm rule that the difference value of the index ring ratios is greater than a threshold value, less than the threshold value or equal to the threshold value; meanwhile, an alarm time interval, alarm times, cooling time, an alarm receiver and an alarm mode are configured, and the index ring ratio difference is obtained by performing ring ratio on the data of the service related index and a second preset time interval;
aiming at any form data of the first contrast mode to the fourth contrast mode, the alarm mode comprises the following steps:
preselecting a plurality of indexes, and alarming when at least two indexes trigger threshold values; or preselecting a plurality of indexes, and alarming when any index in the plurality of indexes triggers a threshold value;
the method for automatically generating the kubernets resource monitoring and data display diagram further comprises the following steps:
the alarm device obtains various index data packets related to the service in the kubernets cluster, which are stored after the kubernets software obtains the data packets, judges any form data from a first comparison mode to a fourth comparison mode according to corresponding threshold values in alarm rules configured for the indexes related to the service, and sends the form data to an alarm receiver according to the alarm mode when any form data from the first comparison mode to the fourth comparison mode meets the corresponding threshold values.
As shown in fig. 2, in combination with the embodiment of the present invention, there is provided a system for automatically generating a kubernets resource monitoring and data presentation graph, including:
the data acquisition unit 21 is configured to acquire and store various index data packets related to the service in the kubernets cluster; wherein, the service is selected according to the display requirement;
the graph generating unit 22 is configured to interpret data in various types of index data packets related to the service in the obtained kubernets cluster into graphical data that can be rendered by a user interface according to graph generating rules set for various types of indexes related to the service, and generate a graph corresponding to the service through the graphical data that can be rendered by the user interface;
and the chart display unit 23 is configured to display a chart corresponding to the generated service to the user through a user interface.
Preferably, the various types of indexes related to the service in the kubernets cluster include: indexes of running states of the kubernets cluster, indexes of flow agent layer software, indexes of container running states, indexes of service running states, indexes of quality and states of external resources depended by the service and indexes of kubernets resource states; wherein:
the indexes of the running state of the kubernets cluster comprise: operating state and pressure state data of each core component of the kubernets software;
the indexes of the flow agent layer software comprise: the running state of nginx, the pressure data of nginx, the quality of each proxied service, http status code, response time, the size body size of data body, and user ip;
the indicators of the operating state of the container include: CPU utilization rate, memory utilization rate, disk utilization rate and disk input and output utilization rate;
the indexes of the service running state comprise: the health state of a service program, whether the service is running, whether the service can be communicated, whether a service log is updated, and http various state data of the service;
the quality and state indicators of the external resources on which the service depends include: dns analysis time, tcp connection establishing time, http data exchange time and http state codes;
the indexes of the kubernets resource state are as follows: the number of copies of a minimum scheduling unit pod of the deployment resource, the number of healthy copies of the pod, the number of unhealthy copies of the pod, and the number of restart copies of the pod;
the data obtaining unit 21 is specifically configured to:
according to a request of a user for generating a diagram corresponding to a service, various index data related to the service are determined according to a service name in kubernets software, various index data packets are formed, various index data packets related to the service formed in a kubernets cluster are obtained from the kubernets software and stored, wherein the kubernets software runs on the kubernets cluster and is used for collecting various index data related to the service in the kubernets cluster.
Preferably, the system further comprises a data checking unit 24, wherein the data checking unit 24 is specifically configured to:
after the data obtaining unit 21 obtains various types of index data packets related to the service in the kubernets cluster, checking whether the data formats and data labels of the data in the obtained various types of index data packets related to the service in the kubernets cluster are compliant;
when the data format and the data label are not in compliance, marking the non-compliance data in the data related to the service as non-compliance data, and alarming aiming at the non-compliance data;
when the data format and the data label are in compliance, the compliance data in the data related to the business are marked as compliance data, and the compliance data are stored, wherein the compliance data are used for generating a chart corresponding to the business.
Preferably, the system further comprises a graph rule generating unit 25, wherein the graph rule generating unit 25 is specifically configured to:
before the data obtaining unit 21 obtains various types of index data packets related to the service in the kubernets cluster, the user sets a chart generating rule for various types of indexes related to the service through a user interface, and the method specifically includes:
selecting a service for generating a chart, configuring the style of the generated chart for the index of the selected service and configuring the display form of the generated chart for the index of the selected service by a user through a user interface;
setting a threshold value for judging whether the data is abnormal or not for the index of the service, and setting a special form adopted by the abnormal data when the chart is displayed;
setting whether a corresponding chart of the service is automatically generated according to the service name, which specifically comprises the following steps: automatically generating all charts set by a user by default, otherwise, generating the charts selected by the user;
and obtaining the chart generation rule after the user sets the chart to be generated for the indexes related to the business through the user interface.
Preferably, the system further comprises an alarm rule setting unit 26, and the alarm rule setting unit 26 is specifically configured to:
configuring an alarm rule for a service-related index, wherein the alarm rule is applicable to all services in a default state, and is set for a certain service independently in a non-default state;
the configuring of the alarm rule for the service-related index specifically includes:
a first comparative equation: configuring alarm rules which are larger than a threshold value, smaller than the threshold value or equal to the threshold value for the service related indexes; meanwhile, configuring an alarm time interval, alarm times, cooling time, an alarm receiver and an alarm mode;
the second comparative formula: setting an alarm rule for the index variance, wherein the alarm rule is larger than a threshold value, smaller than the threshold value or equal to the threshold value; meanwhile, configuring an alarm time interval, alarm times, cooling time, an alarm receiver and an alarm mode; the index variance is formed by calculating the variance of the related indexes of the service;
third comparative example: configuring an alarm rule of which the index comparison difference is greater than a threshold value, less than the threshold value or equal to the threshold value; meanwhile, configuring an alarm time interval, alarm times, cooling time, an alarm receiver and an alarm mode; the index similarity difference value is obtained by comparing the service-related index with data at the same time point before the first preset time interval;
fourth comparative example: configuring an alarm rule that the difference value of the index ring ratios is greater than a threshold value, less than the threshold value or equal to the threshold value; meanwhile, an alarm time interval, alarm times, cooling time, an alarm receiver and an alarm mode are configured, and the index ring ratio difference is obtained by performing ring ratio on the data of the service related index and a second preset time interval;
aiming at any form data of the first contrast mode to the fourth contrast mode, the alarm mode comprises the following steps:
preselecting a plurality of indexes, and alarming when at least two indexes trigger threshold values; or preselecting a plurality of indexes, and alarming when any index in the plurality of indexes triggers a threshold value;
the method for automatically generating the kubernets resource monitoring and data display diagram further comprises the following steps:
and the alarm unit 27 is used for acquiring various index data packets related to the service in the kubernets cluster, which are stored after the kubernets software is acquired by the alarm, judging any form data from the first comparison mode to the fourth comparison mode according to corresponding threshold values in alarm rules configured for the service-related indexes, and sending the form data to an alarm receiver according to the alarm mode when any form data from the first comparison mode to the fourth comparison mode meets the corresponding threshold values.
The invention has the following beneficial effects:
1. the monitoring chart is automatically generated without human intervention.
2. The monitoring data of the service can be acquired completely and automatically, and the data can be adjusted to be received and not to be received according to the configuration.
3. And the service monitoring is fully automatically drawn, the monitoring of the dependent components is realized, and the running state of the service deployed on the container is completely displayed, including the states of the service and the components of the running container.
4. Fully automatic configuration alarms, when new containers are added and deleted.
5. When the name of the service is changed, the name of the data item needs to be manually changed. It is a burden for the manager.
The above technical solutions of the embodiments of the present invention are described in detail below with reference to specific application examples, and reference may be made to the foregoing related descriptions for technical details that are not described in the implementation process.
The technical data or abbreviations involved in the present invention are as follows:
kubernetes: container arrangement management tool
kubernets cluster: all the components of the software kubernets and the servers running the components are included.
Application on kubernets: services deployed using kubernets, such as nginx services, mysql services, and the like.
kubernets resource: such as deployment, server, ingress, etc., which are used to deploy services on kubernets.
A container: the container image is a lightweight independently executable software package of software that contains everything needed to run it: code, runtime, system tools, system libraries, settings, etc., containers are containers that affect the running state of the program.
Service: a program providing http service or tcp service.
The invention discloses a method and a system for automatically generating a kubernets resource monitoring and data display diagram, which can automatically configure a monitoring alarm and a system for drawing a diagram to solve the problems in the prior art. The monitoring chart of the business deployed on the container can be automatically generated by using the system. The process of monitoring and alarming configured by an administrator is simplified, and the process can be completely and automatically processed. The system includes a plurality of components, each component being responsible for a portion of the functionality. Wherein, a service is deployed on a container, the service-related data to be collected includes (various index data packets related to the service) as follows:
1. the operating state of the kubernets cluster itself, such as the operating state of each core component of the kubernets software, and pressure state data.
2. The software of the traffic proxy layer, such as the running state of nginx, the pressure data of nginx, the quality of service of each proxied service, such as http status code, response time, body size, user ip and the like.
3. The operation status of the container, such as cpu usage, memory usage, disk usage, and disk io (disk input/output) usage.
4. The running state of the service, the health state of the service program, whether the service program is running or not, whether the service program can be communicated or not, whether the service log is updated or not and http various state data.
5. The quality and state of the external resources on which the service depends, such as a service a depending on a service b, and state data of a service a linking with the service b, including dns parsing time, tcp connection establishing time, http data exchange time, http state code, and the like.
6. Status data of kubernets resources, such as the number of pod copies of the resource deployment, the number of healthy copies, the number of unhealthy copies, the number of restarted copies, and the like.
The 6 parts of data are concatenated together to form a good complete observability of the service, and the flow is shown in fig. 3.
a.Kubernetes:
The container editing and managing software is open-source software, can manage the whole life cycle of the container, and performs operations of adding, deleting, modifying and checking the container.
b. Chart data monitor
As shown in step 1 of fig. 3, a graph data monitor (kubernets software) is used to collect various types of index data related to the service within the kubernets cluster. According to a request of a user for generating a chart corresponding to a service, various index data related to the service are determined in the kubernets software according to the service name, various index data packets are formed, and various index data packets related to the service formed in the kubernets cluster are obtained from the kubernets software and stored. The obtained various index data packets related to the service comprise:
and acquiring data of the kubernets and service deployment from the kubernets.
And acquiring the state data of each component of the kubernets and acquiring the state data of the flow agent component.
The diagram data monitor is software, is developed according to a plug-in development specification of kubernets software, and has the capability of acquiring any data of the kubernets, including various state data of the kubernets.
c. Chart data manager
As shown in step 2 of fig. 3, the chart data manager checks the data acquired by the chart data monitor, checks the format of the received data, checks necessary label, marks the data that is not compliant as being non-compliant, and allows the alarm to recognize that the data is non-compliant, and may alarm the data that is not compliant, and store the data that is compliant in the data storage.
The chart data manager is a service deployed by using containers, is also deployed on kubernets, works together with a chart data monitor, serves as an intermediate layer of the chart data monitor and a data storage, and ensures that data stored in the data storage is in compliance and is really needed data.
As shown in step 3 of fig. 3, the monitoring data is verified and then stored in the data storage.
d. Data storage
For storage of monitoring data and for providing queries for monitoring data.
e. Chart rule manager
As shown in step 4 of fig. 3, the user sets a chart generation rule for each type of indexes related to the service provided by the user through the user interface, which specifically includes:
selecting a service for generating a chart, configuring the style of the generated chart for the index of the selected service and configuring the display form of the generated chart for the index of the selected service by a user through a user interface;
setting a threshold value for judging whether the data is abnormal or not for the index of the service, and setting a special form adopted by the abnormal data when the chart is displayed;
setting whether a corresponding chart of the service is automatically generated according to the service name, which specifically comprises the following steps: automatically generating all charts set by a user by default, otherwise, generating the charts selected by the user;
and obtaining the chart generation rule after the user sets the chart to be generated for the indexes related to the business through the user interface.
The method comprises the following specific steps:
the user configures which kubernets generate charts and what charts the user generates in a ui interface (user interface). The configuration chart is presented in the form of a graph, a bar chart, or a pie chart.
And also can configure monitoring data abnormal threshold, after configuring the threshold, can display special form for abnormal data,
for example, the variance, the homocyclic ratio and the like are configured, when the variance exceeds a threshold value or is lower than the threshold value, the chart flashes in red, and the situation that the problem occurs in the current service can be visually seen for the administrator and the user
After user configuration, generating chart rules and submitting the chart rules to a chart planning manager.
The user can configure whether the monitoring chart of the service needs to be automatically generated according to the service name, the default chart can be automatically generated under the default condition (under the non-configuration condition), and otherwise, the chart is generated according to the definition of the user.
By default, each datum contains the name of the service, so the graph generator can find the monitoring data of the service in the data store.
The service name is a location identifier in the system that is used to determine to which service the data belongs.
f. Chart generator
As shown in step 5 of fig. 3, according to a chart generation rule set for each type of index related to the service, interpreting data in each type of index data packet related to the service in the obtained kubernets cluster into graphic data that can be rendered by a user interface, and generating a chart corresponding to the service through the graphic data that can be rendered by the user interface; and displaying the generated chart corresponding to the service to the user through a user interface.
Chart data, which is graphic data that can be interpreted by the chart generator as being renderable by the user ui, is generated according to the user's rules.
The graph generator retrieves the monitoring data from the data store, as shown in step 6 of fig. 3.
And combining the data of the step 5 and the data of the step 6, the user chart rule data and the monitoring data to generate chart rendering data. Returning to the user, the user ui interface may present the chart.
Graph rendering data: this represents data in the browser front-end interface that can be interpreted as browser graphics, which requires a special format, such as json.
Configuring an alarm rule for a service-related index, wherein the alarm rule is applicable to all services in a default state, and is set for a certain service independently in a non-default state;
the configuring of the alarm rule for the service-related index specifically includes:
a first comparative equation: configuring alarm rules which are larger than a threshold value, smaller than the threshold value or equal to the threshold value for the service related indexes; meanwhile, configuring an alarm time interval, alarm times, cooling time, an alarm receiver and an alarm mode;
the second comparative formula: setting an alarm rule for the index variance, wherein the alarm rule is larger than a threshold value, smaller than the threshold value or equal to the threshold value; meanwhile, configuring an alarm time interval, alarm times, cooling time, an alarm receiver and an alarm mode; the index variance is formed by calculating the variance of the related indexes of the service;
third comparative example: configuring an alarm rule of which the index comparison difference is greater than a threshold value, less than the threshold value or equal to the threshold value; meanwhile, configuring an alarm time interval, alarm times, cooling time, an alarm receiver and an alarm mode; the index similarity difference value is obtained by comparing the service-related index with data at the same time point before the first preset time interval;
fourth comparative example: configuring an alarm rule that the difference value of the index ring ratios is greater than a threshold value, less than the threshold value or equal to the threshold value; meanwhile, an alarm time interval, alarm times, cooling time, an alarm receiver and an alarm mode are configured, and the index ring ratio difference is obtained by performing ring ratio on the data of the service related index and a second preset time interval;
aiming at any form data of the first contrast mode to the fourth contrast mode, the alarm mode comprises the following steps:
preselecting a plurality of indexes, and alarming when at least two indexes trigger threshold values; or, preselecting a plurality of indexes, and alarming when any index in the plurality of indexes triggers a threshold value.
The alarm device obtains various index data packets related to the service in the kubernets cluster, which are stored after the kubernets software obtains the data packets, judges any form data from a first comparison mode to a fourth comparison mode according to corresponding threshold values in alarm rules configured for the indexes related to the service, and sends the form data to an alarm receiver according to the alarm mode when any form data from the first comparison mode to the fourth comparison mode meets the corresponding threshold values.
Specifically, as shown in g-h:
g. alarm rule manager
As shown in step 7 of fig. 3, the user configures an alarm rule for a specific one of the monitoring data, because not all monitoring data need to be alarmed.
Rules that may be configured include:
1. threshold value: configuring alarm rules which are larger than a threshold value, smaller than the threshold value and equal to the threshold value for the data;
2. variance: alarm team rules which are larger than, smaller than or equal to the threshold value after the variance calculation is carried out on the data;
3. comparing: comparing the data of the same time point of the previous day or the previous N days, and judging whether the data is larger than, smaller than or equal to the alarm rule of the threshold value;
4. ring ratio: comparing the data before 1 hour and N hours, and comparing the data with the alarm rule which is larger than or equal to the threshold value;
5. comprehensively acquiring multiple indexes:
and (3) performing and operation on a plurality of indexes: requiring two or more monitored data to trigger a threshold to alarm;
carrying out or operation on a plurality of indexes: requiring any one of the other one or more monitoring item data to trigger a threshold to alarm;
by default, all services are valid, i.e. all services are configured with the same alarm team, unless rules are configured for individual indicators of individual services, in which case the rules are valid only for individual services, individual indicators.
6. Configuring an alert recipient
7. And (3) configuring an alarm mode: whether it is a telephone call, a short message, a WeChat, a microblog or a mail reception.
After the rule is configured as shown in step 8 of FIG. 3, the rule is sent to the alarm
h. Alarm device
As shown in step 9 of fig. 3:
the alarm is arranged on the ui interface, acquires data required by the alarm rule from the data storage, judges a threshold value, judges abnormal times, and alarms a receiver, an alarm mode and the like according to the interval, the alarm times, the cooling time (index back-off), the alarm receiver and the like configured by the alarm rule.
And executing alarm for the data triggering the alarm, and sending the data to an alarm receiver according to the configured alarm mode.
The invention has the following beneficial effects:
1. the monitoring chart is automatically generated without human intervention.
2. The monitoring data of the service can be acquired completely and automatically, and the data can be adjusted to be received and not to be received according to the configuration.
3. And the service monitoring is fully automatically drawn, the monitoring of the dependent components is realized, and the running state of the service deployed on the container is completely displayed, including the states of the service and the components of the running container.
4. Fully automatic configuration alarms, when new containers are added and deleted.
5. When the name of the service is changed, the name of the data item needs to be manually changed. It is a burden for the manager.
It should be understood that the specific order or hierarchy of steps in the processes disclosed is an example of exemplary approaches. Based upon design preferences, it is understood that the specific order or hierarchy of steps in the processes may be rearranged without departing from the scope of the present disclosure. The accompanying method claims present elements of the various steps in a sample order, and are not intended to be limited to the specific order or hierarchy presented.
In the foregoing detailed description, various features are grouped together in a single embodiment for the purpose of streamlining the disclosure. This method of disclosure is not to be interpreted as reflecting an intention that the claimed embodiments of the subject matter require more features than are expressly recited in each claim. Rather, as the following claims reflect, invention lies in less than all features of a single disclosed embodiment. Thus, the following claims are hereby expressly incorporated into the detailed description, with each claim standing on its own as a separate preferred embodiment of the invention.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. To those skilled in the art; various modifications to these embodiments will be readily apparent, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the disclosure. Thus, the present disclosure is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
What has been described above includes examples of one or more embodiments. It is, of course, not possible to describe every conceivable combination of components or methodologies for purposes of describing the aforementioned embodiments, but one of ordinary skill in the art may recognize that many further combinations and permutations of various embodiments are possible. Accordingly, the embodiments described herein are intended to embrace all such alterations, modifications and variations that fall within the scope of the appended claims. Furthermore, to the extent that the term "includes" is used in either the detailed description or the claims, such term is intended to be inclusive in a manner similar to the term "comprising" as "comprising" is interpreted when employed as a transitional word in a claim. Furthermore, any use of the term "or" in the specification of the claims is intended to mean a "non-exclusive or".
Those of skill in the art will further appreciate that the various illustrative logical blocks, units, and steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate the interchangeability of hardware and software, various illustrative components, elements, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as hardware or software depends upon the particular application and design requirements of the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present embodiments.
The various illustrative logical blocks, or elements, described in connection with the embodiments disclosed herein may be implemented or performed with a general purpose processor, a digital signal processor, an Application Specific Integrated Circuit (ASIC), a field programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof designed to perform the functions described herein. A general-purpose processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. A processor may also be implemented as a combination of computing devices, e.g., a digital signal processor and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a digital signal processor core, or any other similar configuration.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may be stored in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. For example, a storage medium may be coupled to the processor such the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an ASIC, which may be located in a user terminal. In the alternative, the processor and the storage medium may reside in different components in a user terminal.
In one or more exemplary designs, the functions described above in connection with the embodiments of the invention may be implemented in hardware, software, firmware, or any combination of the three. If implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media that facilitate transfer of a computer program from one place to another. Storage media may be any available media that can be accessed by a general purpose or special purpose computer. For example, such computer-readable media can include, but is not limited to, RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to carry or store program code in the form of instructions or data structures and which can be read by a general-purpose or special-purpose computer, or a general-purpose or special-purpose processor. Additionally, any connection is properly termed a computer-readable medium, and, thus, is included if the software is transmitted from a website, server, or other remote source via a coaxial cable, fiber optic cable, twisted pair, Digital Subscriber Line (DSL), or wirelessly, e.g., infrared, radio, and microwave. Such discs (disk) and disks (disc) include compact disks, laser disks, optical disks, DVDs, floppy disks and blu-ray disks where disks usually reproduce data magnetically, while disks usually reproduce data optically with lasers. Combinations of the above may also be included in the computer-readable medium.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are merely exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (10)

1. A method for automatically generating a kubernets resource monitoring and data presentation graph is characterized by comprising the following steps:
acquiring and storing various index data packets related to services in the kubernets cluster; wherein, the service is selected according to the display requirement;
according to chart generation rules set for various indexes related to the service, interpreting data in various index data packets related to the service in the kubernets cluster into graphic data capable of being rendered by a user interface, and generating a chart corresponding to the service through the graphic data capable of being rendered by the user interface;
and displaying the generated chart corresponding to the service to the user through a user interface.
2. The method of automatically generating a kubernets resource monitoring and data presentation graph according to claim 1, wherein the various types of metrics related to traffic within the kubernets cluster include: indexes of running states of the kubernets cluster, indexes of flow agent layer software, indexes of container running states, indexes of service running states, indexes of quality and states of external resources depended by the service and indexes of kubernets resource states;
the acquiring various index data packets related to the service in the kubernets cluster specifically includes:
according to a request for generating a diagram corresponding to a service, determining various index data related to the service according to a service name in kubernets software, forming various index data packets, and obtaining and storing various index data packets related to the service formed in a kubernets cluster from the kubernets software, wherein the kubernets software runs on the kubernets cluster and is used for collecting various index data related to the service in the kubernets cluster.
3. The method of automatically generating a kubernets resource monitoring and data presentation graph according to claim 1, further comprising, after said obtaining various types of metric data packets related to traffic within a kubernets cluster:
checking whether the data formats and data labels of the data in various index data packets related to the service in the kubernets cluster are in compliance;
when the data format and the data label are not in compliance, marking the non-compliance data in the data related to the service as non-compliance data, and alarming aiming at the non-compliance data;
when the data format and the data label are in compliance, the compliance data in the data related to the business are marked as compliance data, and the compliance data are stored, wherein the compliance data are used for generating a chart corresponding to the business.
4. The method of automatically generating a kubernets resource monitoring and data presentation graph according to claim 1, further comprising, prior to said obtaining various types of metric data packets related to traffic within a kubernets cluster:
setting chart generation rules for various indexes related to the service through a user interface, which specifically comprises the following steps:
selecting a service for generating a chart through a user interface, configuring the style of the generated chart for the index of the selected service, and configuring the display form of the generated chart for the index of the selected service;
setting a threshold value for judging whether the data is abnormal or not for the index of the service, and setting a special form adopted by the abnormal data when the chart is displayed;
setting whether a corresponding chart of the service is automatically generated according to the service name, which specifically comprises the following steps: automatically generating all set charts by default, otherwise, generating the selected chart;
and obtaining the chart generation rule after the chart to be generated for the service related index is set through the user interface.
5. The method of automatically generating a kubernets resource monitoring and data presentation graph according to claim 2, further comprising:
configuring an alarm rule for a service-related index, wherein the alarm rule is applicable to all services in a default state, and is set for a certain service independently in a non-default state;
the configuring of the alarm rule for the service-related index specifically includes:
a first comparative equation: configuring alarm rules which are larger than a threshold value, smaller than the threshold value or equal to the threshold value for the service related indexes; meanwhile, configuring an alarm time interval, alarm times, cooling time, an alarm receiver and an alarm mode;
the second comparative formula: setting an alarm rule for the index variance, wherein the alarm rule is larger than a threshold value, smaller than the threshold value or equal to the threshold value; meanwhile, configuring an alarm time interval, alarm times, cooling time, an alarm receiver and an alarm mode; the index variance is formed by calculating the variance of the related indexes of the service;
third comparative example: configuring an alarm rule of which the index comparison difference is greater than a threshold value, less than the threshold value or equal to the threshold value; meanwhile, configuring an alarm time interval, alarm times, cooling time, an alarm receiver and an alarm mode; the index similarity difference value is obtained by comparing the service-related index with data at the same time point before the first preset time interval;
fourth comparative example: configuring an alarm rule that the difference value of the index ring ratios is greater than a threshold value, less than the threshold value or equal to the threshold value; meanwhile, an alarm time interval, alarm times, cooling time, an alarm receiver and an alarm mode are configured, and the index ring ratio difference is obtained by performing ring ratio on the data of the service related index and a second preset time interval;
aiming at any form data of the first contrast mode to the fourth contrast mode, the alarm mode comprises the following steps:
preselecting a plurality of indexes, and alarming when at least two indexes trigger threshold values; or preselecting a plurality of indexes, and alarming when any index in the plurality of indexes triggers a threshold value;
the method for automatically generating the kubernets resource monitoring and data display diagram further comprises the following steps:
the alarm device obtains various index data packets related to the service in the kubernets cluster, which are stored after the kubernets software obtains the data packets, judges any form data from a first comparison mode to a fourth comparison mode according to corresponding threshold values in alarm rules configured for the indexes related to the service, and sends the form data to an alarm receiver according to the alarm mode when any form data from the first comparison mode to the fourth comparison mode meets the corresponding threshold values.
6. A system for automatically generating a kubernets resource monitoring and data presentation graph, comprising:
the data acquisition unit is used for acquiring and storing various index data packets related to the service in the kubernets cluster; wherein, the service is selected according to the display requirement;
the graph generation unit is used for interpreting data in various index data packets related to the service in the kubernets cluster into graphic data which can be rendered by a user interface according to graph generation rules set for various indexes related to the service, and generating a graph corresponding to the service through the graphic data which can be rendered by the user interface;
and the chart display unit is used for displaying the generated chart corresponding to the service to the user through a user interface.
7. The system for automatically generating a kubernets resource monitoring and data presentation graph according to claim 6, wherein the various types of metrics related to traffic within the kubernets cluster include: indexes of running states of the kubernets cluster, indexes of flow agent layer software, indexes of container running states, indexes of service running states, indexes of quality and states of external resources depended by the service and indexes of kubernets resource states;
the data acquisition unit is specifically configured to:
according to a request for generating a diagram corresponding to a service, determining various index data related to the service according to a service name in kubernets software, forming various index data packets, and obtaining and storing various index data packets related to the service formed in a kubernets cluster from the kubernets software, wherein the kubernets software runs on the kubernets cluster and is used for collecting various index data related to the service in the kubernets cluster.
8. The system for automatically generating a kubernets resource monitoring and data presentation graph as claimed in claim 6, further comprising a data checking unit, said data checking unit being specifically configured to:
after the data acquisition unit acquires various index data packets related to the service in the kubernets cluster, checking whether the data formats and data labels of the data in the acquired various index data packets related to the service in the kubernets cluster are in compliance;
when the data format and the data label are not in compliance, marking the non-compliance data in the data related to the service as non-compliance data, and alarming aiming at the non-compliance data;
when the data format and the data label are in compliance, the compliance data in the data related to the business are marked as compliance data, and the compliance data are stored, wherein the compliance data are used for generating a chart corresponding to the business.
9. The system for automatically generating a kubernets resource monitoring and data presentation graph as claimed in claim 6, further comprising a graph rule generating unit, wherein the graph rule generating unit is specifically configured to:
before the data obtaining unit obtains various index data packets related to the service in the kubernets cluster, setting chart generating rules for various indexes related to the service through a user interface, specifically including:
selecting a service for generating a chart through a user interface, configuring the style of the generated chart for the index of the selected service, and configuring the display form of the generated chart for the index of the selected service;
setting a threshold value for judging whether the data is abnormal or not for the index of the service, and setting a special form adopted by the abnormal data when the chart is displayed;
setting whether a corresponding chart of the service is automatically generated according to the service name, which specifically comprises the following steps: automatically generating all set charts by default, otherwise, generating the selected chart;
and obtaining the chart generation rule after the chart to be generated for the service related index is set through the user interface.
10. The system for automatically generating a kubernets resource monitoring and data presentation graph as claimed in claim 7, further comprising an alarm rule setting unit, the alarm rule setting unit being specifically configured to:
configuring an alarm rule for a service-related index, wherein the alarm rule is applicable to all services in a default state, and is set for a certain service independently in a non-default state;
the configuring of the alarm rule for the service-related index specifically includes:
a first comparative equation: configuring alarm rules which are larger than a threshold value, smaller than the threshold value or equal to the threshold value for the service related indexes; meanwhile, configuring an alarm time interval, alarm times, cooling time, an alarm receiver and an alarm mode;
the second comparative formula: setting an alarm rule for the index variance, wherein the alarm rule is larger than a threshold value, smaller than the threshold value or equal to the threshold value; meanwhile, configuring an alarm time interval, alarm times, cooling time, an alarm receiver and an alarm mode; the index variance is formed by calculating the variance of the related indexes of the service;
third comparative example: configuring an alarm rule of which the index comparison difference is greater than a threshold value, less than the threshold value or equal to the threshold value; meanwhile, configuring an alarm time interval, alarm times, cooling time, an alarm receiver and an alarm mode; the index similarity difference value is obtained by comparing the service-related index with data at the same time point before the first preset time interval;
fourth comparative example: configuring an alarm rule that the difference value of the index ring ratios is greater than a threshold value, less than the threshold value or equal to the threshold value; meanwhile, an alarm time interval, alarm times, cooling time, an alarm receiver and an alarm mode are configured, and the index ring ratio difference is obtained by performing ring ratio on the data of the service related index and a second preset time interval;
aiming at any form data of the first contrast mode to the fourth contrast mode, the alarm mode comprises the following steps:
preselecting a plurality of indexes, and alarming when at least two indexes trigger threshold values; or preselecting a plurality of indexes, and alarming when any index in the plurality of indexes triggers a threshold value;
the method for automatically generating the kubernets resource monitoring and data display diagram further comprises the following steps:
and the alarm unit is used for acquiring various index data packets related to the service in the kubernets cluster stored after the alarm is acquired from the kubernets software, judging any form data from a first comparison mode to a fourth comparison mode according to a corresponding threshold value in an alarm rule configured for the service-related index, and sending the form data to an alarm receiver according to the alarm mode when the form data from the first comparison mode to the fourth comparison mode meets the corresponding threshold value.
CN202111420771.2A 2021-11-26 2021-11-26 Method and system for automatically generating kubernets resource monitoring and data display diagram Pending CN114218039A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111420771.2A CN114218039A (en) 2021-11-26 2021-11-26 Method and system for automatically generating kubernets resource monitoring and data display diagram

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111420771.2A CN114218039A (en) 2021-11-26 2021-11-26 Method and system for automatically generating kubernets resource monitoring and data display diagram

Publications (1)

Publication Number Publication Date
CN114218039A true CN114218039A (en) 2022-03-22

Family

ID=80698563

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111420771.2A Pending CN114218039A (en) 2021-11-26 2021-11-26 Method and system for automatically generating kubernets resource monitoring and data display diagram

Country Status (1)

Country Link
CN (1) CN114218039A (en)

Similar Documents

Publication Publication Date Title
US11971778B1 (en) Anomaly detection from incoming data from a data stream
US20210406317A1 (en) Cardinality of time series
CN111294217B (en) Alarm analysis method, device, system and storage medium
CN109308284B (en) Report menu generation method and device, computer equipment and storage medium
US20130179793A1 (en) Enhancing visualization of relationships and temporal proximity between events
CN112311617A (en) Configured data monitoring and alarming method and system
US11604802B2 (en) Computer network controlled data orchestration system and method for data aggregation, normalization, for presentation, analysis and action/decision making
US20130212257A1 (en) Computer program and monitoring apparatus
CN105608517B (en) Business transaction performance management and visualization method and device based on flow
CN110838944A (en) Method for realizing cloud center tenant dimension topological graph
CN101989931A (en) Operation alarm processing method and device
CN106709057A (en) Distributed cluster visualized database
JP4361525B2 (en) Management method of physical connection state of communication device connected to communication network, information processing apparatus, and program
CN111277569A (en) Network message decoding method and device and electronic equipment
US10334017B2 (en) Tracking a status of a file transfer using feedback files corresponding to file transfer events
CN114328107A (en) Monitoring method and system for optomagnetic fusion storage server cluster and electronic equipment
CN109828883B (en) Task data processing method and device, storage medium and electronic device
CN110427297A (en) Diagnostic message acquisition methods, system and gateway and computer-readable medium
CN110308901A (en) Handle data variable method, apparatus, equipment and storage medium in front end page
CN110943887B (en) Probe scheduling method, device, equipment and storage medium
CN114218039A (en) Method and system for automatically generating kubernets resource monitoring and data display diagram
EP2587416A1 (en) Systems and methods for monitoring compliance status based on time-ordered reference periods
CN114513334B (en) Risk management method and risk management device
CN116880840A (en) Service interface generation method, service interface generation device, electronic equipment and medium
CN111597091A (en) Data monitoring method and system, electronic equipment and computer storage medium

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
TA01 Transfer of patent application right

Effective date of registration: 20230419

Address after: Room 501-502, 5/F, Sina Headquarters Scientific Research Building, Block N-1 and N-2, Zhongguancun Software Park, Dongbei Wangxi Road, Haidian District, Beijing, 100193

Applicant after: Sina Technology (China) Co.,Ltd.

Address before: 100193 7th floor, scientific research building, Sina headquarters, plot n-1, n-2, Zhongguancun Software Park, Dongbei Wangxi Road, Haidian District, Beijing, 100193

Applicant before: Sina.com Technology (China) Co.,Ltd.

TA01 Transfer of patent application right