Quote
"Create Metric – CPU Utilization Greater than 85% for 15+ Minutes – using lambda python"

In this article, I have given a code which can be used as reference while writing a program to Create Metric – CPU Utilization Greater than 85% for 15+ Minutes – using lambda python

severity = "Information"
alarm_title = "High_CPUUtilization"
response = cw.put_metric_alarm(
AlarmName = "%s_%s_%s_(Lambda)" % (severity, nameinstance, alarm_title),
#AlarmName = (nameinsta) + "_CPU_Load_(Lambda)",
AlarmDescription='CPU Utilization Greater than 85% for 15+ Minutes',
ActionsEnabled=True,
AlarmActions=[ec2_sns,],
MetricName='CPUUtilization',
Namespace='AWS/EC2',
Statistic='Average',
Dimensions=[ {'Name': "InstanceId",'Value': instanceid},],
Period=300,
EvaluationPeriods=3,
Threshold=85.0,
ComparisonOperator='GreaterThanOrEqualToThreshold'
)
if logging_verbosity > 9:
print (response)

“If you are passionate about technology and like to share your knowledge or the latest on technology, mail us on info@saniconservices.com and get featured on our blog page”

I hope you liked this article on how Create Metric – CPU Utilization Greater than 85% for 15+ Minutes – using lambda python. Feel free to ask your valuable questions in the comments section below.

About SANICON IT SERVICES PVT. LTD.: Over the years SANICON – A One-Stop Cloud Solution Company have provided the most credible cutting-edge IT technology & services across various domains which helped customers around the world to start and grow their businesses and their digital transformation to cloud.

Reach out to us today at sales@saniconservices.com to get a reliable and affordable cloud managed service and IT technology partner

Visit website www.saniconservices.com to learn more about all great products and services offered.

Leave a Reply

Your email address will not be published. Required fields are marked *