Updated on 2025-08-12 GMT+08:00

Creating a Prometheus Instance

You can use Prometheus to monitor metrics of CCI 2.0.

Constraints

Only one Prometheus instance for cloud services can be created in an enterprise project.

CCI 2.0 supports monitoring only in the TR-Istanbul, AF-Johannesburg, AP-Singapore, and ME-Riyadh regions.

Step 1: Create a Prometheus Instance

  1. Log in to the AOM 2.0 console.
  2. In the navigation pane on the left, choose Metric Browsing > Prometheus Monitoring. On the displayed page, click Add Prometheus Instance.
  3. Set the instance name, enterprise project, and instance type.

    If the CCE Cloud Bursting Engine for CCI add-on is being used or required, the CCE cluster also needs this Prometheus instance, with the instance type set to Prometheus for CCE.

  4. Click OK.

Step 2: Obtain the Access Code

  1. Click the name of the created Prometheus instance.
  2. In the navigation pane, choose Settings. In the Credential area, click Add Access Code.
  3. Click OK.

  4. Obtain the values of <project_id>, <aom_id>, and <aom_secret>.

  5. Combine the obtained values into a character string in the format of <project_id>_<aom_id>: <aom_secret>.

    There must be a space after the colon (:).

  6. Encode the character string using Base64.

    You can run the following shell commands for encoding:

    project_id=<project_id>
    aom_id=<aom_id>
    aom_secret=<aom_secret> 
    echo -n "${project_id}_${aom_id}: ${aom_secret}" |base64 -w 0
  7. Fill the Base64-encoded character string in the following template to replace {AOMAuthBase64}, and then copy the code.
    kind: Secret 
    apiVersion: cci/v2 
    metadata:  
      name: cci-aom-app-secret 
    data:
      aom_auth: {AOMAuthBase64}
    type: cci/secure-opaque
  8. Log in to the CCI 2.0 console.
  9. In the navigation pane, choose Configuration Center.
  10. Click the Secrets tab.
  11. Click Create from YAML and use the copied code to replace the code on the CCI 2.0 console to create an AOM app secret.

Step 3: Create a Pod

  1. Log in to the CCI 2.0 console.
  2. In the navigation pane, choose Workloads. On the displayed page, click the Pods tab.
  3. Click Create Pod and enter the required information. For details, see Creating a Pod.

  4. Click Create Now.

Step 4: View Monitoring Data

  1. Log in to the AOM 2.0 console.
  2. In the navigation pane, choose Metric Analysis > Metric Browsing.
  3. On the Metric Sources tab, select the Prometheus instance created in Step 1: Create a Prometheus Instance.

  4. On the Prometheus statement tab, enter a Prometheus statement in the search box and click .

    You can use Prometheus statements to query and monitor multiple metrics of CCI 2.0. Before using Prometheus statements, ensure that the pod has been connected to the Prometheus instance.