Monitoring index data collection method and device

Through the multi-tenant shared cluster architecture, efficient collection and storage of monitoring indicator data in the cloud computing environment is achieved, solving the problems of high resource consumption and increased costs, improving resource utilization efficiency and reducing the basic costs of cloud vendors.

CN119807278BActive Publication Date: 2025-10-21BEIJING BAIDU NETCOM SCI & TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411875257.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-18
Publication Date
2025-10-21
Estimated Expiration
2044-12-18

AI Technical Summary

Technical Problem

In a cloud computing environment, existing technologies make it difficult to efficiently collect monitoring indicator data while ensuring customer data isolation, resulting in high resource consumption and increased costs.

Method used

It adopts a multi-tenant shared cluster architecture, realizes end-to-end data collection and storage by creating, querying and updating the relationship records of monitoring instances, supports flexible storage configuration and efficient automatic migration capabilities, and ensures data isolation and resource utilization efficiency between tenants.

Benefits of technology

It reduces resource consumption and lowers the basic costs of cloud vendors. At the same time, it realizes the efficient collection, storage and alarm processing of service monitoring indicators in a strictly isolated environment, thereby improving the effective utilization of resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119807278B_ABST
    Figure CN119807278B_ABST
Patent Text Reader

Abstract

The disclosure provides a monitoring index data collection method and device, relates to the field of cloud computing, and particularly relates to the field of cloud native. The specific implementation scheme is: in response to receiving a request for creating a monitoring instance, a record of the relationship between a tenant and a to-be-created monitoring instance is created in a database table, wherein the request includes an estimated index amount; in the existing monitoring instances in the database table, it is queried whether there is a target monitoring instance with empty capacity satisfying the estimated index amount; in response to the existence, the attribute information of the to-be-created monitoring instance in the record is updated according to the attribute information of the target monitoring instance; and in response to receiving monitoring index data of the tenant, the monitoring index data is written into a storage space corresponding to the target monitoring instance. The embodiment not only solves the data isolation problem between tenants, but also significantly improves the effective utilization of resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of monitoring indicator data collection, and in particular to a monitoring indicator data collection method and device. Background Art

[0002] With the rapid expansion of cloud computing, customers are increasingly reliant on services deployed on cloud providers' platforms and are demanding real-time monitoring of their operational status. Monitoring the operational health of services through the systematic collection of key performance indicators (KPIs) is crucial for ensuring service stability and responsiveness.

[0003] However, while supporting customer metric collection, cloud service providers must ensure the isolation of customer data to protect privacy and comply with compliance requirements. Different isolation measures bring different levels of cost burden. Summary of the Invention

[0004] The present disclosure provides a monitoring indicator data collection method, apparatus, device, storage medium, and computer program product.

[0005] According to a first aspect of the present disclosure, a monitoring indicator data collection method is provided, comprising: in response to receiving a request to create a monitoring instance, creating a record of the relationship between a tenant and a monitoring instance to be created in a database table, wherein the request includes an estimated indicator quantity; among the existing monitoring instances in the database table, querying whether there is a target monitoring instance with free capacity that meets the estimated indicator quantity; in response to existence, updating the attribute information of the monitoring instance to be created in the record according to the attribute information of the target monitoring instance; in response to receiving the monitoring indicator data of the tenant, writing the monitoring indicator data into the storage space corresponding to the target monitoring instance.

[0006] According to a second aspect of the present disclosure, a monitoring indicator data collection device is provided, comprising: a creation unit, configured to, in response to receiving a request to create a monitoring instance, create a record of the relationship between a tenant and a monitoring instance to be created in a database table, wherein the request includes an estimated indicator quantity; a query unit, configured to query, among the existing monitoring instances in the database table, whether there is a target monitoring instance with spare capacity that meets the estimated indicator quantity; an update unit, configured to, in response to existence, update the attribute information of the monitoring instance to be created in the record according to the attribute information of the target monitoring instance; and a write unit, configured to, in response to receiving the monitoring indicator data of the tenant, write the monitoring indicator data into the storage space corresponding to the target monitoring instance.

[0007] According to a third aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute any one of the methods described in the first aspect.

[0008] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute any one of the methods according to the first aspect.

[0009] According to a fifth aspect of the present disclosure, a computer program product is provided, comprising a computer program, wherein the computer program implements any one of the methods according to the first aspect when executed by a processor.

[0010] The monitoring indicator data collection method and device provided by the embodiments of the present disclosure do not need to create a separate monitoring instance for each customer's Kubernetes cluster, but adopt a multi-tenant shared cluster architecture. On this basis, a monitoring system is constructed that includes the relationships of "end-to-end data collection", "storage instance" and "traffic forwarding". It not only helps to reduce resource consumption, but also alleviates the impact caused by resource limitations. In addition, by providing diversified storage options, flexible and upgradeable storage configurations, and efficient automatic migration capabilities and data defragmentation mechanisms, it not only solves the data isolation problem between tenants, but also significantly improves the effective use of resources. This innovation enables tenants to collect, store and process alarms for service monitoring indicators in a strictly isolated environment, while reducing the basic costs of cloud vendors.

[0011] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] The accompanying drawings are provided to facilitate a better understanding of the present invention and do not constitute a limitation of the present disclosure.

[0013] Figure 1 is an exemplary system architecture diagram in which an embodiment of the present disclosure may be applied;

[0014] Figure 2 is a flow chart of an embodiment of a monitoring indicator data collection method according to the present disclosure;

[0015] Figures 3a-3f is a schematic diagram of an application scenario of the monitoring indicator data collection method according to the present disclosure;

[0016] Figure 4 is a flow chart of another embodiment of the monitoring indicator data collection method according to the present disclosure;

[0017] Figure 5 is a structural diagram of an embodiment of a monitoring indicator data acquisition device according to the present disclosure;

[0018] Figure 6 It is a schematic diagram of the structure of a computer system of an electronic device suitable for implementing the embodiments of the present disclosure. DETAILED DESCRIPTION

[0019] The following description of exemplary embodiments of the present disclosure is made in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding. These details should be considered as merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0020] Figure 1 An exemplary system architecture is shown to which an embodiment of the monitoring indicator data collection method or monitoring indicator data collection device disclosed herein can be applied.

