Skip to content

Configuration Manual for the "Alibaba Cloud-RabbitMQ" Collector

Before reading this article, please first read:

Before using this collector, you must install the 'Integration Core Package' and its associated third-party dependency packages

1. Configuration Structure

The configuration structure of this collector is as follows:

Field Type Required Description
regions list Required List of regions to collect data from
regions[#] str Required Region ID. Example: 'cn-hangzhou'
See the full list in the appendix

2. Configuration Examples

Specifying Regions

Collecting data from Hangzhou region

Python
1
2
3
collector_configs = {
    'regions': [ 'cn-hangzhou']
}

Configuring Filters (Optional)

This collector script supports user-defined filters that allow users to filter target resources based on object attributes. The filter function returns True or False. - True: The target resource should be collected. - False: The target resource should not be collected.

Supported object attribute filters:

Attribute Description
Status Instance status
SupportEIP Whether EIP is supported
PrivateEndpoint Instance's VPC access point
StorageSize Disk capacity, unit: GB
InstanceId Instance ID
InstanceType Instance type
PublicEndpoint Instance's public network access point
MaxVhost Upper limit of Vhost count for the instance
AutoRenewInstance Whether the instance auto-renews
InstanceName Instance name
MaxQueue Upper limit of Queue count for the instance
OrderType Order type
Python
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# Example: Enable filters, filtering by the InstanceId and OrderType attributes of the object, with the following configuration format:

def filter_cluster(cluster):
    instance_id = cluster['InstanceId']
    order_type = cluster['OrderType']
    if instance_id in ['xxx'] and order_type in ['PRE_PAID']:
        return True
    return False

###### Do not modify the following contents #####
from guance_integration__runner import Runner
import guance_aliyun_rabbitmq__main as main

def run():
    Runner(main.DataCollector(account, collector_configs, filters=[filter_cluster])).run()

3. Data Reporting Format

After data synchronizes successfully, it can be viewed under the "Infrastructure - Resource Catalog" section of {{( brand_name }}}.

Example of reported data:

JSON
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{
  "measurement": "aliyun_rabbitmq",
  "tags": {
    "AutoRenewInstance": "False",
    "InstanceId": "rabbitmq-xxxx",
    "InstanceName": "rabbitmq-xxxx",
    "InstanceType": "SERVERLESS",
    "MaxEipTps": "-1",
    "MaxQueue": "2000",
    "MaxTps": "50000",
    "MaxVhost": "200",
    "OrderType": "POST_PAID",
    "PrivateEndpoint": "rabbitmq-xxxx",
    "Status": "SERVING",
    "SupportEIP": "False",
    "name": "rabbitmq-xxxx"
  },
  "fields": {
    "ExpireTime": 4858070400000,
    "OrderCreateTime": 1702366576000,
    "MQTags": "[Custom tag list]",
    "message": "{Instance JSON data}"
  }
}

Descriptions of some parameters are as follows:

tags.Status (Instance status) values and meanings:

Value Description
DEPLOYING Instance deploying
EXPIRED Instance expired
SERVING Instance serving
RELEASED Instance released

tags.OrderType (Order type) values and meanings:

Value Description
PRE_PAID Prepaid
POST_PAID Postpaid

Fields in tags and fields may change with subsequent updates

The value of tags.DBClusterId is the instance ID, used as a unique identifier

X. Appendix

Please refer to the official Alibaba Cloud documentation: