Enabling Event Reporting
CCI 2.0 uses LTS to collect events and allows you to configure alarms to detect workload exceptions in a timely manner.
When you are using CCI 2.0, events will be generated for various resources, such as Deployments, Services, HPA policies, networks, and pods.
Constraints
- CCI 2.0 supports event reporting only in the AP-Singapore and ME-Riyadh regions.
Event Format
The events comply with the CloudEvents format standard. The event content is stored using JSON. The following provides an example.
{ "data": { "metadata": { "name": "service-test-event", "namespace": "test", "uid": "1******3-2**1-4**a-9**8-2******0", "resourceVersion": "61788694", "creationTimestamp": "2024-11-30T07: 55: 40Z", "annotations": { "tenant.cci.io/tenant-id": "a81*******24" } }, "involvedObject": { "kind": "Service", "namespace": "test", "name": "service-test", "uid": "f******3-d**b-4**e-a**c-9f******e3", "apiVersion": "cci/v2", "resourceVersion": "7669479" }, "reason": "EnsuringLoadBalancer", "message": "Ensuring load balancer", "source": { "component": "service-controller" }, "firstTimestamp": "2024-11-30T07: 52: 45Z", "lastTimestamp": "2024-12-03T02: 30: 02Z", "count": 4, "type": "Normal", "eventTime": null, "reportingComponent": "", "reportingInstance": "" }, "deprecatedeventreason": "EnsuringLoadBalancer", "eventclass": "Normal", "datacontenttype": "application/json", "time": "2024-04-05T17:31:00Z", "id": "b*****9-5737-4**1-8**a-3*******bc", "specversion": "1.0", "source": "cci:a8*********48b24:service:test:service-test:f******3-d**b-4**e-a**c-4******3", "type": "cloudservice.cci.service.publish.processing" }
Field |
Type |
Description |
---|---|---|
type |
String |
Current operation status of the resource object, in the format of cloudservice.cci.${Resource type}.${Resource operation}.${Operation result}.${Additional information}. Additional information is only included in complex scenarios. |
source |
String |
Resource object context, in the format of cci:${projectid}:${Resource type}:${Namespace}:${Resource name}:${Unique resource ID}. |
specversion |
String |
CloudEvents version. The current version is 1.0. |
id |
String |
Unique ID of an event object, which is randomly generated. |
time |
Timestamp |
Time when the event was generated. |
eventclass |
String |
Event class, which can be Normal or Warning. |
deprecatedeventreason |
String |
The reason that triggered the event. The Kubernetes reason field is reused and will be gradually discarded. |
datacontenttype |
String |
Storage type of the data field, in the format of application/json. |
data |
k8s event object |
Event details, which can be parsed based on the storage type defined by the datacontenttype field. |
Enabling Event Reporting
You can enable event reporting on demand. This option is disabled by default, and you need to call the CCI 2.0 APIs to enable it.

- Before using the API, you need to create an agency for CCI for the first time.
- Log groups and log streams are free of charge. Each account is granted with a certain amount of storage each month. If the storage quota is exceeded, the excess will be billed. For details, see Billing Details. You can control log collection by enabling or disabling Continue to Collect Logs When the Free Quota Is Exceeded in the Configuration Center of LTS. For details, see Setting LTS Log Collection Quota and Usage Alarms. If this option is enabled, TLS continues to collect logs when the log size exceeds the free quota. You will be billed for extra logs on a pay-per-use basis. If you disable this option, log collection will be suspended when the log size exceeds the free quota. As a result, events reported by CCI will be invisible.
API URIs |
Description |
---|---|
GET /v1/observabilityconfiguration |
Queries the current observability configuration. |
PUT /v1/observabilityconfiguration |
Enables/Disables event reporting. |
If event reporting is enabled, CCI 2.0 creates a log group and a log stream on LTS automatically. The log group is named in the format of cci-event-${projectid}, and the log stream in the format of event-${projectid}. Logs are retained for one day by default. Do not delete them.
To change the retention period, go to the LTS console, select the log group from the log group list, and click Modify in the Operation column.

You can click the log group name in the log group list to view resource events generated by CCI 2.0 in the log stream.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot