Application method

BCM

  • Function Release Records
  • Product Announcement
    • Site Monitor Billing Announcement
  • Product Description
    • Product Introduction
    • Core concepts
    • Product advantages
    • Product features
  • Product pricing
    • Product pricing
    • Site Monitor Pricing
  • Quick Start
  • Operation guide
    • Enter Cloud Monitor
    • Dashboard
      • Overview
      • Management Dashboard Charts
      • Management Dashboard
    • Alarm Service
      • Overview
      • Alarm strategy
      • Alarm history
      • Alarm Template
      • Alarm Notification Template
      • Alarm callback
    • Cloud product monitor
      • Instance monitor
      • Instance Group
      • View Metrics
    • Site Monitor
      • Timed Detection (Formerly Site Monitor)
        • Overview
        • Manage Timed Probe Tasks
        • Purchase Guide
        • View timed probe tasks
      • IP advanced fault diagnosis
        • Manage IP Advanced Fault Diagnosis Tasks
        • View IP Advanced Fault Diagnosis Tasks
      • Instant probe
        • Overview
        • Manage instant probe tasks
    • Event Monitor
    • Event Bus
      • Event Delivery History
      • Overview
      • Event summary
      • Event Set
      • Event Rules
        • Event Rules
        • Event content conversion
        • Event pattern
  • API Reference
    • Overview
    • Service domain
    • Error response
    • Query Monitoring Data for Partial Dimensions
    • Dashboard API
    • Common Request and Response Headers
    • Alarm Management API
    • Alarm Management Interface V2
    • Alarm history
    • Push Data API
    • Event Bus Push
    • Application Monitor
    • Dimension Value TopN and Monitoring Data Query Interface
    • Batch Query Monitoring Data Interface V2
    • Dimension Value TopN Query Interface
    • Instance Group Interface
    • Site Monitor
    • Query Latest Metric Data for Partial Dimensions
    • General Description
    • Query Data API
    • Event Monitor
    • Instant Probe
    • Event Alarm History
    • Notification Template
  • Java-SDK
    • Overview
    • Initialization
    • Install the SDK Package
    • BcmClient
    • Query Monitoring Data for Partial Dimensions
    • Dimension Value TopN and Monitoring Data Query Interface
    • Batch Query Monitoring Data Interface V2
    • Dimension Value TopN Query Interface
    • Query Latest Metric Data for Partial Dimensions
    • Query Data API
    • Alarm Strategy-related APIs
    • Batch Query Data Interface
    • Alarm History-related APIs
  • Python-SDK
    • Overview
    • Initialization
    • Install SDK
    • BcmClient
    • Query Monitoring Data for Partial Dimensions
    • Batch Query Monitoring Data Interface V2
    • Dimension Value TopN Query Interface
    • Query Latest Metric Data for Partial Dimensions
    • Query Data API
    • Alarm Strategy List API
    • Batch Data Query Interface
  • Go-SDK
    • Overview
    • Initialization
    • Install the SDK Package
    • BcmClient
    • Query Monitoring Data for Partial Dimensions
    • Dimension Value TopN and Monitoring Data Query Interface
    • Batch Query Monitoring Data Interface V2
    • Dimension Value TopN Query Interface
    • Query Latest Metric Data for Partial Dimensions
    • Query Data API
    • Alarm Strategy-related APIs
    • Alarm History-related APIs
    • Batch Data Query Interface
  • BCM-Agent
    • Functions
    • Monitoring Trend Chart
    • BCM-Agent-Frequently Asked Questions
    • Appendix
  • FAQs
    • Common Questions Overview
    • Fault-related questions
    • Configuration-related questions
    • Performance-related questions
  • Cloud Product Monitor List
    • Cloud Product Metric List (Legacy Version Hidden)
    • Cloud Product Monitor Object Type List
    • Cloud Product Event List
    • Cloud Product Metric List
      • Database
        • Cloud Database TableStorage
        • Cloud Database DocDB for MongoDB
        • Data transmission service (DTS)
        • Cloud native database GaiaDB
        • Vector Database (VectorDB)
        • Dedicated Database Cluster (DDC)
        • Cloud Database Redis
        • Cloud database RDS
        • Cloud Database HBase
      • Enterprise Application
        • Message Service for RabbitMQ
      • Network
        • Service Network Interface Card (SNIC)
        • Peering Connections
        • IPv6 gateway
        • NAT Gateway
        • Load Balancer Dedicated Cluster LBDC
        • Baidu Load Balance (BLB)
        • Network probe NP
        • Dedicated channel
        • Elastic IP EIP
        • Elastic Network Interface Card (ENIC)
        • Cloud Smart Network (CSN)
        • Dedicated gateway
        • Virtual Private Network (VPN) Gateway
        • Layer 2 Gateway LTGW
        • Physical dedicated line
      • Intelligent Big Data
        • MapReduce BMR
        • Message service for Kafka-dedicated
        • Message Service for RocketMQ
        • Baidu Stream Computing (BSC)
        • Baidu Elasticsearch
        • Log Service BLS
        • Data warehouse DORIS
      • Cloud native
        • Cloud Function Computing
        • Baidu container instance (BCI)
      • Compute
        • Baidu Cloud Compute (BCC)
        • Elastic Baremetal Compute BBC
      • Storage and CDN
        • Parallel Filesystem Service (PFS)
        • Cloud File System (CFS)
        • Content delivery network (CDN)
        • Baidu object storage (BOS)
        • Cloud Disk Server (CDS)
        • Baidu edge computing (BEC)
      • Website service
        • Baidu Cloud Virtual Host (BCH)
      • Large Model Platform
        • Qianfan Large Model Platform ModelBuilder
  • Typical Practices
    • Scenarios for Batch Creation of Alarm Strategies
    • Usage Scenarios for Different Notification Channels
  • Service Level Agreement (SLA)
    • Site Monitor Service Level Agreement SLA
  • BCM-Tool
    • Uninstallation Method
    • Installation method
    • BCM-Tool-Frequently Asked Questions
    • Functions
    • Multi-Region Service
    • Application method
