How to know the list of the AWS SSM agents

0

Hi everyone,

I am conducting some compliance checking for the AWS SSM agents. I am not sure where to take a look to see how many agents that i have and how were they installed and configured. Pls help me with this.

Thank you!

Long
已提问 2 个月前143 查看次数
2 回答
3
已接受的回答

Hi,

You want to start this task of inventotying your SSM agents by using AWS Systems Manager Inventory: see https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-inventory.html

It will deliver you extensive data :

AWS Systems Manager Inventory provides visibility into your AWS computing environment. 
You can use Inventory to collect metadata from your managed nodes. You can store this 
metadata in a central Amazon Simple Storage Service (Amazon S3) bucket, and then use 
built-in tools to query the data and quickly determine which nodes are running the software 
and configurations required by your software policy, and which nodes need to be updated.
You can configure Inventory on all of your managed nodes by using a one-click procedure. 
You can also configure and view inventory data from multiple AWS Regions and AWS accounts 
by using Amazon Athena

Best,

Didier

profile pictureAWS
专家
已回答 2 个月前
profile picture
专家
Sandeep
已审核 2 个月前
profile picture
专家
已审核 2 个月前
profile picture
专家
已审核 2 个月前
profile picture
专家
已审核 2 个月前
  • Thanks a lot Didier!!

  • Long, you're welcome! Thanks for accepting my answer.

1

You can check inventory in Systems Manager Enter image description here

and use the following for the Linux EC2

https://docs.aws.amazon.com/systems-manager/latest/userguide/ssm-agent-status-and-restart.html

sudo systemctl status amazon-ssm-agent

● amazon-ssm-agent.service - amazon-ssm-agent
     Loaded: loaded (/usr/lib/systemd/system/amazon-ssm-agent.service; enabled; preset: enabled)
     Active: active (running) since Mon 2024-08-12 07:11:42 UTC; 3min 26s ago
   Main PID: 2134 (amazon-ssm-agen)
      Tasks: 30 (limit: 1114)
     Memory: 159.0M
        CPU: 2.502s
     CGroup: /system.slice/amazon-ssm-agent.service
             ├─2134 /usr/bin/amazon-ssm-agent
             ├─2181 /usr/bin/ssm-agent-worker
             ├─2303 /usr/bin/ssm-session-worker oleksii.bebych@automat-it.com-rchhg7fkf626laedhjr56gtsdm
             └─2322 sh

Aug 12 07:11:42 ip-10-0-10-94.ec2.internal amazon-ssm-agent[2134]: 2024-08-12 07:11:42 INFO [CredentialRefresher] Starting credentials refresher loop
Aug 12 07:11:42 ip-10-0-10-94.ec2.internal amazon-ssm-agent[2134]: 2024-08-12 07:11:42 INFO EC2RoleProvider Successfully connected with instance profile role credentials
Aug 12 07:11:42 ip-10-0-10-94.ec2.internal amazon-ssm-agent[2134]: 2024-08-12 07:11:42 INFO [CredentialRefresher] Credentials ready
Aug 12 07:11:42 ip-10-0-10-94.ec2.internal amazon-ssm-agent[2134]: 2024-08-12 07:11:42 INFO [CredentialRefresher] Next credential rotation will be in 29.999990758766668 minutes
Aug 12 07:11:43 ip-10-0-10-94.ec2.internal amazon-ssm-agent[2134]: 2024-08-12 07:11:43 INFO [amazon-ssm-agent] [LongRunningWorkerContainer] [WorkerProvider] Worker ssm-agent-worker is not running, starting worker process
Aug 12 07:11:43 ip-10-0-10-94.ec2.internal amazon-ssm-agent[2134]: 2024-08-12 07:11:43 INFO [amazon-ssm-agent] [LongRunningWorkerContainer] [WorkerProvider] Worker ssm-agent-worker (pid:2181) started
Aug 12 07:11:43 ip-10-0-10-94.ec2.internal amazon-ssm-agent[2134]: 2024-08-12 07:11:43 INFO [amazon-ssm-agent] [LongRunningWorkerContainer] Monitor long running worker health every 60 seconds
Aug 12 07:14:16 ip-10-0-10-94.ec2.internal useradd[2312]: new group: name=ssm-user, GID=1001
Aug 12 07:14:16 ip-10-0-10-94.ec2.internal useradd[2312]: new user: name=ssm-user, UID=1001, GID=1001, home=/home/ssm-user, shell=/bin/bash, from=none
Aug 12 07:14:19 ip-10-0-10-94.ec2.internal sudo[2323]: ssm-user : TTY=pts/0 ; PWD=/usr/bin ; USER=root ; COMMAND=/usr/bin/su
profile picture
专家
已回答 2 个月前
profile picture
专家
Artem
已审核 2 个月前
profile picture
专家
已审核 2 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则