[0021] like Figure 1 As shown, the system architecture may include a console, a monitoring metadata cluster, a monitoring agent server, and a monitoring resource cluster.

[0022] The console provides a visual interface for operating monitoring services. Administrators can create monitoring instances through the console.

[0023] The monitoring metadata data cluster can include a message processing module and a monitoring service module. The monitoring service module serves as the API entry point for the monitoring indicator data collection service backend, providing API calls to the monitoring management module. The message processing module processes messages from the monitoring service module and alerts from the Redis database in the monitoring resource cluster.

[0024] The monitoring proxy server, as the collection module of the public cloud K8S cluster, needs to push data to the write proxy entry and attach a message header with the authentication / monitoring instance identifier.

[0025] Monitoring resource clusters can include:

[0026] 1. The monitoring and management module is responsible for managing the relationship between tenants and instances, the relationship between instances and capacity, and offline synchronization to check whether the instance capacity at the current time exceeds the limit.

[0027] 2. Monitoring instance, including a set of data collection and monitoring components including vmInsert (write component), vmSelect (query component), and vmStorage (storage space).

[0028] 3. The proxy management module updates the configuration based on the collection tasks submitted by tenants, manages the status of the K8s cluster proxy server, and interacts with the sidecar container on the proxy server side.

[0029] 4. Visual query module, which can query the monitoring data of the monitoring instance from the query proxy through the visual interface.

[0030] 5. Load balancing module, which can select write proxy / query proxy according to traffic.

[0031] 6. The write agent, as the entrance to the public cloud, is responsible for routing write data to the corresponding monitoring instance and the corresponding tenant entrance.

[0032] 7. The query agent, as the exit of the public cloud, is responsible for routing query data to the corresponding monitoring instance and the corresponding tenant exit.

[0033] 8. The alarm module calculates and generates alarm information based on the preset alarm rules and pushes it to the Redis database.

[0034] 9. Redis database, used to store alarm information.

[0035] Continue to refer Figure 2 , shows a process 200 of an embodiment of a monitoring indicator data collection method according to the present disclosure. The monitoring indicator data collection method includes the following steps:

[0036] Step 201: In response to receiving a request to create a monitoring instance, a record of the relationship between the tenant and the monitoring instance to be created is created in a database table.

[0037] In this embodiment, the execution subject of the monitoring indicator data collection method (for example Figure 1 The monitoring service module shown in the figure) can receive a request to create a monitoring instance from the console through a wired connection or a wireless connection, wherein the request includes an estimated indicator quantity. The monitoring service module creates a record in a database table (such as Mysql) to record the relationship between the current tenant and the monitoring instance. The monitoring service module then requests the monitoring proxy server (such as K8S APIServer) to create or update a custom resource object, which is referred to as a monitoring entity (Monitor Instance, abbreviated as: MI) in this article. Figure 3a shown.

[0038] Step 202 : In the existing monitoring instances in the database table, it is checked whether there is a target monitoring instance whose free capacity meets the estimated indicator quantity.

[0039] In this embodiment, since it is necessary to determine whether the current tenant is sharing a monitoring instance or creating a new one, a judgment relationship needs to be introduced. This application adds key indicators for multi-tenant monitoring instances:

[0040] capacity_metrics_per_hour: The number of metric points that a multi-tenant monitoring instance can accommodate per hour

[0041] realtime_metrics_per_hour: The total number of write points per hour for this multi-tenant monitoring instance

[0042] estimated_user_metrics_per_hour: Estimated metric volume for newly added multi-tenant tenants. Default values ​​are used by default. Research the average volume of CCE monitoring instances and cloud product tenants. The default values ​​for CCE metrics and cloud product instance metrics can be different.

[0043] user_num: the number of multi-tenants in the current instance

[0044] like Figure 3b As shown, when a tenant's request to create a new monitoring instance is sent to the monitoring service module via the console, the monitoring service module performs a database lookup to query the instance that can meet the tenant's estimated indicators and has the smallest free capacity (this is done to avoid capacity fragmentation).

[0045] Step 203: In response to existence, update the attribute information of the monitoring instance to be created in the record according to the attribute information of the target monitoring instance.

[0046] In this embodiment, if there is an instance that meets the requirements, the instance is reused, the tenant instance relationship table is updated, and the order is created.

[0047] Step 204 : In response to receiving the monitoring indicator data of the tenant, the monitoring indicator data is written into the storage space corresponding to the target monitoring instance.

[0048] In this embodiment, the monitoring proxy server sends the monitoring indicator data to the monitoring instance. The monitoring indicator data includes a message header, which includes a monitoring instance ID, which can be used for addressing and finding the corresponding monitoring instance to store the monitoring indicator data.

[0049] The method provided by the above-mentioned embodiment of the present disclosure allows customers to quickly purchase monitoring instances while enjoying the ability to use high-specification monitoring instances seamlessly as traffic increases. For cloud vendors, the multi-tenant approach based on VictoriaMetrics can not only quickly utilize open source capabilities, but also, based on the cloud vendor's account system, support for reconfiguration and upgrades, and automated migration capabilities, achieve different scales of use for different customers. Through proxy management of traffic, cloud vendors have a clear grasp of the services they provide and the audiences they target; by supporting defragmentation and other capabilities, it can further ensure tenant security isolation and efficient and seamless use of monitoring capabilities on a multi-tenant basis, while also greatly reducing costs. It has a certain leading advantage in the industry.

[0050] In some optional implementations of this embodiment, the method further includes: in response to the absence of a monitoring instance, creating a monitoring instance that meets the estimated indicator quantity, and updating the attribute information of the monitoring instance to be created in the record according to the attribute information of the created monitoring instance, wherein the monitoring instance includes a writing component, a query component and a storage space. Figure 3b As shown in 204 , if there is no monitoring instance that meets the requirements, a new instance object is created based on the estimated indicator quantity of the new tenant.