All documents
menu
No results found, please re-enter

BCM

  • Function Release Records
  • Product Announcement
    • Site Monitor Billing Announcement
  • Product Description
    • Product Introduction
    • Core concepts
    • Product advantages
    • Product features
  • Product pricing
    • Product pricing
    • Site Monitor Pricing
  • Quick Start
  • Operation guide
    • Enter Cloud Monitor
    • Dashboard
      • Overview
      • Management Dashboard Charts
      • Management Dashboard
    • Alarm Service
      • Overview
      • Alarm strategy
      • Alarm history
      • Alarm Template
      • Alarm Notification Template
      • Alarm callback
    • Cloud product monitor
      • Instance monitor
      • Instance Group
      • View Metrics
    • Site Monitor
      • Timed Detection (Formerly Site Monitor)
        • Overview
        • Manage Timed Probe Tasks
        • Purchase Guide
        • View timed probe tasks
      • IP advanced fault diagnosis
        • Manage IP Advanced Fault Diagnosis Tasks
        • View IP Advanced Fault Diagnosis Tasks
      • Instant probe
        • Overview
        • Manage instant probe tasks
    • Event Monitor
    • Event Bus
      • Event Delivery History
      • Overview
      • Event summary
      • Event Set
      • Event Rules
        • Event Rules
        • Event content conversion
        • Event pattern
  • API Reference
    • Overview
    • Service domain
    • Error response
    • Query Monitoring Data for Partial Dimensions
    • Dashboard API
    • Common Request and Response Headers
    • Alarm Management API
    • Alarm Management Interface V2
    • Alarm history
    • Push Data API
    • Event Bus Push
    • Application Monitor
    • Dimension Value TopN and Monitoring Data Query Interface
    • Batch Query Monitoring Data Interface V2
    • Dimension Value TopN Query Interface
    • Instance Group Interface
    • Site Monitor
    • Query Latest Metric Data for Partial Dimensions
    • General Description
    • Query Data API
    • Event Monitor
    • Instant Probe
    • Event Alarm History
    • Notification Template
  • Java-SDK
    • Overview
    • Initialization
    • Install the SDK Package
    • BcmClient
    • Query Monitoring Data for Partial Dimensions
    • Dimension Value TopN and Monitoring Data Query Interface
    • Batch Query Monitoring Data Interface V2
    • Dimension Value TopN Query Interface
    • Query Latest Metric Data for Partial Dimensions
    • Query Data API
    • Alarm Strategy-related APIs
    • Batch Query Data Interface
    • Alarm History-related APIs
  • Python-SDK
    • Overview
    • Initialization
    • Install SDK
    • BcmClient
    • Query Monitoring Data for Partial Dimensions
    • Batch Query Monitoring Data Interface V2
    • Dimension Value TopN Query Interface
    • Query Latest Metric Data for Partial Dimensions
    • Query Data API
    • Alarm Strategy List API
    • Batch Data Query Interface
  • Go-SDK
    • Overview
    • Initialization
    • Install the SDK Package
    • BcmClient
    • Query Monitoring Data for Partial Dimensions
    • Dimension Value TopN and Monitoring Data Query Interface
    • Batch Query Monitoring Data Interface V2
    • Dimension Value TopN Query Interface
    • Query Latest Metric Data for Partial Dimensions
    • Query Data API
    • Alarm Strategy-related APIs
    • Alarm History-related APIs
    • Batch Data Query Interface
  • BCM-Agent
    • Functions
    • Monitoring Trend Chart
    • BCM-Agent-Frequently Asked Questions
    • Appendix
  • FAQs
    • Common Questions Overview
    • Fault-related questions
    • Configuration-related questions
    • Performance-related questions
  • Cloud Product Monitor List
    • Cloud Product Metric List (Legacy Version Hidden)
    • Cloud Product Monitor Object Type List
    • Cloud Product Event List
    • Cloud Product Metric List
      • Database
        • Cloud Database TableStorage
        • Cloud Database DocDB for MongoDB
        • Data transmission service (DTS)
        • Cloud native database GaiaDB
        • Vector Database (VectorDB)
        • Dedicated Database Cluster (DDC)
        • Cloud Database Redis
        • Cloud database RDS
        • Cloud Database HBase
      • Enterprise Application
        • Message Service for RabbitMQ
      • Network
        • Service Network Interface Card (SNIC)
        • Peering Connections
        • IPv6 gateway
        • NAT Gateway
        • Load Balancer Dedicated Cluster LBDC
        • Baidu Load Balance (BLB)
        • Network probe NP
        • Dedicated channel
        • Elastic IP EIP
        • Elastic Network Interface Card (ENIC)
        • Cloud Smart Network (CSN)
        • Dedicated gateway
        • Virtual Private Network (VPN) Gateway
        • Layer 2 Gateway LTGW
        • Physical dedicated line
      • Intelligent Big Data
        • MapReduce BMR
        • Message service for Kafka-dedicated
        • Message Service for RocketMQ
        • Baidu Stream Computing (BSC)
        • Baidu Elasticsearch
        • Log Service BLS
        • Data warehouse DORIS
      • Cloud native
        • Cloud Function Computing
        • Baidu container instance (BCI)
      • Compute
        • Baidu Cloud Compute (BCC)
        • Elastic Baremetal Compute BBC
      • Storage and CDN
        • Parallel Filesystem Service (PFS)
        • Cloud File System (CFS)
        • Content delivery network (CDN)
        • Baidu object storage (BOS)
        • Cloud Disk Server (CDS)
        • Baidu edge computing (BEC)
      • Website service
        • Baidu Cloud Virtual Host (BCH)
      • Large Model Platform
        • Qianfan Large Model Platform ModelBuilder
  • Typical Practices
    • Scenarios for Batch Creation of Alarm Strategies
    • Usage Scenarios for Different Notification Channels
  • Service Level Agreement (SLA)
    • Site Monitor Service Level Agreement SLA
  • BCM-Tool
    • Uninstallation Method
    • Installation method
    • BCM-Tool-Frequently Asked Questions
    • Functions
    • Multi-Region Service
    • Application method
  • Document center
  • arrow
  • BCM
  • arrow
  • BCM-Tool
  • arrow
  • Application method
