Quote
"Program to create Linux Memory Usage Alarms – using lambda python"

In this article, I have given a code which can be used as reference while writing a  program to create Linux Memory Usage Alarms – using lambda python.

severity = "Warning"
alarm_title = "Linux_memory_usage"
response = cw.put_metric_alarm(
AlarmName = "%s_%s_%s_(Lambda)" % (severity, nameinstance, alarm_title),
AlarmDescription='Linux Memory Usage',
ActionsEnabled=True,
AlarmActions=[ec2_sns,],
MetricName='mem_used_percent',
Namespace='CWAgent',
Statistic='Average',
Dimensions=[ {'Name': "InstanceId", 'Value': instanceid},
{'Name': 'ImageId', 'Value': instance.image_id},
{'Name': 'InstanceType', 'Value': instance.instance_type}
],
Period=300,
EvaluationPeriods=1,
Threshold=80.0,
ComparisonOperator='GreaterThanOrEqualToThreshold'
)
if logging_verbosity > 9:
print (response)
print ("EVALUATED")
elif (instance.platform == 'windows'):
#ImageId, InstanceId, InstanceType

“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 find this program useful how to write a program to create Linux Memory Usage Alarms – 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 *