Skip to content

Alibaba Cloud Micro Message Queue MQTT

Collect monitoring data from Alibaba Cloud Micro Message Queue MQTT

Configuration

Install Func

It is recommended to activate TrueWatch Integration - Extensions - DataFlux Func (Automata)

If you deploy Func yourself, refer to Self-deployed Func

Install Script

Note: Please prepare the Alibaba Cloud AK that meets the requirements in advance (for simplicity, you can directly grant the global read-only permission ReadOnlyAccess)

  1. Log in to the Func console, click 【Script Market】, enter the TrueWatch script market, and search for: integration_alibabacloud_mqtt

  2. Click 【Install】, then enter the corresponding parameters: Alibaba Cloud AK ID, AK Secret, and account name.

  3. Click 【Deploy Startup Script】, the system will automatically create the Startup script set and configure the corresponding startup scripts.

  4. After enabling, you can see the corresponding automatic trigger configuration in 「Manage / Automatic Trigger Configuration」. Click 【Execute】 to execute it immediately without waiting for the scheduled time. Wait a moment, and you can view the execution task records and corresponding logs.

Verification

  1. In 「Manage / Automatic Trigger Configuration」, confirm whether the corresponding task has the automatic trigger configuration, and you can also check the corresponding task records and logs to see if there are any exceptions.
  2. In TrueWatch, check if the asset information exists in 「Infrastructure / Custom」.
  3. In TrueWatch, check if there is corresponding monitoring data in 「Metrics」.

Metrics

The metrics of Micro Message Queue MQTT are under the aliyun_acs_mqtt measurement. The following are the details of the metrics.

MetricName Metric Type MetricDescribe Dimensions Statistics Unit
AverageQpsPerInstance Instance Average QPS per minute of the instance (Instance) userId,instance Value count/s
ConnectionsPerInstance Instance Number of connections (Instance) userId,instance Value count
MaxQpsPerInstance Instance Maximum QPS per minute of the V3 instance (Instance) userId,instance Value count/s
OutboundInternetTrafficPerInstance Instance Outbound internet traffic per minute (Instance) userId,instance Value B/m
ReceiveTpsPerTopic Topic Average number of messages consumed per second (Instance&Topic) userId,instance Value count/s
SendTpsPerTopic Instance Average number of messages produced per second (Instance&Topic) userId,instance Value count/s
SinkTraffic Instance Rule synchronization traffic per minute (Instance) userId,instance Value B
SubscriptionsPerInstance Instance Number of subscriptions (Instance) userId,instance Value count

Object

The collected data structure of Alibaba Cloud Micro Message Queue MQTT objects can be seen in 「Infrastructure - Custom」.

{
  "measurement": "aliyun_mqtt",
  "tags": {
    "instance_id"             : "i-xxxxx",
    "instance_name"           : "test-xxxxx",
    "instance_type"           : "xx",
    "RegionId"               : "cn-hangzhou"
  },
  "fields": {
    "instance_status"        : "status",
    "Specific"              : "xxxx",
    "create_time"            : "2023-01-01T00:00Z",
    "mqtt_tags"              : "[]"
  }
}