Skip to content

Huawei Cloud RDS PostgreSQL

Collect Huawei Cloud RDS PostgreSQL Metrics data

Configuration

Install Func

It is recommended to activate the Guance integration - extension - DataFlux Func (Automata): all prerequisites are automatically installed. Please proceed with the script installation.

If you are deploying Func yourself, refer to Self-deploying Func

Install Script

Note: Please prepare the Huawei Cloud AK in advance (for simplicity, you can directly grant the global read-only permission Tenant Guest)

Automated Script Installation

  1. Log in to the Guance console.
  2. Click the 【Integration】 menu, and select 【Cloud Account Management】.
  3. Click 【Add Cloud Account】, select 【Huawei Cloud】, and fill in the required information on the interface. If you have already configured the cloud account information before, you can skip this step.
  4. Click 【Test】, and if the test is successful, click 【Save】. If the test fails, please check if the relevant configuration information is correct and retest.
  5. Click 【Cloud Account Management】, and you can see the added cloud account in the list. Click the corresponding cloud account to enter the details page.
  6. Click the 【Integration】 button on the cloud account details page, find Huawei Cloud RDS PostgreSQL under the Not Installed list, and click the 【Install】 button. A pop-up installation interface will appear for installation.

Manual Script Installation

  1. Log in to the Func console, click 【Script Market】, and enter the Guance script market. Search for integration_huaweicloud_rds_postgresql.

  2. Click 【Install】, and enter the corresponding parameters: Huawei Cloud AK, SK, and account name.

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

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

Verification

  1. In 「Management / Automatic Trigger Configuration」, confirm whether the corresponding task has the corresponding automatic trigger configuration. At the same time, you can view the corresponding task records and logs to check for any exceptions.
  2. In Guance, check if asset information exists in 「Infrastructure - Resource Catalog」.
  3. In Guance, check if there is corresponding monitoring data in 「Metrics」.

Metrics

Collect Huawei Cloud RDS PostgreSQL Metrics data. More Metrics can be collected through configuration Huawei Cloud RDS PostgreSQL Metrics Details

Instance Monitoring Metrics

RDS for PostgreSQL instance performance monitoring Metrics, as shown in the table below. For more Metrics, please refer to Table 1

Metric ID Metric Name Metric Description Value Range Monitoring Period (Original Metric)
swap_total_size Total swap size This Metric is used to count the total swap size. ≥ 0 MB 1 minute
swap_usage Swap usage rate This Metric is used to count the swap usage rate. 0-100% 1 minute
rds005_bytes_out Network output throughput This Metric is used to count the average traffic output from all network adapters of the measurement object per second, in bytes/second. ≥ 0 bytes/s 1 minute
rds004_bytes_in Network input throughput This Metric is used to count the average traffic input from all network adapters of the measurement object per second, in bytes/second. ≥ 0 bytes/s 1 minute
rds003_iops IOPS This Metric is used to count the number of I/O requests processed by the system per unit time (average) for the current instance. ≥ 0 counts/s 1 minute
read_count_per_second Read IOPS This Metric is used to count the number of read I/O requests processed by the system per unit time (average) for the current instance. ≥ 0 counts/s 1 minute
write_count_per_second Write IOPS This Metric is used to count the number of write I/O requests processed by the system per unit time (average) for the current instance. ≥ 0 counts/s 1 minute
rds042_database_connections Database connections The current number of backends connected to the database. ≥ 0 counts 1 minute
rds083_conn_usage Connection usage rate This Metric is used to count the percentage of used PgSQL connections out of the total connections. 0-100% 1 minute
active_connections Active connections This Metric is used to count the current number of active connections to the database. ≥ 0 1 minute
rds082_tps TPS This Metric is used to count the number of transactions executed per second, including committed and rolled back transactions. ≥ 0 times/second 1 minute
rds046_replication_lag Replication lag The lag time of the replica. ≥ 0 ms 1 minute
synchronous_replication_blocking_time Synchronous replication blocking time This Metric is used to obtain the duration of replication blocking between the primary and standby machines in synchronous replication. ≥ 0 s 1 minute
inactive_logical_replication_slot Inactive logical replication slots This Metric is used to count the number of inactive logical replication slots in the current database. ≥ 0 1 minute
rds041_replication_slot_usage Replication slot usage The disk capacity occupied by the replication slot files. ≥ 0 MB 1 minute
rds043_maximum_used_transaction_ids Maximum used transaction IDs The maximum used transaction ID. ≥ 0 counts 1 minute
idle_transaction_connections Idle transaction connections This Metric is used to count the current number of idle connections to the database. ≥ 0 1 minute
oldest_transaction_duration Oldest transaction duration This Metric is used to count the duration of the oldest transaction currently existing in the database. ≥ 0 ms 1 minute
oldest_transaction_duration_2pc Oldest uncommitted transaction duration This Metric is used to count the duration of the oldest uncommitted transaction currently existing in the database. ≥ 0 ms 1 minute
rds040_transaction_logs_usage Transaction log usage The disk capacity occupied by the transaction logs. ≥ 0 MB 1 minute
lock_waiting_sessions Sessions waiting for locks This Metric is used to count the number of sessions currently in a blocked state. ≥ 0 1 minute
slow_sql_log_min_duration_statement Number of SQLs executed for log_min_duration_statement duration This Metric is used to count the number of slow SQLs whose execution time exceeds the parameter log_min_duration_statement in the database. The parameter size can be changed according to business needs. ≥ 0 1 minute
slow_sql_one_second Number of SQLs executed for 1 second This Metric is used to count the number of slow SQLs whose execution time exceeds 1 second in the database. ≥ 0 1 minute
slow_sql_three_second Number of SQLs executed for 3 seconds This Metric is used to count the number of slow SQLs whose execution time exceeds 3 seconds in the database. ≥ 0 1 minute
slow_sql_five_second Number of SQLs executed for 5 seconds This Metric is used to count the number of slow SQLs whose execution time exceeds 5 seconds in the database. ≥ 0 1 minute

