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¶
- In "Manage / Automatic Trigger Configuration", confirm whether the corresponding task has the automatic trigger configuration. You can also check the task records and logs for any exceptions.
- In TrueWatch, go to "Infrastructure - Resource Catalog" to check if asset information exists.
- In TrueWatch, go to "Metrics" to see if there is corresponding monitoring data.
Metrics¶
Configure Amazon CloudWatch to collect more metrics. Amazon CloudWatch Metrics Details
AWS Systems Manager Run Command metrics are under the aws_ssm_run_command
measurement. The description column includes 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": {
"command_id" : "91d10100-89c4-4077-a2ce-89fb90d1f566",
"document_name" : "AWS-RunShellScript",
"RegionId" : "ap-southeast-1"
},
"fields": {
"document_version" : "1",
"expires_after" : "2025-08-05T14:14:19.774000+08:00",
"parameters" : "{[Command Document]}",
"instance_ids" : "xxxx-0b8b6fee9ef5426d7",
"targets" : "{[Json Data]}",
"requested_date_time" : "2025-08-05T13:04:19.774000+08:00",
"status" : "Success",
"status_details" : "Success",
"cloud_watch_output_config" : "{}",
"alarm_configuration" : "{}",
"triggered_alarms" : "[]",
"timeout_seconds" : "600",
"output_s_3_region" : "ap-southeast-1"
}
}
Note: The fields in
tags
andfields
may change with subsequent updates.