Reputation: 1
I have created a few EC2 instances using Image builder which includes installation of SSM agent by default. I need to put an automation which polls for SSM agent within the server and if the service is stopped or unresponsive, it starts the service back. Any suggestions on how I can achieve it for RHEL and Windows EC2?
Expection is to have SSM agent running and automation fixing the service if fails
Upvotes: 0
Views: 1050
Reputation: 1
SSM agent runs as a daemon using systemd,so it will continue to run unless it is explicitly stopped.Now if your ssm agent stops working you can restart your ec2 or stop/start your ec2 that will run the init process behind the scenes and start your ssm agent systemd service again. Now with respect to your question,a daemon process means it should run at background irrespective of your user interaction so if your ssm agent is stopping again and again then maybe there is some other issue of high load which have to be looked carefully.
Upvotes: 0