AWS Systems Manager Run Command
Collect AWS Systems Manager Run Command Metrics
Configuration¶
Install Func¶
It is recommended to activate TrueWatch Integration - Extensions - DataFlux Func (Automata): All prerequisites are automatically installed. Please proceed with the script installation.
If you want to deploy Func manually, refer to Manual Deployment of Func
Install Script¶
Note: Please prepare the required Amazon AK in advance (for simplicity, you can directly grant global read-only permissions
ReadOnlyAccess
)
-
Log in to the Func console, click on 【Script Market】, enter the TrueWatch Script Market, and search for:
integration_aws_ssm_run_command
-
Click on 【Install】, then enter the corresponding parameters: AWS AK ID, AK Secret, and account name.
-
Click on 【Deploy Startup Script】, the system will automatically create the
Startup
script set and configure the corresponding startup scripts. -
After enabling, you can see the corresponding automatic trigger configuration in 「Manage / Automatic Trigger Configuration」. Click on 【Execute】 to immediately execute it once without waiting for the scheduled time. After a while, you can check the execution task records and corresponding logs.
Verification¶
- Confirm in 「Manage / Automatic Trigger Configuration」 whether the corresponding task has the automatic trigger configuration, and check the task records and logs for any exceptions.
- In TrueWatch, check if the asset information exists in 「Infrastructure - Resource Catalog」.
- In TrueWatch, check if there are corresponding monitoring data in 「Metrics」.
Metrics¶
Configure Amazon CloudWatch to collect more metrics Amazon CloudWatch Metrics Details
AWS Systems Manager Run Command metrics are under the aws_AWS/SSM-RunCommand
Measurement, with the description column including the description, unit, and statistics of each metric.
Metric | Description | Unit |
---|---|---|
CommandsDeliveryTimedOut |
Number of commands with a terminal status of Delivery Timed Out | count |
CommandsFailed |
Number of commands with a terminal status of Failed | count |
CommandsSucceeded |
Number of commands with a terminal status of Success | count |
Object¶
The collected AWS Systems Manager Run Command object data structure can be seen in 「Infrastructure - Resource Catalog」.
{
"measurement": "aws_ssm_run_command",
"tags": {
"CommandId" : "91d10100-89c4-4077-a2ce-89fb90d1f566",
"DocumentName" : "AWS-RunShellScript",
"RegionId" : "ap-southeast-1"
},
"fields": {
"DocumentVersion" : "1",
"ExpiresAfter" : "2025-08-05T14:14:19.774000+08:00",
"Parameters" : "{[Command Document]}",
"InstanceIds" : "xxxx-0b8b6fee9ef5426d7",
"Targets" : "{[Json Data]}",
"RequestedDateTime" : "2025-08-05T13:04:19.774000+08:00",
"Status" : "Success",
"StatusDetails" : "Success",
"CloudWatchOutputConfig" : "{}",
"AlarmConfiguration" : "{}",
"TriggeredAlarms" : "[]",
"TimeoutSeconds" : "600",
"OutputS3Region" : "ap-southeast-1"
}
}
Note: The fields in
tags
andfields
may change with subsequent updates.