create one cloudwatch alarm for multiple instances

0

Hello everyone,

Is there any method that can create one cloudwatch alarm for multiple on-prem servers?

질문됨 2년 전6872회 조회
3개 답변
1

Hi, there are 2 ways to understand your request, and I think the 2 answers you've already received are tied to the same way.

1 way to understand it is "I want a single alarm to show a unified status for multiple servers simultaneously. That is, an alarm that will turn red if one of the servers goes red". This is what the 2 other answers already help you with: you can create a composite alarm or metric-math alarm to blend multiple signals into a single alarm.

Another way to understand your request is "I want to write only once a single alarm definition that can monitor every server I send metrics for, and every server is monitored separately (a distinct action will be executed for every server that crosses the threshold, and I can see the status of each server separately)". At this time, you would need to implement custom logic to do that. When customers use EC2, they can rely on events to detect the addition of a server. Since you refer to on-prem servers, you cannot leverage the exact same approach: you'd need to either fire the lambda on a schedule to detect new metrics, or invoke the lambda yourself from your on-prem servers start/stop scripts.

Last option would be to be able to write once a single alarm definition that shows a unified status for multiple servers simultaneously, merging both points above. This last one is much simpler than it seems: you could simply ingest a custom metric without your server name in the dimensions, so that all servers' observations data is aggregated by CloudWatch as a single metric, and alarm using advanced statistics (e.g. the max, average, percentile or trimmed mean of that metric).

profile pictureAWS
Jsc
답변함 2년 전
0

Hi there,

I understand that you would like to create a single Cloudwatch alarm for multiple on-premise servers. This can be achieved by installing the AWS CloudWatch agent on your on-premise servers which will the allow you to create a composite alarm. To install the CloudWatch agent, please see reference [1].

Please note that if you have downloaded the AWS CloudWatch agent on one computer and created the agent configuration file you want, you can use that configuration file to install the agent on other on-premises servers. Please see reference [2] to create a CloudWatch agent.

With Amazon CloudWatch composite alarms, you can now combine multiple alarms to reduce alarm noise and focus on critical operational issues. You can easily combine multiple alarms together into alarm hierarchies that only trigger once when multiple alarms fire at the same time.

To create a composite CloudWatch Alarm, please see reference [3].

References:

[1] https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/install-CloudWatch-Agent-on-EC2-Instance.html

[2] https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/create-cloudwatch-agent-configuration-file-wizard.html

[3] https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Create_Composite_Alarm.html

I hope this helps.

답변함 2년 전
  • Hello @Asenathi,

    I very much appreciate your reply. But the thing is I want to set up same alarm to multiple servers. For example, let's say "mem_used_percent > 26" I want to set up this alarm for "x" servers. x is server count.

0

Hello rePost-User-7340636,

Once the metrics are available in the CloudWatch service, graph them first. You should then create a metric math expression based on the graphed metrics and set up an alarm over the expression. Hope this helps.

AWS
전문가
Shree_C
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