[0051] In some optional implementations of this embodiment, the method further includes: regularly detecting whether the amount of data written to the storage space per unit time is greater than the maximum amount of data that can be accommodated by the storage space per unit time; in response to being greater than, outputting an alarm message and performing tenant migration. Figure 3b As shown in 205 and 206, the scheduled task on the left refreshes the capacity watermark (real-time usage) of the full multi-tenant instance every hour. If the real-time hourly write points are greater than the hourly capacity of the instance, there is an availability risk for the instance. An alarm can be sent to the administrator to determine whether to migrate tenants or perform automatic migration.

[0052] In some optional implementations of this embodiment, the request also includes: tenant type; and querying whether there is a target monitoring instance with free capacity that meets the estimated indicator quantity among the existing monitoring instances in the database table, including: in response to the tenant type being a large customer, querying whether there is a target monitoring instance that meets the estimated indicator quantity and is not used by other tenants among the existing monitoring instances in the database table.

[0053] It is responsible for generating actual resources and updating the status of the monitoring instance according to changes in the content of the monitoring instance. For example, when creating a new instance, a tenant only needs to provide key information such as storage duration, estimated indicator quantity (this application supports the default value), tenant type (key customer / ordinary), etc. The monitoring management module will be responsible for generating the corresponding data source and returning the corresponding account ID, sub-account ID, and new monitoring instance ID. Among them, as a tenant of the ordinary type, multiple account ID-sub-account ID pairs will be assigned to different monitoring instances, that is, the monitoring instance is shared by multiple tenants. As a tenant of the key customer type, each account ID has an exclusive monitoring instance to ensure the stability of the service.

[0054] In some optional implementations of this embodiment, the request also includes: storage duration, the storage space corresponding to the monitoring instance is set with a timed clearing duration; and querying whether there is a target monitoring instance with free capacity that meets the estimated indicator quantity among the existing monitoring instances in the database table, including: querying whether there is a target monitoring instance with free capacity that meets the estimated indicator quantity and a timed clearing duration that meets the storage duration among the existing monitoring instances in the database table.

[0055] When generating or updating a cluster, the corresponding cluster configuration is generated for the database, such as storage duration, number of replicas, CPU / memory settings, etc.

[0056] To prevent the creation of too many clusters with different durations, this application supports 15 days, 30 days, 90 days, 180 days, and 365 days options based on common tenant usage scenarios, with d representing the number of days.

[0057] Reuse monitoring instances or create new monitoring instances based on the storage duration requested by the tenant.

[0058] In some optional implementations of this embodiment, the request also includes: tenant type and storage duration, and the storage space corresponding to the monitoring instance is set with a timed clearing duration; and querying whether there is a target monitoring instance with free capacity that meets the estimated indicator quantity among the existing monitoring instances in the database table, including: in response to the tenant type being a large customer, querying whether there is a target monitoring instance with free capacity that meets the estimated indicator quantity, and the timed clearing duration meets the storage duration, and is not used by other tenants among the existing monitoring instances in the database table.

[0059] Tenants will be divided into VIP and general types. VIP tenants will correspond to multiple clusters, and general tenants will be deployed in multiple clusters. The data of VIP tenants and general tenants will not be in the same cluster to avoid traffic imbalance that may interfere with the stability of tenant services.

[0060] In some optional implementations of this embodiment, the request also includes: tenant type, storage duration, and the method also includes: storing information about the tenant type, the storage duration, and the resources used to create the monitoring instance in corresponding records in the database table.

[0061] When creating or updating a cluster, the corresponding cluster configuration is stored in the database, including storage duration, number of replicas, and resource information such as CPU and memory. This resource information is stored as attributes of the monitoring instance in the corresponding record in the database table. This allows you to search for reusable monitoring instances in the database table when creating new monitoring instances.

[0062] In some optional implementations of this embodiment, the method also includes: in response to detecting that any one of the write speed, query speed, and storage capacity of the storage space corresponding to the target monitoring instance exceeds the corresponding maximum capacity, migrating the tenant who writes the largest amount of data to the storage space of the target monitoring instance to other monitoring instances.

[0063] It is responsible for managing the maximum upper limit of the monitoring instance [such as 300,000 QPS] and can change the vertical capacity of all components in the monitoring instance. If the cluster exceeds the maximum limit of 200,000 QPS, the largest tenant in it needs to be selected for migration.

[0064] In some optional implementations of this embodiment, writing the monitoring indicator data into the storage space corresponding to the target monitoring instance includes: extracting an authentication token and an identifier of the target monitoring instance from the message header of the monitoring indicator data; authenticating the monitoring indicator data based on the authentication token; and in response to detecting that the authentication is passed and the target monitoring instance has not been deleted, writing the monitoring indicator data into the storage space corresponding to the target monitoring instance.

[0065] like Figure 3c The following diagram shows the indicator collection flow. JWT authentication can be used. The authentication token is placed in the message header of the monitoring indicator data. Only the account ID level needs to be authenticated. Compliance verification is also performed to avoid returning deleted monitoring instances with valid authentication tokens, which could put traffic pressure on the write proxy module.

[0066] The monitoring instance ID is added to the message header of the monitoring indicator data. Upon receiving a request from the monitoring proxy server, the write proxy module routes the monitoring instance ID set in the message header to the address of the write component of a different monitoring instance and a different tenant. The monitoring indicator data is then written to the storage space corresponding to the target monitoring instance based on this address.

[0067] In some optional implementations of this embodiment, the method further includes: in response to detecting that the target monitoring instance is initialized, pulling all records of the relationship between tenants and monitoring instances from the database table and loading them into the memory; and regularly updating the changed data in the database table to the memory.

[0068] By writing traffic indicators highlighted by the proxy module, it is easy to observe the collection rate and traffic of the cluster more accurately, making it easier to prepare basic resources in advance.

[0069] In order to improve the performance of the write proxy module, the present invention will pull the full amount of multi-tenant monitoring instance ID and its namespace, account ID, sub-account ID and other information from the database into the memory in batches in advance during initialization. And it will synchronize the memory from the database every N minutes (N can be dynamically adjusted according to actual conditions) to ensure the update of data offline. Figure 3d shown.

[0070] The information loaded into memory is as follows:

[0071] "Storage duration": "15d",

[0072] "Monitoring Instance ID":"xyz123",

[0073] "Account ID":5,

[0074] "Sub-account ID":95,