Table of contents on this page
  • Certificate Configuration
  • Setting of environment variables
  • Region Selection
  • BCM-Tool Command Introduction
  • Push Monitor Data
  • Query Monitor Data
  • Query Monitor Metadata

Application method

Updated at:2025-11-03

Certificate Configuration

Before using BCM-Tool to push Monitor data, users must first create a certificate file (the BCM-Tool installation directory includes a certificate template, through which users can modify the certificate). There are no restrictions on the certificate file storage directory. Below is an example of the certificate file format:

Plain Text
1[USER]
2BCM_USER_ID = xxxxxxxxcfe04e2494c23974xxxxxxxx
3[AKSK]
4BCM_ACCESS_KEY = xxxxxxxx846d4884b9dfaed6xxxxxxxx
5BCM_SECRET_KEY = xxxxxxxxfd764b2996412a66xxxxxxxx

Users simply need to input their userId, accessKey, and secretKey in the designated fields within the certificate file, e.g., "xxxxxxxxcfe04e2494c23974xxxxxxxx" (placeholder example, not real information), and then specify the certificate when utilizing the tool.

Setting of environment variables

The BCM-Tool provides two parameters: -c/--credential-file to specify the credential file path and -u/--url to specify the BCM service URL. For example:

Plain Text
1bcm-tool metric-data-put --credential-file ./bcm-credential.template --url http://bcm.bj.baidubce.com  

Since these two parameter values rarely change during usage, BCM-Tool allows users to retrieve certificate paths and BCM Service URLs from environment variables, removing the need for manual specification for every execution.

