- Newest
- Most votes
- Most comments
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).
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.
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:
[3] https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Create_Composite_Alarm.html
I hope this helps.
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.
Relevant content
- Accepted Answerasked 2 years ago
- asked 2 years ago
- asked 3 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 8 months ago
- AWS OFFICIALUpdated 8 months ago
- AWS OFFICIALUpdated a year ago
Hello Shree_C
Thank you for the answer, let me try it
we cannot add more than 10 metrics in metric math expression to the graph to create alarm right ?