[0075] In some optional implementations of this embodiment, the method further includes: in response to receiving a query request, returning a corresponding amount of monitoring indicator data according to a preset current limiting rule.

[0076] This application limits the number of queries based on the strength level.

[0077] This application takes into account the special needs of large customers and provides the ability to modify configurations to query more indicator data. The indicators that can usually be modified are as follows:

[0078] search.maxSamplesPerQuery limits the maximum number of samples that can be returned per query

[0079] search.maxSamplesPerSeries limits the maximum number of samples that can be processed by each query in a single time series

[0080] search.maxUniqueTimeseries limits the maximum number of unique time series that can be returned per query

[0081] In addition, this application supports background adjustment of instance-level CPU / memory request and limit values.

[0082] In some optional implementations of this embodiment, the method also includes: in response to receiving a query request, extracting an authentication token and an identifier of the target monitoring instance from the message header of the query request; authenticating the query request based on the authentication token; in response to detecting that the authentication is passed and the target monitoring instance has not been deleted, querying the monitoring indicator data in the storage space corresponding to the target monitoring instance.

[0083] This application introduces a query proxy module as a query proxy, which is similar to the write proxy in terms of capabilities and has the same unified authentication and traffic distribution functions as the write proxy.

[0084] In some optional implementations of this embodiment, the method also includes: in response to detecting that the number of tenants of the target monitoring instance is less than a predetermined number, marking the tenants of the target monitoring instance with a non-migration label; in response to detecting that the storage duration of the data in the storage space of the target monitoring instance exceeds the storage duration of the target monitoring instance, clearing the storage space of the target monitoring instance and deleting the non-migration label.

[0085] The scheduled task of this application will regularly defragment based on the capacity of multiple monitoring instances, that is, regularly mark the monitoring instances of fewer tenants instead of migrating them.

[0086] The reason is that the monitoring instance itself will release the tenant data that is no longer written. The system of this application only needs to mark the metadata database to perform good soft deletion records.

[0087] When a new customer needs to add a new monitoring instance, it only needs to be allocated according to the monitoring instance with the smallest remaining capacity.

[0088] In some optional implementations of this embodiment, the method also includes: counting the growth rate of the monitoring indicator data in the storage space corresponding to the target monitoring instance; predicting the number of monitoring instances to be created within a predetermined time based on the increase rate; and pre-creating the said number of monitoring instances for backup.

[0089] If a monitoring instance is created in real time, it will rely on many IaaS resources and need to schedule cloud servers, disks, networks and other resources. The creation process is bound to be slow, which will not provide a good customer experience.

[0090] Taking this scenario into consideration, this application will reserve N monitoring instances that can accommodate sub-account levels based on different storage duration specifications.

[0091] N can be dynamically adjusted based on the growth rate in the past week or month. The number of reserved instances is N*5 sub-account-level instances, ensuring the speed at which tenants can create monitoring instances.

[0092] Further references Figure 4 , which shows a process 400 of another embodiment of a monitoring indicator data collection method. The process 400 of the monitoring indicator data collection method includes the following steps:

[0093] Step 401 : In response to receiving a storage duration change request of a target monitoring instance, query the existing monitoring instances in the database table to see whether there is a changed monitoring instance that meets the changed storage duration and has free capacity that meets the estimated indicator.

[0094] In this embodiment, due to the limitations of the architecture model of the monitoring instance itself, although the VM supports a multi-tenant architecture model, if a public cloud product is built directly on the VM, it will obviously not meet the demands of different customers.

[0095] For example, the same monitoring instance shares the replication factor and retention period. However, some cloud customers prefer 15 days of storage, while others prefer 30 days. Directly using the monitoring instance's multitenancy mode cannot meet these requirements.

[0096] For example, in the early stages of a customer's business, a 15-day storage monitoring instance may be sufficient. However, as the business grows, a 30-day or even longer storage instance may be required. How can this be supported?

[0097] This application has been modified for such scenarios. As mentioned above, in order to balance the complexity and practicality of the system, this application provides five types of modifiable storage durations: 15d, 30d, 90d, 180d, and 365d. It does not support any customized duration.

[0098] like Figure 3e As shown in the figure, we assume that the customer changes the storage duration from 15 days to 30 days. In this case, a set of underlying monitoring instances is created for the current tenant, and the account ID and sub-account ID of the original VM are reused in the new monitoring instance.

[0099] Step 402: In response to the existence of a changed monitoring instance, update the target monitoring instance according to the changed monitoring instance.

[0100] In this embodiment, if there is a monitoring instance in the current monitoring instance pool that meets the storage duration and does not exceed the capacity, an available monitoring instance will be directly selected from the monitoring instance pool.

[0101] Step 403: Migrate the target monitoring instance to the changed monitoring instance.

[0102] In this embodiment, the alarm rules and aggregation rules of the target monitoring instance are migrated to the change monitoring instance; the write component of the target monitoring instance is deleted, and writing data to the storage space of the target monitoring instance is stopped, and the target monitoring instance is set to read-only; in response to detecting that the storage duration of the data in the storage space of the target monitoring instance exceeds the storage duration of the target monitoring instance, the query component of the target monitoring instance is switched to read-only storage space of the change monitoring instance, and the data in the storage space of the target monitoring instance is cleaned up.

[0103] In some optional implementations of this embodiment, the method further includes: in response to the absence of a change monitoring instance, creating a change monitoring instance that meets the storage duration after the change and whose free capacity meets the estimated indicator quantity, wherein the identifier of the change monitoring instance is the same as the identifier of the target monitoring instance; and migrating the target monitoring instance to the change monitoring instance.

[0104] In some optional implementations of this embodiment, the method also includes: in response to detecting that the acquisition rate and / or traffic of the target monitoring instance exceeds the corresponding predetermined threshold, creating a new change monitoring instance and setting the tenant type of the change monitoring instance to a key customer; migrating the target monitoring instance to the change monitoring instance; and adjusting the resource parameters of the change monitoring instance to adapt to the key customer application scenario.

[0105] If a large customer's traffic increases rapidly and exceeds the normal vmCluster specification limits, we will take the following two actions:

[0106] 1. Shift in paradigm

