AWS Systems Manager Run Command
Collect AWS Systems Manager Run Command Metrics
Configuration¶
Install Func¶
It is recommended to activate Guance 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 the global read-only permission
ReadOnlyAccess)
Automata Version Activation Script¶
- Log in to the Guance console
- Click the 【Integration】 menu, select 【Cloud Account Management】
- Click 【Add Cloud Account】, select 【AWS】, and fill in the required information on the interface. If you have already configured the cloud account information before, ignore this step.
- Click 【Test】, after a successful test, click 【Save】. If the test fails, please check the relevant configuration information and retest.
- Click 【Cloud Account Management】, you can see the added cloud account in the list, click the corresponding cloud account to enter the details page.
- Click the 【Integration】 button on the cloud account details page, find
AWS Systems Manager Run Commandunder theNot Installedlist, and click the 【Install】 button to pop up the installation interface for installation.
Manual Activation Script¶
-
Log in to the Func console, click on 【Script Market】, enter the Guance 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
Startupscript 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 Guance, go to "Infrastructure - Resource Catalog" to check if asset information exists.
- In Guance, 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
tagsandfieldsmay change with subsequent updates.