Object

The collected Huawei Cloud RDS PostgreSQL object data structure can be seen in 「Infrastructure - Resource Catalog」.

{
  "measurement": "huaweicloud_rds_postgresql",
  "tags": {
    "name"                   : "1d0c91561f4644daxxxxx68304b0520din01",
    "id"                     : "1d0c91561f4644dxxxxxxd68304b0520din01",
    "instance_name"          : "rds-df54-xxxx",
    "status"                 : "ACTIVE",
    "port"                   : "5432",
    "type"                   : "Single",
    "RegionId"               : "cn-north-4",
    "security_group_id"      : "d13ebb59-d4fe-xxxx-xxxx-c22bcea6f987",
    "switch_strategy"        : "xxx",
    "project_id"             : "c631f046252dxxxxxxxf253c62d48585",
    "time_zone"              : "UTC+08:00",
    "enable_ssl"             : "False",
    "charge_info.charge_mode": "postPaid",
    "engine"                 : "PostgreSQL",
    "engine_version"         : "14"
  },
  "fields": {
    "created_time"    : "2022-06-21T06:17:27+0000",
    "updated_time"    : "2022-06-21T06:20:03+0000",
    "alias"           : "xxx",
    "private_ips"     : "[\"192.xxx.x.144\"]",
    "public_ips"      : "[]",
    "datastore"       : "{Database information}",
    "cpu"             : "2",
    "mem"             : "4",
    "volume"          : "{Volume information}",
    "nodes"           : "[{Primary and standby instance information}]",
    "related_instance": "[]",
    "backup_strategy" : "{Backup strategy}",
    "message"         : "{Instance JSON data}"
  }
}

Note: The fields in tags and fields may change with subsequent updates.

Note 1: The value of tags.name is the instance ID, which is used as the unique identifier.

Note 2: The following fields are all JSON serialized strings.

  • fields.message
  • fields.private_ips
  • fields.public_ips
  • fields.volume
  • fields.nodes
  • fields.related_instance
  • fields.backup_strategy

Note 3: The value of type can be "Single", "Ha", "Replica", or "Enterprise", corresponding to single instance, primary and standby instances, read-only instances, and distributed instances (Enterprise Edition) respectively.

Feedback

Is this page helpful? ×