[0107] This application targets large customer traffic and will degenerate from a 1:N tenant usage model to a 1:1 tenant usage model. The specific steps include the following:

[0108] Step 1: Perform a general configuration change to create a new monitoring instance, add a tag, and set the tenant ratio supported by the monitoring instance to 1:1.

[0109] Step 2: Execute step 403 to perform migration;

[0110] Step 3: Adjust the parameters required for the monitoring instance, such as CPU / memory resources, write component parameters, and query component parameters to meet the specifications of large customer scenarios.

[0111] 2. Instance relocation after exceeding the limit

[0112] As mentioned above, the scheduled task refreshes the capacity watermark (real-time usage) of the full multi-tenant instance every hour. If the real-time hourly write points are greater than the instance's hourly capacity, the instance is at availability risk. An alert can be sent to the administrator to determine whether to migrate tenants or perform automatic migration.

[0113] This application has implemented the ability to automatically migrate, similar to the reconfiguration method. However, there are two differences to note:

[0114] Difference 1: Migration after exceeding the limit is performed only within monitoring instances of the same specifications and adheres to point and capacity limits.

[0115] Difference 2: If there are no available resources in the current monitoring instance pool, a monitoring instance of the same specifications will be created for migration, such as Figure 3f As shown in the figure, multiple monitoring instances with a storage period of 15 days are created for migration.

[0116] Further references Figure 5 As an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of a monitoring indicator data acquisition device. Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.

[0117] like Figure 5 As shown, the monitoring indicator data collection device 500 of this embodiment includes: a creation unit 501, a query unit 502, an update unit 503 and a write unit 504. The creation unit 501 is configured to, in response to receiving a request to create a monitoring instance, create a record of the relationship between the tenant and the monitoring instance to be created in the database table, wherein the request includes an estimated indicator quantity; the query unit 502 is configured to query the existing monitoring instances in the database table whether there is a target monitoring instance with free capacity that meets the estimated indicator quantity; the update unit 503 is configured to, in response to existence, update the attribute information of the monitoring instance to be created in the record according to the attribute information of the target monitoring instance; the write unit 504 is configured to, in response to receiving the monitoring indicator data of the tenant, write the monitoring indicator data into the storage space corresponding to the target monitoring instance.

[0118] In this embodiment, the specific processing of the creation unit 501, the query unit 502, the update unit 503 and the writing unit 504 of the monitoring indicator data acquisition device 500 can be referred to. Figure 2 These correspond to steps 201, 202, 203, and 204 in the embodiment.

[0119] In some optional implementations of this embodiment, the creation unit 501 is further configured to: in response to non-existence, create a monitoring instance that meets the estimated indicator quantity, and update the attribute information of the monitoring instance to be created in the record according to the attribute information of the created monitoring instance, wherein the monitoring instance includes a write component, a query component and a storage space.

[0120] In some optional implementations of this embodiment, the device 500 also includes a migration unit (not shown in the drawings), which is configured to: periodically detect whether the amount of data written to the storage space per unit time is greater than the maximum amount of data that can be accommodated by the storage space per unit time; in response to being greater than, output an alarm message and perform tenant migration.

[0121] In some optional implementations of this embodiment, the request also includes: tenant type; and the query unit 502 is further configured to: in response to the tenant type being a large customer, query whether there is a target monitoring instance in the existing monitoring instances in the database table that meets the estimated indicator quantity and is not used by other tenants.

[0122] In some optional implementations of this embodiment, the request also includes: storage duration, the storage space corresponding to the monitoring instance is set with a timed clearing duration; and the query unit 502 is further configured to: query whether there is a target monitoring instance in the existing monitoring instances in the database table whose free capacity meets the estimated indicator quantity and whose timed clearing duration meets the storage duration.

[0123] In some optional implementations of this embodiment, the request also includes: tenant type and storage duration, and the storage space corresponding to the monitoring instance is set with a scheduled clearing duration; and the query unit 502 is further configured to: in response to the tenant type being a key customer, query among the existing monitoring instances in the database table whether there is a target monitoring instance whose free capacity meets the estimated indicator quantity, and whose scheduled clearing duration meets the storage duration, and which is not used by other tenants.

[0124] In some optional implementations of this embodiment, the request also includes: tenant type, storage duration, and the update unit 503 is further configured to store information about the tenant type, the storage duration and the resources used to create the monitoring instance in corresponding records in the database table.

[0125] In some optional implementations of this embodiment, the device 500 also includes a migration unit (not shown in the drawings), which is configured to: in response to detecting that any one of the write speed, query speed, and storage capacity of the storage space corresponding to the target monitoring instance exceeds the corresponding maximum capacity, migrate the tenant who writes the largest amount of data to the storage space of the target monitoring instance to other monitoring instances.

[0126] In some optional implementations of this embodiment, the writing unit 504 is further configured to: extract the authentication token and the identifier of the target monitoring instance from the message header of the monitoring indicator data; authenticate the monitoring indicator data based on the authentication token; and in response to detecting that the authentication is passed and the target monitoring instance has not been deleted, write the monitoring indicator data into the storage space corresponding to the target monitoring instance.

[0127] In some optional implementations of this embodiment, the update unit 503 is further configured to: in response to detecting the initialization of the target monitoring instance, pull all the records of the relationship between the tenant and the monitoring instance from the database table and load them into the memory; and regularly update the changed data in the database table to the memory.

[0128] In some optional implementations of this embodiment, the device 500 also includes a query unit (not shown in the drawings), which is configured to: in response to receiving a query request, return a corresponding amount of monitoring indicator data according to preset current limiting rules.

[0129] In some optional implementations of this embodiment, the device 500 also includes an authentication unit (not shown in the accompanying drawings), which is configured to: in response to receiving a query request, extract an authentication token and an identifier of the target monitoring instance from the message header of the query request; authenticate the query request based on the authentication token; and in response to detecting that the authentication is passed and the target monitoring instance has not been deleted, query the monitoring indicator data in the storage space corresponding to the target monitoring instance.

