Skip to content

Collector "Alibaba Cloud-RabbitMQ" Configuration Manual

Before reading this document, please read:

Tip

Before using this collector, you must install the "Integration Core Package" and its accompanying third-party dependencies.

1. Configuration Structure

The configuration structure of this collector is as follows:

Field Type Required Description
regions list Required List of regions to be collected
regions[#] str Required Region ID. For example: 'cn-hangzhou'
See appendix for the complete list

2. Configuration Examples

Specify Region

Collect data from the Hangzhou region

collector_configs = {
    'regions': [ 'cn-hangzhou']
}

Configure Filter (Optional)

This collector script supports custom filters, allowing 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 attributes for filtering:

Attribute Description
Status Instance status
SupportEIP Whether EIP is supported
PrivateEndpoint VPC endpoint of the instance
StorageSize Disk capacity, unit: GB
InstanceId Instance ID
InstanceType Instance type
PublicEndpoint Public endpoint of the instance
MaxVhost Maximum number of Vhosts for the instance
AutoRenewInstance Whether the instance is automatically renewed
InstanceName Instance name
MaxQueue Maximum number of Queues for the instance
OrderType Order type
# Example: Enable the filter to filter based on the InstanceId and OrderType attributes of the object. The configuration format is as follows:

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 integration_core__runner import Runner
import integration_alibabacloud_rabbitmq__main as main

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

3. Data Reporting Format

After data is successfully synchronized, you can view the data in the "Infrastructure-Resource Catalog" of TrueWatch.

Example of reported data:

{
  "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}"
  }
}

Partial parameter descriptions:

tags.Status (Instance Status) values:

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

tags.OrderType (Order Type) values:

Value Description
PRE_PAID Prepaid
POST_PAID Postpaid
Note

The fields in tags and fields may change with subsequent updates.

Tip

The value of tags.DBClusterId is the instance ID, which serves as the unique identifier.

X. Appendix

Please refer to the official Alibaba Cloud documentation: