Hosts autoscale up/down when resources are not enough

I would like to know is the way to catch resource events, for example, when port could not be publish - “Allocation failed: No healthy hosts meet the resource constraints”?

I’m in researching how we can automate scale up/down hosts in our environment. Hosts are ec2 instances, so have idea to use autoscaling in aws or rancher receiver. But main question is how catch the events when resources are not enough, is it possible? Could rancher (cattle) send events to our api or to rancher receiver?

Thanks for help.

p.s. I know about prometeus, but I’m not sure is this system could monitor on event above.

Found “rancher events” (rancher-cli), I think, it’s exactly what is needed.