[0130] In some optional implementations of this embodiment, the device 500 also includes a change unit (not shown in the drawings), which is configured to: in response to receiving a storage duration change request for the target monitoring instance, query among the existing monitoring instances in the database table whether there is a changed monitoring instance that meets the changed storage duration and whose free capacity meets the estimated indicator quantity; in response to the existence of a changed monitoring instance, update the target monitoring instance according to the changed monitoring instance; and migrate the target monitoring instance to the changed monitoring instance.

[0131] In some optional implementations of this embodiment, the change unit is further configured to: in response to the absence of a change monitoring instance, create a change monitoring instance that meets the storage duration after the change and whose free capacity meets the estimated indicator quantity, wherein the identifier of the change monitoring instance is the same as the identifier of the target monitoring instance; and migrate the target monitoring instance to the change monitoring instance.

[0132] In some optional implementations of this embodiment, the device 500 also includes a change unit (not shown in the drawings), which is configured to: in response to detecting that the acquisition rate and / or traffic of the target monitoring instance exceeds the corresponding predetermined threshold, create a new change monitoring instance and set the tenant type of the change monitoring instance to a key customer; migrate the target monitoring instance to the change monitoring instance; and adjust the resource parameters of the change monitoring instance to adapt to the key customer application scenario.

[0133] In some optional implementations of this embodiment, the change unit is further configured to: migrate the alarm rules and aggregation rules of the target monitoring instance to the change monitoring instance; delete the write component of the target monitoring instance, stop writing data to the storage space of the target monitoring instance, and set the target monitoring instance to read-only; in response to detecting that the storage duration of the data in the storage space of the target monitoring instance exceeds the storage duration of the target monitoring instance, switch the query component of the target monitoring instance to read-only storage space of the change monitoring instance, and clean up the data in the storage space of the target monitoring instance.

[0134] In some optional implementations of this embodiment, the device 500 also includes a defragmentation unit (not shown in the accompanying drawings), which is configured to: in response to detecting that the number of tenants of the target monitoring instance is less than a predetermined number, mark the tenants of the target monitoring instance with a non-migration label; in response to detecting that the storage duration of the data in the storage space of the target monitoring instance exceeds the storage duration of the target monitoring instance, clear the storage space of the target monitoring instance and delete the non-migration label.

[0135] In some optional implementations of this embodiment, the device 500 also includes a reservation unit (not shown in the drawings), which is configured to: count the growth rate of the monitoring indicator data in the storage space corresponding to the target monitoring instance; predict the number of monitoring instances to be created within a predetermined time based on the increase rate; and pre-create the said number of monitoring instances for backup.

[0136] In the technical solution disclosed herein, the collection, storage, use, processing, transmission, provision and disclosure of tenant personal information are in compliance with relevant laws and regulations and do not violate public order and good morals.

[0137] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium, and a computer program product.

[0138] An electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method described in process 200.

[0139] A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to execute the method described in process 200.

[0140] A computer program product includes a computer program, which implements the method described in process 200 when executed by a processor.

[0141] Figure 6 A schematic block diagram of an example electronic device 600 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are provided as examples only and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0142] like Figure 6 As shown, the device 600 includes a computing unit 601, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 602 or a computer program loaded from a storage unit 608 into a random access memory (RAM) 603. Various programs and data required for the operation of the device 600 can also be stored in the RAM 603. The computing unit 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0143] Various components in device 600 are connected to I / O interface 605, including an input unit 606, such as a keyboard, mouse, etc.; an output unit 607, such as various types of displays, speakers, etc.; a storage unit 608, such as a magnetic disk, optical disk, etc.; and a communication unit 609, such as a network card, modem, wireless communication transceiver, etc. The communication unit 609 allows device 600 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0144] The computing unit 601 can be a variety of general-purpose and / or specialized processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The computing unit 601 performs the various methods and processes described above, such as the monitoring indicator data collection method. For example, in some embodiments, the monitoring indicator data collection method can be implemented as a computer software program that is tangibly contained in a machine-readable medium, such as the storage unit 608. In some embodiments, part or all of the computer program can be loaded and / or installed on the device 600 via the ROM 602 and / or the communication unit 609. When the computer program is loaded into the RAM 603 and executed by the computing unit 601, one or more steps of the monitoring indicator data collection method described above can be performed. Alternatively, in other embodiments, the computing unit 601 can be configured to perform the monitoring indicator data collection method by any other appropriate means (e.g., by means of firmware).

[0145] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0146] The program code for implementing the method of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device so that when the program code is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0147] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer 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 foregoing.

[0148] To provide interaction with a tenant, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the tenant; and a keyboard and pointing device (e.g., a mouse or trackball) through which the tenant can provide input to the computer. Other types of devices can also be used to provide interaction with the tenant; for example, the feedback provided to the tenant can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the tenant can be received in any form (including acoustic input, voice input, or tactile input).

[0149] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a tenant computer having a graphical tenant interface or a web browser through which a tenant can interact with an implementation of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0150] A computer system may include a client and a server. The client and server are generally remote from each other and typically interact through a communication network. The client-server relationship arises through computer programs running on the respective computers and having a client-server relationship with each other. The server may be a cloud server, a server in a distributed system, or a server integrated with a blockchain.

[0151] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved. This is not a limitation herein.

[0152] The above specific embodiments do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure shall be included within the scope of protection of this disclosure.

Claims

1. A monitoring indicator data collection method, comprising: In response to receiving a request to create a monitoring instance, creating a record of a relationship between the tenant and the monitoring instance to be created in a database table, wherein the request includes an estimated indicator quantity; In the existing monitoring instances in the database table, query whether there is a target monitoring instance whose free capacity meets the estimated indicator quantity; In response to existence, updating the attribute information of the monitoring instance to be created in the record according to the attribute information of the target monitoring instance; In response to receiving the monitoring indicator data of the tenant, the monitoring indicator data is written into the storage space corresponding to the target monitoring instance.

2. The method according to claim 1, wherein The method further comprises: In response to non-existence, a monitoring instance that meets the estimated indicator quantity is created, and the attribute information of the monitoring instance to be created in the record is updated according to the attribute information of the created monitoring instance, wherein the monitoring instance includes a writing component, a query component and a storage space.

