Skip to content

AWS DocumentDB

The displayed Metrics for AWS DocumentDB include read and write throughput, query latency, and scalability, among others.

Configuration

Install Func

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

If you deploy Func yourself, refer to Self-deployed Func

Installation Script

Note: Make sure you have an Amazon AK that meets the requirements (for simplicity, you can directly grant global read-only permission ReadOnlyAccess).

Script for enabling managed version

  1. Log in to the Guance console.
  2. Click on the [Integration] menu and select [Cloud Account Management].
  3. Click [Add Cloud Account], choose [AWS]. If you have already configured cloud account information, skip this step.
  4. Click [Test], if the test succeeds, click [Save]. If the test fails, check whether the relevant configuration information is correct and retest.
  5. In the [Cloud Account Management] list, you can see the added cloud account. Click on the corresponding cloud account to enter the details page.
  6. On the cloud account detail page, click the [Integrate] button. In the Not Installed list, find AWS DocumentDB, click the [Install] button, and follow the installation interface.

Manual Activation Script

  1. Log in to the Func console, click [Script Market], enter the official script market, and search for guance_aws_documentdb.
  2. After clicking [Install], input the corresponding parameters: AWS AK ID, AK Secret, and account name.
  3. Click [Deploy Startup Script], the system will automatically create a Startup script set and configure the corresponding startup script automatically.
  4. After activation, you can see the corresponding automatic trigger configuration in "Management / Automatic Trigger Configuration". Click [Execute] to immediately run once without waiting for the scheduled time. After a short while, you can view the execution task records and corresponding logs.

Verification

  1. Confirm in "Management / Automatic Trigger Configuration" whether the corresponding tasks have the corresponding automatic trigger configurations. You can also check the corresponding task records and logs for any abnormalities.
  2. In Guance, under "Infrastructure / Custom", check if there is asset information.
  3. In Guance, under "Metrics", check if there is corresponding monitoring data.

Metrics

After configuring Amazon-CloudWatch, the default Measurement sets are as follows. More Metrics can be collected through configuration. Amazon CloudWatch Metrics Details

Metric Description
CPUUtilization The percentage of CPU used by the instance.
FreeableMemory Available random access memory (in bytes).
FreeLocalStorage This metric reports the storage available for temporary tables and logs on each instance. This value depends on the instance class. You can increase the amount of storage available to an instance by selecting a larger instance class for it.
SwapUsage The size of the swap space used on the instance.
DatabaseConnections The number of connections opened on the instance per minute.
DatabaseConnectionsMax The maximum number of database connections opened on the instance per minute.
DatabaseCursors The number of cursors opened on the instance per minute.
DatabaseCursorsMax The maximum number of cursors opened on the instance per minute.
DatabaseCursorsTimedOut The number of cursors timed out per minute.
LowMemThrottleQueueDepth The queue depth of requests throttled due to insufficient available memory, frequency per minute.
LowMemThrottleMaxQueueDepth The maximum queue depth of requests throttled due to insufficient available memory per minute.
LowMemNumOperationsThrottled The number of requests throttled due to insufficient available memory per minute.
ReadThroughput The average number of bytes read from disk per second.
WriteThroughput The average number of bytes written to disk per second.
ReadIOPS The average number of disk read I/O operations per second. Amazon DocumentDB reports read and write IOPS separately every minute.
NetworkThroughput Network throughput received from clients and sent to clients for each instance in an Amazon DocumentDB cluster, measured in bytes per second. This throughput does not include network traffic between instances in the cluster and the cluster volume.
NetworkReceiveThroughput Network throughput received from clients for each instance in the cluster (measured in bytes per second). This throughput does not include network traffic between instances in the cluster and the cluster volume.
NetworkTransmitThroughput Network throughput sent to clients for each instance in the cluster (measured in bytes per second). This throughput does not include network traffic between instances in the cluster and the cluster volume.
WriteIOPS The average number of disk write I/O operations per second. When used at the cluster level WriteIOPs, it will be evaluated across all instances in the cluster. Read and write IOPS are reported separately every minute.
ReadLatency The average time required for each disk I/O operation.
WriteLatency The average time required for each disk I/O operation (in milliseconds).
DBInstanceReplicaLag The total lag (in milliseconds) when copying updates from the primary instance to the replica instance.
OpcountersQuery The number of queries issued per minute.
OpcountersCommand The number of commands issued per minute.
OpcountersDelete The number of delete operations issued per minute.
OpcountersGetmore The number of get more operations issued per minute.
OpcountersInsert The number of insert operations issued per minute.
OpcountersUpdate The number of update operations issued per minute.
DocumentsDeleted The number of documents deleted per minute.
DocumentsInserted The number of documents inserted per minute.
DocumentsReturned The number of documents returned per minute.
DocumentsUpdated The number of documents updated per minute.
TTLDeletedDocuments The number of documents deleted by TTLMonitor per minute.
IndexBufferCacheHitRatio The percentage of index requests provided by the cache. After deleting indexes, collections, or databases, you might immediately see a spike in this metric greater than 100%. This will automatically correct itself after 60 seconds. This limitation will be fixed in future patch updates.
BufferCacheHitRatio The percentage of requests provided by the buffer cache.
DiskQueueDepth The number of concurrent write requests to the distributed storage volume.
EngineUptime The length of time the instance has been running (in seconds).

Objects

The object data structure for AWS DocumentDB that has been collected can be seen in "Infrastructure - Custom".

{
  "measurement": "aws_documentdb",
  "tags": {
    "AvailabilityZone"          : "cn-north-1a",
    "CACertificateIdentifier"   : "rds-ca-2019",
    "DBClusterIdentifier"       : "docdb-2023-06",
    "DBInstanceArn"             : "arn:aws-cn:rds:cn-north-1:",
    "DBInstanceClass"           : "db.t3.medium",
    "DBInstanceIdentifier"      : "docdb-2023-07",
    "DBInstanceStatus"          : "available",
    "DbiResourceId"             : "db-CKJQ",
    "Engine"                    : "docdb",
    "EngineVersion"             : "3.6.0",
    "KmsKeyId"                  : "arn:aws-cn:kms:cn-north-1:",
    "cloud_provider"            : "aws",
    "name"                      : "docdb-2023-07"
  },
  "fields": {
    "DBSubnetGroup": "{}",
    "Endpoint": "{\"Address\": \".docdb.cn-north-1.amazonaws.com.cn\", \"HostedZoneId\": \"Z010911BG9\", \"Port\": 27017}",
    "InstanceCreateTime": "2023-07-28T05:45:10.004000Z",
    "PendingModifiedValues": "{}",
    "PubliclyAccessible": "False",
    "StatusInfos": "{}",
    "VpcSecurityGroups": "[{\"Status\": \"active\", \"VpcSecurityGroupId\": \"sg-08895f59\"}]",
    "message": "{instance json information}"
  }
}

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

Feedback

Is this page helpful? ×