Learn how to leverage Amazon CloudWatch alarms to create an incident in ServiceNow
836
0
·
2020/01/06
·
3 mins read
☕
WriterShelf™ is a unique multiple pen name blogging and forum platform. Protect relationships and your privacy. Take your writing in new directions. ** Join WriterShelf**
WriterShelf™ is an open writing platform. The views, information and opinions in this article are those of the author.
Article info
Categories:
Tags:
Date:
Published: 2020/01/06 - Updated: 2020/01/23
Total: 693 words
Like
or Dislike
More from this author
More to explore
Introduction
Customers want to leverage Amazon CloudWatch and ServiceNow together to receive notification of important events and to quickly orchestrate a remediation.
Amazon CloudWatch is a monitoring and management service that enables you to monitor your applications, understand and respond to system-wide performance changes, optimize resource utilization, and get a unified view of operational health.
ServiceNow routes incidents to the right people in your organization who need to take action when something meaningful happens in your AWS environment.
This post demonstrates how to integrate Amazon SNS topics to send messages to ServiceNow, open an incident when a CloudWatch alarm is triggered, and test your configuration with a sample CloudWatch alarm.
To get in-Depth knowledge on ServiceNow you can enroll for live ServiceNow Online Training
Configure ServiceNow
We will use a free ServiceNow developer instance to do our work. If you already have one, feel free to use your own.
Create an SNS topic and subscription
Confirm SNS subscription on ServiceNow
Before SNS is allowed to send messages to ServiceNow, you must confirm the subscription on ServiceNow. At this point, AWS has already sent a handshake request, and it’s awaiting confirmation inside your ServiceNow instance.
Now let’s do something meaningful whenever SNS sends an alarm. In this case, we want to open an incident when CloudWatch notifies you of a budget threshold being crossed. ServiceNow provides a script “Handler” that is invoked when SNS sends an alarm message. To configure a handler to create an incident, follow instructions below:
var incident = new GlideRecord("incident"); incident.initialize(); incident.short_description = "SNS Alarm: "+message.AlarmName; incident.description = "AWS Account ID: " + message.AWSAccountId + "\nRegion: " + message.Region + "\nDescription: " + message.NewStateReason; incident.insert();
To get in-Depth knowledge on AWS you can enroll for live AWS Training
Test using CloudWatch
To test this integration, we’ll create a CloudWatch alarm, then it will be tripped to trigger an SNS message, which will create an incident in ServiceNow.