3. The method according to claim 1, wherein The method further comprises: regularly detecting whether the amount of data written into the storage space within a unit time is greater than the maximum amount of data that can be accommodated by the storage space within a unit time; In response to the value being greater than, an alarm message is output and tenant migration is performed.

4. The method according to claim 1, wherein The request also includes: tenant type; and The querying, among the existing monitoring instances in the database table, whether there is a target monitoring instance whose free capacity satisfies the estimated indicator quantity includes: In response to the tenant type being a key customer, a query is made among existing monitoring instances in the database table to determine whether there is a target monitoring instance that meets the estimated indicator quantity and is not used by other tenants.

5. The method according to claim 1, wherein The request also includes: storage duration, the storage space corresponding to the monitoring instance is set with a timed clearing duration; and The querying, among the existing monitoring instances in the database table, whether there is a target monitoring instance whose free capacity satisfies the estimated indicator quantity includes: In the existing monitoring instances in the database table, it is queried whether there is a target monitoring instance whose free capacity meets the estimated indicator amount and whose scheduled clearing duration meets the storage duration.

6. The method according to claim 1, wherein The request also includes: tenant type and storage duration, and the storage space corresponding to the monitoring instance is set with a scheduled clearing duration; and The querying, among the existing monitoring instances in the database table, whether there is a target monitoring instance whose free capacity satisfies the estimated indicator quantity includes: In response to the tenant type being a key customer, a query is made among the existing monitoring instances in the database table to determine whether there is a target monitoring instance whose free capacity meets the estimated indicator quantity, whose scheduled clearing duration meets the storage duration, and which is not used by other tenants.

7. The method according to claim 2, wherein: The request further includes: tenant type and storage duration. The method further includes: The information of the tenant type, the storage duration, and the resources used to create the monitoring instance is stored in corresponding records in the database table.

8. The method according to claim 1, wherein The method further comprises: In response to detecting that any one of the write speed, query speed, and storage capacity of the storage space corresponding to the target monitoring instance exceeds the corresponding maximum capacity, the tenant who writes the largest amount of data to the storage space of the target monitoring instance is migrated to other monitoring instances.

9. The method according to claim 1, wherein Writing the monitoring indicator data into the storage space corresponding to the target monitoring instance includes: Extracting an authentication token and an identifier of a target monitoring instance from a message header of the monitoring indicator data; Authenticating the monitoring indicator data according to the authentication token; In response to detecting that the authentication is passed and the target monitoring instance is not deleted, the monitoring indicator data is written into the storage space corresponding to the target monitoring instance.

10. The method according to claim 1, wherein The method further comprises: In response to detecting that the target monitoring instance is initialized, pulling all records of relationships between tenants and monitoring instances from the database table and loading them into memory; The changed data in the database table is updated to the memory at regular intervals.

11. The method according to claim 1, wherein The method further comprises: In response to receiving the query request, a corresponding amount of monitoring indicator data is returned according to the preset current limiting rules.

12. The method according to claim 1, wherein The method further comprises: In response to receiving the query request, extracting the authentication token and the identifier of the target monitoring instance from a message header of the query request; authenticating the query request according to the authentication token; In response to detecting that the authentication is passed and the target monitoring instance is not deleted, monitoring indicator data is queried in the storage space corresponding to the target monitoring instance.

13. The method according to claim 1, wherein The method further comprises: In response to receiving the storage duration change request of the target monitoring instance, querying among the existing monitoring instances in the database table whether there is a changed monitoring instance that meets the changed storage duration and has free capacity that meets the estimated indicator amount; In response to the existence of a changed monitoring instance, updating the target monitoring instance according to the changed monitoring instance; Migrate the target monitoring instance to the changed monitoring instance.

14. The method according to claim 13, wherein: The method further comprises: In response to the absence of a change monitoring instance, creating a change monitoring instance that meets the changed storage duration and has free capacity that meets the estimated indicator amount, wherein the identifier of the change monitoring instance is the same as the identifier of the target monitoring instance; Migrate the target monitoring instance to the changed monitoring instance.

15. The method according to claim 1, wherein The method further comprises: In response to detecting that the acquisition rate and / or traffic of the target monitoring instance exceeds a corresponding predetermined threshold, creating a new change monitoring instance and setting the tenant type of the change monitoring instance to a key customer; Migrating the target monitoring instance to the changed monitoring instance; Adjust the resource parameters of the change monitoring instance to adapt to the large customer application scenario.

16. The method according to claim 13, 14 or 15, wherein: Migrating the target monitoring instance to the changed monitoring instance includes: Migrating the alarm rules and aggregation rules of the target monitoring instance to the change monitoring instance; Deleting the write component of the target monitoring instance, stopping writing data to the storage space of the target monitoring instance, and setting the target monitoring instance to read-only; In response to detecting that the storage time of the data in the storage space of the target monitoring instance exceeds the storage time of the target monitoring instance, the query component of the target monitoring instance is switched to read-only storage space of the change monitoring instance, and the data in the storage space of the target monitoring instance is cleared.

17. The method according to claim 1, wherein The method further comprises: In response to detecting that the number of tenants of the target monitoring instance is less than a predetermined number, marking the tenants of the target monitoring instance as non-migration; In response to detecting that the storage time of the data in the storage space of the target monitoring instance exceeds the storage time of the target monitoring instance, the storage space of the target monitoring instance is cleared, and the non-migration tag is deleted.

18. The method according to claim 1, wherein The method further comprises: Counting the growth rate of monitoring indicator data in the storage space corresponding to the target monitoring instance; Predicting the number of monitoring instances to be created within a predetermined time based on the growth rate; Create the specified number of monitoring instances in advance for backup.

19. A monitoring indicator data collection device, comprising: a creating unit configured to create a record of a relationship between a tenant and a monitoring instance to be created in a database table in response to receiving a request to create a monitoring instance, wherein the request includes an estimated indicator amount; A query unit configured to query, among the existing monitoring instances in the database table, whether there is a target monitoring instance whose free capacity satisfies the estimated indicator quantity; an updating unit, configured to update the attribute information of the monitoring instance to be created in the record according to the attribute information of the target monitoring instance in response to the existence; The writing unit is configured to write the monitoring indicator data into the storage space corresponding to the target monitoring instance in response to receiving the monitoring indicator data of the tenant.