Configure environment variables as follows:

Plain Text
1export BCM_CREDENTIAL_FILE=<credential_path>
2 export BCM_URL=http://bcm.bj.baidubce.com or export BCM_URL=http://bcm.gz.baidubce.com

Where, <credential_path> is the absolute path of the certificate, bcm.bj.baidubce.com is the address of the BCM service (Beijing Region), and bcm.gz.baidubce.com is the address of the BCM service (Guangzhou Region). Region selection will be introduced later.

Description:

When users set both environment variables and specify the --credential-file and --url parameters, the content specified by the parameters takes precedence.

Region Selection

BCM-Tool supports pushing Custom Monitor data to different regions. Users can specify a specific region by configuring the URL. For details, refer to [Region List](BCM/API Reference/Service domain.md).

BCM-Tool Command Introduction

BCM-Tool provides a series of Monitor and Alarm functions through sub-commands. Users can view the supported sub-commands of BCM-Tool in the following way:

Plain Text
1bcm-tool help

BCM-Tool currently supports three sub-commands: metric-data-put, metric-data-list, and metric-meta-list, which are used for pushing Monitor data, querying Monitor data, and querying Monitor metadata, respectively.

Users can also view detailed parameter descriptions and examples for each sub-command. The command is as follows (taking pushing Monitor data as an example):

bcm-tool help metric-data-putor bcm-tool metric-data-put --help.

Push Monitor Data

Push Data Sub-command Metric-data-put

  • Push raw data.

bcm-tool metric-data-put --scope <SCOPE> --metric-name <METRICNAME> --value <VALUE> --timestamp <TIMESTAMP>

Plain Text
1-   \\--scope (-S) defines the scope of the service to be pushed.  
2-   \\--metric-name (-m) defines the monitoring metric to be pushed.
3-   \\--value (-v) indicates the Monitor value to be pushed.  
4-   \\--timestamp (-t) specifies the Timestamp to associate with the Monitor data.  
  • Push aggregated Monitor data.

bcm-tool metric-data-put --scope <SCOPE> --metric-name <METRICNAME> --statistic-value average=<VALUE>,sum=<VALUE>,maximum=<VALUE>,minimum=<VALUE> --timestamp <TIMESTAMP>

Plain Text
1-   \\--statistic (-s) represents the aggregated Monitor value.  
2
3**Note:** Only one of the two parameters, either --value or --statistic, can be used in a single data push.  
  • Provide Dimension details for the Monitor item.

bcm-tool metric-data-put --scope <SCOPE> --metric-name <METRICNAME> --value <VALUE> --timestamp <TIMESTAMP> --dimensions <NAME>=<VALUE>,<NAME>=<VALUE>

Plain Text
1-   \\--dimensions (-d) designates the Dimension details of the Monitor item.  
  • Submit Monitor data through files (users need to generate Monitor data files in the correct JSON format).

bcm-tool metric-data-put --scope <SCOPE> --data-file ./data.template

Plain Text
1-   \\--data-file (-f) specifies the data file.  

Users can also utilize the BCM-Tool to generate Monitor data file templates. With this, only value modifications are needed, making the process significantly easier.

  • Generate a Monitor data file template.

bcm-tool metric-data-put -T

Query Monitor Data

Query Monitor Data Sub-command: metric-data-list

For example: bcm-tool metric-data-list --scope <SCOPE> --metric-name <METRICNAME> --statistics sum,average --start-time <STARTTIME> --end-time <ENDTIME> --period <PERIOD>

Plain Text
1* --scope specifies the Service Scope for the query.
2 * --metric-name specifies the name of the Monitor item to be queried.
3 * --statistics specifies how to aggregate the queried raw data.
4 * --start-time and --end-time specify the time range for the query.
5 * --period specifies the aggregation period in seconds (default value is 60).

During Monitor data queries, Dimension details can be defined using the --dimensions (-d) parameter.

Query Monitor Metadata

Sub-command for querying Monitor metadata: metric-meta-list

For example: bcm-tool metric-meta-list -S <SCOPE>

Querying with Scope retrieves Monitor metadata within the current Scope. Running this command returns all Monitor item details under the Scope, including its Dimensions.

To view metadata of a Monitor item or specific Dimension, use the following command:

Plain Text
1bcm-tool metric-meta-list --scope <SCOPE> --metric-name <METRICNAME>
2
3bcm-tool metric-meta-list --scope <SCOPE> --metric-name <METRICNAME> --dimensions <NAME>=<VALUE>,<NAME>=<VALUE>

Previous
Multi-Region Service