Monitoring index data acquisition method and device
By adopting a multi-tenant shared cluster architecture and diversified storage configuration in the cloud computing field, the cost problem of cloud service providers when supporting customer monitoring metrics collection and ensuring data isolation is solved, and efficient resource utilization and data isolation between tenants are achieved.
Patent Information
- Application Number
- CN202411875257.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2044-12-18
AI Technical Summary
In the cloud computing field, cloud service providers need to ensure the isolation of customer data while supporting customer monitoring metrics collection to protect privacy and comply with compliance requirements, which leads to the cost burden of different isolation measures.
Using a multi-tenant shared cluster architecture, instead of creating a separate monitoring instance for each customer's Kubernetes cluster, it queries and updates the attribute information of the target monitoring instance by creating a relationship record between the tenant and the monitoring instance to meet the estimated metrics and writes the monitoring metric data to the storage space of the target monitoring instance.
Reduce resource consumption and alleviate the impact of resource constraints. By providing diversified storage options and efficient automatic migration capabilities, the effective utilization of resources is significantly improved, the basic costs of cloud vendors are reduced, and data isolation between tenants is ensured.
Smart Images

Figure CN119807278A_ABST
Abstract
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 relying on services deployed on cloud providers’ platforms and have real-time monitoring requirements for the running status of services. The operation and health monitoring of services is achieved by systematically collecting key performance indicators, which is essential to ensure the stability and responsiveness of services.
[0003] However, cloud service providers must ensure the isolation of customer data while supporting customer metric collection to protect privacy and comply with compliance requirements. Different isolation measures bring different levels of cost burden. Summary of the invention
[0004] The present invention provides a monitoring indicator data collection method, apparatus, device, storage medium and computer program product.
[0005] According to the 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 spare 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 satisfies 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 a 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 so that the at least one processor can 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 cause 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, including 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. And on this basis, a monitoring system including the relationship of "end-to-end data collection", "storage instance" and "traffic forwarding" is constructed. 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 used to better understand the present solution 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] Figure 3a-3f is a schematic diagram of an application scenario of the monitoring indicator data collection method disclosed in the present invention;
[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 schematic diagram of an embodiment of a monitoring indicator data collection device according to the present disclosure;
[0018] Figure 6 It is a structural diagram of a computer system of an electronic device suitable for implementing an embodiment of the present disclosure. DETAILED DESCRIPTION
[0019] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art 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 in the present invention can be applied.
[0021] like Figure 1 As shown, the system architecture may include a console, a monitoring metadata cluster, a monitoring proxy 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 may include a message processing module and a monitoring service module. The monitoring service module, as the API entry of the monitoring indicator data collection service backend, is responsible for providing the API for the monitoring management module to call. The message processing module can process messages from the monitoring service module, and can also process alarms 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 management module is responsible for managing the correspondence 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 according to the collection tasks submitted by the tenant, manages the status of the K8s cluster proxy server, and interacts with the sidecar container on the proxy server.
[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 according to 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, create a record of the relationship between the tenant and the monitoring instance to be 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 , 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.
[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: The estimated metric volume filled in by the tenant who newly joins the multi-tenancy. The default value is used by default. It is necessary to investigate the average volume of CCE monitoring instances and cloud product tenants. The default value of CCE metric volume and the default value of cloud product instance metric volume 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 query to find an 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 an order is created.
[0047] Step 204: 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.
[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, and the message header 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 embodiments of the present disclosure allows customers to quickly purchase monitoring instances while enjoying the ability to use high-specification monitoring instances seamlessly as traffic grows. 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 to achieve different scales of use for different customers. Through proxy management of traffic, cloud vendors can 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 non-existence, 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 water level table (real-time usage) of the full multi-tenant instance every hour. If it is found that the real-time hourly write points are greater than the hourly capacity of the instance, the instance has availability risks, and 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: the 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 key 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 can be responsible for generating actual resources and updating the status of the monitoring instance according to the changes in the content of the monitoring instance. For example: a tenant who creates a new instance will only need 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 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 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 of different durations, this application supports 15 days, 30 days, 90 days, 180 days, and 365 days by observing common tenant usage scenarios, with d representing the number of days.
[0057] Reuse monitoring instances or create new monitoring instances according to the storage duration requested by the tenant.
[0058] In some optional implementations of this embodiment, the request also includes: tenant type and storage duration, the storage space corresponding to the monitoring instance is set with a scheduled 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 key customer, querying whether there is a target monitoring instance with free capacity that meets the estimated indicator quantity, and a scheduled clearing duration that meets the storage duration, and which is not used by other tenants among the existing monitoring instances in the database table.
[0059] Tenants will be divided into key customer type and ordinary type. Key customer type tenants will correspond to multiple clusters, and ordinary type tenants will be mixed and deployed in multiple clusters. The data of key customer type tenants and ordinary type tenants will not be in the same cluster to avoid the imbalance between traffic causing interference to 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 a cluster is generated or updated, the corresponding cluster configuration is generated in the database, such as storage duration, number of replicas, CPU / memory and other resource information. Resource information needs to be stored in the corresponding records in the database table as attribute information of the monitoring instance. In this way, when a new monitoring instance is created, the reusable monitoring instance can be found in the database table.
[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 will be responsible for managing the maximum upper limit of the monitoring instance [such as 30W QPS] and can change the vertical capacity of all components in the monitoring instance. If the cluster exceeds the maximum limit of 200WQPS, you need to select the largest tenant in it for migration.
[0064] In some optional implementations of the present embodiment, the writing of 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 a message header of the monitoring indicator data; authenticating the monitoring indicator data according to the authentication token; and in response to detecting that the authentication is successful 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 is a flowchart of indicator collection. JWT can be used for authentication. The authentication token is placed in the message header of the monitoring indicator data. Only the account ID level needs to be authenticated. Compliance is also verified to avoid returning deleted monitoring instances but authentication tokens that are still valid, which will cause traffic pressure on the write proxy module.
[0066] The monitoring instance ID information is added to the message header of the monitoring indicator data. After receiving the request from the monitoring proxy server, the writing proxy module is responsible for routing the monitoring instance ID set in the message header to the address of the writing component of different tenants of different monitoring instances. Thus, the monitoring indicator data is written into the storage space corresponding to the target monitoring instance according to the 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 periodically updating the changed data in the database table to the memory.
[0068] By writing the 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 IDs and their namespaces, account IDs, sub-account IDs and other information from the database into memory in batches in advance during initialization. And it will synchronize the update memory from the database every N minutes (N can be adjusted dynamically according to actual conditions) to ensure offline data updates. 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 particularity of large customers' query demands 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 per 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 the 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 a target monitoring instance from a message header of the query request; authenticating the query request based on the authentication token; in response to detecting that the authentication is successful and the target monitoring instance has not been deleted, querying monitoring indicator data in a 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 according to 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 in the metadata database to perform good soft deletion records.
[0087] When a new customer needs to add a new monitoring instance, you only need to allocate it 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 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 be a good experience for customers.
[0090] This application takes this scenario into consideration and reserves N monitoring instances that can accommodate sub-account levels according to different storage duration specifications in advance.
[0091] N can be adjusted dynamically based on the growth rate in the past week or month. Then the number of reserved instances is N*5 sub-account-level instances to ensure 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 whose free capacity meets the estimated indicator amount.
[0094] In this embodiment, due to the limitation of the architecture mode of the monitoring instance itself, although the VM supports a multi-tenant architecture mode, if a public cloud product is built directly based on the VM, it obviously cannot meet the demands of different customers.
[0095] For example, the same monitoring instance shares the replication factor and retention period. Some cloud customers want to store data for 15 days, while others want to store data for 30 days. Directly using the Multitenancy mode of the monitoring instance cannot meet these requirements.
[0096] For example, in the early stages of a customer's business development, a 15-day storage monitoring instance can meet his needs, but as the business develops, a 30-day or even longer storage space is needed. How can this be supported?
[0097] This application has made a secondary modification for such a scenario. 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, then create a set of underlying monitoring instances for the current tenant, and reuse the account ID and sub-account ID of the original VM 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 is 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 also 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 the traffic of a large customer increases rapidly and exceeds the normal vmCluster specification limit, we will perform the following two operations:
[0106] 1. Shift in paradigm
[0107] This application targets large customer traffic and will degenerate from a 1:N form to a 1:1 tenant usage mode. The specific approach includes the following steps:
[0108] Step 1: Perform a general configuration operation to create a new monitoring instance; add a label, and set the tenant ratio supported by the monitoring instance to 1:1.
[0109] Step 2: Execute step 403 to migrate;
[0110] Step 3: Adjust the parameters required for the monitoring instance, such as CPU / memory resources, write component, 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 will refresh the capacity watermark (real-time usage) of the full multi-tenant instance every hour. If it is found that 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 the tenant or perform automatic migration.
[0113] This application has realized the ability of automatic migration, which is similar to the method of reconfiguration. However, the following two differences should be noted:
[0114] Difference 1: After exceeding the limit, migration is performed only in monitoring instances of the same specifications and in accordance with 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 specification 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 collection 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 create a record of the relationship between the tenant and the monitoring instance to be created in the database table in response to receiving a request to create a monitoring instance, wherein the request includes an estimated indicator quantity; the query unit 502 is configured to query whether there is a target monitoring instance with free capacity that meets the estimated indicator quantity in the existing monitoring instances in the database table; the update unit 503 is 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 existence; the write unit 504 is configured to write the monitoring indicator data to the storage space corresponding to the target monitoring instance in response to receiving the monitoring indicator data of the tenant.
[0118] In this embodiment, the specific processing of the creation unit 501, the query unit 502, the update unit 503 and the write unit 504 of the monitoring indicator data collection device 500 can be referred to. Figure 2 Corresponding to step 201, step 202, step 203, and step 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 key 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, 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 the present 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 an authentication token and an identifier of a target monitoring instance from a message header of the monitoring indicator data; authenticate the monitoring indicator data according to the authentication token; and in response to detecting that the authentication is successful and the target monitoring instance has not been deleted, write the monitoring indicator data into a 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 that the target monitoring instance is initialized, pull all the records of the relationship between the tenants and the monitoring instance from the database table and load them into the memory; and periodically 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 the present 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 a target monitoring instance from a message header of the query request; authenticate the query request based on the authentication token; and in response to detecting that the authentication is successful and the target monitoring instance has not been deleted, query monitoring indicator data in a storage space corresponding to the target monitoring instance.
[0130] In some optional implementations of the present 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 the present embodiment, the device 500 also includes a defragmentation unit (not shown in the 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 the 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 so that the at least one processor can 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, and when the computer program is executed by a processor, the method described in process 200 is implemented.
[0141] Figure 6 A schematic block diagram of an example electronic device 600 that can be used to implement an embodiment 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 processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required 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. In the RAM 603, various programs and data required for the operation of the device 600 can also be stored. 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] A number of components in the device 600 are connected to the I / O interface 605, including: an input unit 606, such as a keyboard, a mouse, etc.; an output unit 607, such as various types of displays, speakers, etc.; a storage unit 608, such as a disk, an optical disk, etc.; and a communication unit 609, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0144] The computing unit 601 may be a variety of general and / or special 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 running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, 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 may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 608. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 600 via ROM 602 and / or communication unit 609. When the computer program is loaded into RAM 603 and executed by the computing unit 601, one or more steps of the monitoring indicator data collection method described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to perform the monitoring indicator data collection method in any other appropriate manner (e.g., by means of firmware).
[0145] Various implementations of the systems and techniques described above 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), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including 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 may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0147] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may 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 may 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 may 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 may also be used to provide interaction with the tenant; for example, the feedback provided to the tenant may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the tenant may be received in any form (including acoustic input, voice input, or tactile input).
[0149] The systems and techniques described herein may 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 with a graphical tenant interface or a web browser through which a tenant can interact with implementations 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 may be interconnected by any form or medium of digital data communication (e.g., a communications network). Examples of communications 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 the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0151] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0152] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present 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 a 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 being greater than, outputting an alarm message and performing tenant migration.
4. The method according to claim 1, wherein: The request also includes: the tenant type; and The querying whether there is a target monitoring instance whose free capacity satisfies the estimated indicator quantity in the existing monitoring instances in the database table includes: In response to the tenant type being a key customer, it is queried among the existing monitoring instances in the database table 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 scheduled clearing duration; and The querying whether there is a target monitoring instance whose free capacity satisfies the estimated indicator quantity in the existing monitoring instances in the database table includes: In the existing monitoring instances in the database table, it is queried whether there is a target monitoring instance whose free capacity satisfies the estimated indicator quantity and whose scheduled emptying duration satisfies 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 whether there is a target monitoring instance whose free capacity satisfies the estimated indicator quantity in the existing monitoring instances in the database table includes: In response to the tenant type being a key customer, a query is made in the existing monitoring instances in the database table as to whether there is a target monitoring instance whose free capacity satisfies the estimated indicator quantity, whose scheduled clearing duration satisfies 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 a 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 the relationship between tenants and monitoring instances from the database table and loading them into the 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 the 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, the 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 whose free capacity 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 satisfies the storage duration after the change and whose free capacity satisfies 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 flow 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 changed monitoring instance; The resource parameters of the change monitoring instance are adjusted to adapt to the application scenario of large customers.
16. The method according to claim 13, 14 or 15, wherein: The step of 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 changed monitoring instance; Deleting the write component of the target monitoring instance, and 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 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 the 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 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, 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 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 according to the increase rate; Create the specified number of monitoring instances in advance for backup.
19. A monitoring index 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 whether there is a target monitoring instance whose free capacity satisfies the estimated indicator quantity among the existing monitoring instances in the database table; 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 device 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 being greater than, outputting an alarm message and performing tenant migration.
22. The device according to claim 19, wherein The request also includes: the tenant type; and The query unit is further configured to: In response to the tenant type being a key customer, it is queried among the existing monitoring instances in the database table whether there is a target monitoring instance that meets the estimated indicator quantity and is not used by other tenants.
23. The device according to claim 19, wherein: The request also includes: storage duration, the storage space corresponding to the monitoring instance is set with a scheduled 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 satisfies the estimated indicator quantity and whose scheduled emptying duration satisfies the storage duration.
24. The device 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 in the existing monitoring instances in the database table as to whether there is a target monitoring instance whose free capacity satisfies the estimated indicator quantity, whose scheduled clearing duration satisfies the storage duration, and which is not used by other tenants.
25. The device 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 device 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 device 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 a storage space corresponding to the target monitoring instance.
28. The device 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 the relationship between tenants and monitoring instances from the database table and loading them into the memory; The changed data in the database table is updated to the memory at regular intervals.
29. The device according to claim 19, wherein The device also 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 device according to claim 19, wherein The device also includes 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 the 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, the monitoring indicator data is queried in the storage space corresponding to the target monitoring instance.
31. The device according to claim 19, wherein: The device also 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 whose free capacity 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 device 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 satisfies the storage duration after the change and whose free capacity satisfies 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 device also includes a changing unit configured to: In response to detecting that the acquisition rate and / or flow 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 changed monitoring instance; The resource parameters of the change monitoring instance are adjusted to adapt to the application scenario of large customers.
34. The device according to 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 changed monitoring instance; Deleting the write component of the target monitoring instance, and 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 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 the 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 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, 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 comprises a reservation unit configured to: 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 according to the increase 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
Method and system for monitoring, collecting and alarming tenant-side container in container cloud scene
CN115801539A
Cloud monitoring method and cloud management platform
CN116166181A
Database server system monitoring
US20180336227A1