Amazon CloudWatch Events と統合する
リソースの状態が変わると、Amazon CloudWatch イベントをイベント ストリームに自動的に送信します。ストリーム内の選択したイベントに一致するルールを作成し、ターゲットにルーティングしてアクションを実行します。ルールを使用して、あらかじめ決められたスケジュールに基づいてアクションを実行することもできます。
統合でできるようになること
Jira Service Management で Amazon CloudWatch Events 統合を使用して、Amazon CloudWatch Events の通知を Jira Service Management に転送します。Jira Service Management は、オンコール スケジュールに基づいて通知すべき担当者を決定します。メール、テキスト メッセージ(SMS)、電話、iOS や Android のプッシュ通知による通知を行い、アラートが承認またはクローズされるまでアラートをエスカレートします。
統合による機能
AWS リソースの状態が変化すると、統合を介して Jira Service Management でアラートが自動的に作成されます。
統合をセットアップする
Amazon CloudWatch Events は API ベースの統合です。次の手順に沿ってセットアップを行います。
Jira Service Management で Amazon CloudWatch Events 統合を追加する
Amazon CloudWatch イベントで統合を設定する
CloudWatch Events 統合を追加する
The following capabilities are available in Jira Service Management Premium and Enterprise:
双方向の統合
Outgoing integrations at the team level
Integrations at a site level through Settings (icon) > Products (under Jira settings) > Operations
To access Jira Service Management Premium features, you must subscribe to a Service Collection Premium or Enterprise plan.
Adding an integration from your team’s operations page makes your team the owner of the integration. This means Jira Service Management only assigns the alerts received through this integration to your team.
Jira Service Management で CloudWatch Events 統合を追加するには、次のステップを実行します。
Next to Operations in the sidebar, select More actions (), then General configuration.
Select Integrations and then Add integration.
「Amazon CloudWatch Events」を検索して、選択します。
次の画面で、統合の名前を入力します。
オプション: 特定のチームが統合からのアラートを受信するようにする場合は、[Assignee team (担当者チーム)] のチームを選択します。
[Continue] を選択します。
この時点で、統合が保存されます。[統合を設定する手順] セクションを展開し、アカウント用に生成されたエンドポイント URL をコピーします。
この URL は、後ほど Amazon CloudWatch Events で統合を設定する際に使用します。[統合をオンにする] を選択します。
統合のために作成したルールは、統合をオンにした場合にのみ機能します。
Amazon CloudWatch イベントで統合を設定する
Amazon CloudWatch Events の統合を設定するには、次の手順を実行します。
SNS ダッシュボードに移動して [トピックを作成] を選択します。
ダイアログの必須フィールドに入力して [トピックを作成] を選択します。
「トピックの詳細」ページで、[サブスクリプションを作成] を選択します。
[プロトコル] で HTTPS を選択します。
先ほどコピーしたエンドポイント URL を [エンドポイント] に貼り付けます。
[サブスクリプションを作成] を選択します。
設定が正常に完了すると、Jira Service Management で確認のアラートが作成されます。CloudWatch ダッシュボードに移動します。
左側のメニューから、[イベント] > [ルール] を選択します。
[ルールを作成] を選択します。
通知を受け取る [イベント ソース] を選択します。
以前にターゲットとして作成した SNS トピックを追加します。
[詳細を設定] を選択します。
ルールの名前を入力して、[ルールを作成] を選択します。
統合のペイロードの例
(JSON 形式)
{
"Type": "Notification",
"MessageId": "96d4c7c2-999e-57ab-aade-95f2f518987f",
"TopicArn": "arn:aws:sns:us-west-2:450xxxxxxx:test",
"Message": "{\"version\":\"0\",\"id\":\"3ee38987-e0ce-29f1-91a1-32704265286f\",\"detail-type\":\"EC2 Instance State-change Notification\",\"source\":\"aws.ec2\",\"account\":\"4500xxxxxx\",\"time\":\"2017-09-11T10:49:41Z\",\"region\":\"us-west-2\",\"resources\":[\"arn:aws:ec2:us-west-2:4500xxxxxxx:instance/i-04d6ebefdb7xxxx\"],\"detail\":{\"instance-id\":\"i-04xxxxxx\",\"state\":\"terminated\"}}",
"Timestamp": "2017-09-11T10:49:42.630Z",
"SignatureVersion": "1",
"Signature": "Iv8exxxx/DIfFd0eZ4eyo4vjrb/wEEoNji9S3xGQtpo1E9gXyMM8spmrULq20o25+OKXwZd5tRue7D69olvdcUdqRAN/bBfaHHq6tKVxnVnidgNq1VknAMeQRgd8qwVW1gARXTdO2z9AeDrOCH/ozEgNK3vwoFsDDxwKFxlFa9aioxxOu0uGlyuUpIb2rOaOwSo0aloE14XY9tgWrGlAxp+YwyHJbwXj36oAAU0GZOZV5C4TMhnRIdBnI9Yxxxxxxxx/tj6+gRnP4KeldOFHpaBGdw3/hOMdq9vA8yH934sA==",
"SigningCertURL": "https://sns.us-west-2.amazonaws.com/SimpleNotificationService-433026a4050d2xxxxxxxxxx.pem",
"UnsubscribeURL": "https://sns.us-west-2.amazonaws.com/?Action=Unsubscribe&SubscriptionArn=arn:aws:sns:us-west-2:4500xxxxxxx:test:5c91fe30-xxxxx-4627-a7f7-xxxxxxx"
}
Jira Service Management はペイロードを次のように解析します。
(JSON 形式)
{
"id":"5c1f7731-23e0-0e90-124f-38ddb2811b49",
"detail-type":"EC2 Instance State-change Notification",
"source":"aws.ec2",
"account":"4500xxxxxxx",
"time":"2017-09-11T10:03:33Z",
"region":"us-west-2",
"detail":{"instance-id":"i-04d6ebxxxxxxxxx","state":"stopping"}}"
}
この内容はお役に立ちましたか?