20. The device according to claim 19, wherein The creation unit is further configured to: In response to non-existence, a monitoring instance that meets the estimated indicator quantity is created, and the attribute information of the monitoring instance to be created in the record is updated according to the attribute information of the created monitoring instance, wherein the monitoring instance includes a writing component, a query component and a storage space.

21. The apparatus according to claim 19, wherein The apparatus further comprises a migration unit configured to: regularly detecting whether the amount of data written into the storage space within a unit time is greater than the maximum amount of data that can be accommodated by the storage space within a unit time; In response to the value being greater than, an alarm message is output and tenant migration is performed.

22. The apparatus according to claim 19, wherein The request also includes: tenant type; and The query unit is further configured to: In response to the tenant type being a key customer, a query is made among existing monitoring instances in the database table to determine whether there is a target monitoring instance that meets the estimated indicator quantity and is not used by other tenants.

23. The apparatus according to claim 19, wherein The request also includes: storage duration, the storage space corresponding to the monitoring instance is set with a timed clearing duration; and The query unit is further configured to: In the existing monitoring instances in the database table, it is queried whether there is a target monitoring instance whose free capacity meets the estimated indicator amount and whose scheduled clearing duration meets the storage duration.

24. The apparatus according to claim 19, wherein The request also includes: tenant type and storage duration, and the storage space corresponding to the monitoring instance is set with a scheduled clearing duration; and The query unit is further configured to: In response to the tenant type being a key customer, a query is made among the existing monitoring instances in the database table to determine whether there is a target monitoring instance whose free capacity meets the estimated indicator quantity, whose scheduled clearing duration meets the storage duration, and which is not used by other tenants.

25. The apparatus according to claim 20, wherein The request further includes: tenant type and storage duration, and the updating unit is further configured to: The information of the tenant type, the storage duration, and the resources used to create the monitoring instance is stored in corresponding records in the database table.

26. The apparatus according to claim 19, wherein The apparatus further comprises a migration unit configured to: In response to detecting that any one of the write speed, query speed, and storage capacity of the storage space corresponding to the target monitoring instance exceeds the corresponding maximum capacity, the tenant who writes the largest amount of data to the storage space of the target monitoring instance is migrated to other monitoring instances.

27. The apparatus according to claim 19, wherein The writing unit is further configured to: Extracting an authentication token and an identifier of a target monitoring instance from a message header of the monitoring indicator data; Authenticating the monitoring indicator data according to the authentication token; In response to detecting that the authentication is passed and the target monitoring instance is not deleted, the monitoring indicator data is written into the storage space corresponding to the target monitoring instance.

28. The apparatus according to claim 19, wherein The updating unit is further configured to: In response to detecting that the target monitoring instance is initialized, pulling all records of relationships between tenants and monitoring instances from the database table and loading them into memory; The changed data in the database table is updated to the memory at regular intervals.

29. The apparatus according to claim 19, wherein The apparatus further includes a query unit configured to: In response to receiving the query request, a corresponding amount of monitoring indicator data is returned according to the preset current limiting rules.

30. The apparatus according to claim 19, wherein The apparatus further comprises an authentication unit configured to: In response to receiving the query request, extracting the authentication token and the identifier of the target monitoring instance from a message header of the query request; authenticating the query request according to the authentication token; In response to detecting that the authentication is passed and the target monitoring instance is not deleted, monitoring indicator data is queried in the storage space corresponding to the target monitoring instance.

31. The apparatus of claim 19, wherein: The apparatus further includes a changing unit configured to: In response to receiving the storage duration change request of the target monitoring instance, querying among the existing monitoring instances in the database table whether there is a changed monitoring instance that meets the changed storage duration and has free capacity that meets the estimated indicator amount; In response to the existence of a changed monitoring instance, updating the target monitoring instance according to the changed monitoring instance; Migrate the target monitoring instance to the changed monitoring instance.

32. The apparatus according to claim 31, wherein The changing unit is further configured to: In response to the absence of a change monitoring instance, creating a change monitoring instance that meets the changed storage duration and has free capacity that meets the estimated indicator amount, wherein the identifier of the change monitoring instance is the same as the identifier of the target monitoring instance; Migrate the target monitoring instance to the changed monitoring instance.

33. The apparatus of claim 19, wherein: The apparatus further includes a changing unit configured to: In response to detecting that the acquisition rate and / or traffic of the target monitoring instance exceeds a corresponding predetermined threshold, creating a new change monitoring instance and setting the tenant type of the change monitoring instance to a key customer; Migrating the target monitoring instance to the changed monitoring instance; Adjust the resource parameters of the change monitoring instance to adapt to the large customer application scenario.

34. The apparatus of claim 31, 32 or 33, wherein: The changing unit is further configured to: Migrating the alarm rules and aggregation rules of the target monitoring instance to the change monitoring instance; Deleting the write component of the target monitoring instance, stopping writing data to the storage space of the target monitoring instance, and setting the target monitoring instance to read-only; In response to detecting that the storage time of the data in the storage space of the target monitoring instance exceeds the storage time of the target monitoring instance, the query component of the target monitoring instance is switched to read-only storage space of the change monitoring instance, and the data in the storage space of the target monitoring instance is cleared.

35. The apparatus of claim 19, wherein The apparatus further comprises a defragmentation unit configured to: In response to detecting that the number of tenants of the target monitoring instance is less than a predetermined number, marking the tenants of the target monitoring instance as non-migration; In response to detecting that the storage time of the data in the storage space of the target monitoring instance exceeds the storage time of the target monitoring instance, the storage space of the target monitoring instance is cleared, and the non-migration tag is deleted.

36. The apparatus of claim 19, wherein The apparatus further includes a reservation unit configured to: Counting the growth rate of monitoring indicator data in the storage space corresponding to the target monitoring instance; Predicting the number of monitoring instances to be created within a predetermined time based on the growth rate; Create the specified number of monitoring instances in advance for backup.

37. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 18.

38. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-18.

39. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 18.

Citation Information

Patent Citations

  • Systems and methods of database tenant migration

    CN110799960A

  • Cloud multi-tenant resource management method and device

    CN115695427A