Alibaba Cloud EventBridge Best Practices¶
This article describes how to ingest Alibaba Cloud EventBridge events into the Guance platform. By leveraging the powerful unified aggregation capabilities of Guance, you can easily obtain Alibaba Cloud events and track the latest data information in real time.
Background¶
EventBridge is a serverless event bus service provided by Alibaba Cloud. It supports centralized, standardized access for Alibaba Cloud services, custom applications, and SaaS applications, and routes events between these applications using the standardized CloudEvents 1.0 protocol. This helps you build loosely coupled, distributed event-driven architectures. However, in multi-cloud environments or even traditional IDC + cloud service hybrid architectures, customers often want to aggregate cloud events, metrics, logs, and traces in one place for unified orchestration. The Guance platform provides exactly this capability.
Prerequisites¶
You have completed the following:
- Installed DataKit. For details, see Install DataKit on a Host.
- Enabled Alibaba Cloud EventBridge (currently free during public beta).
- Allowed port 9529 in the server security group.
Use Cases¶
Push event information to Guance via the built-in HTTP service of EventBridge.
Step 1: Modify DataKit Listening Port¶
- Modify the DataKit main configuration file on the server:
/usr/local/datakit/conf.d/datakit.conf
- Restart DataKit:
Step 2: Create an EventBridge Rule¶
-
Log in to the Alibaba Cloud EventBridge console.
-
Select Event Bus > default > Event Rules.
- Create a rule, configure basic information, enter a name and description, and then click Next.
- Configure the event pattern. Select Alibaba Cloud Official Event Source, then choose the desired Event Source and Event Type.
- After selection, you can test by debugging the event pattern, then click Next.
- Configure the event target. Select Service Type as
HTTP, URL as theDataKit log API address, and Body asTemplate.
-
When Body is
Template, you need to define the variables in the template and the custom template. Alibaba Cloud template documentation -
Variables: Extract parameters from the raw cloud event data using JSONPath, with
"$." - Template: Reference variables using
${}. The format must comply with the DataKit API specification
- Select Network Type as
Public Network, then click Confirm.
-
Log in to Guance, click the Logs module, and view the generated events.
-
measurement: Data source message: Log contentfields: Extended fields
Data Verification¶
- Event Tracing > Event Details: View the raw cloud event data.
- Event Tracing > Event Trajectory: Check whether the event was delivered successfully.
- On the server, check
/var/log/datakit/gin.logto see data reception status.












