• 製品
  • 使用を開始する
  • 関連ドキュメント
  • リソース

Amazon SNS と統合する

この記事では、Jira Service Management Cloud の一部のお客様に段階的に展開されている、Jira Service Management でネイティブに利用できる新しいアラート機能を取り上げています。ご利用のサイトにはまだ表示されていないか、利用できない可能性があります。

受信 Amazon SNS のロゴ

Amazon SNS を使用すると、Apple、Google、Fire OS、Windows デバイスへのプッシュ通知、および Baidu Cloud Push を介した中国の Android デバイスへのプッシュ通知をシンプルかつ費用対効果の高い方法で実現できます。

​統合によって何ができますか?

Jira Service Management は Amazon SNS 通知のディスパッチャーとして機能し、オンコール スケジュールに基づいて適切な通知先が決定されます。メール、テキスト メッセージ (SMS)、電話、iPhone や Android のプッシュ通知によって通知し、アラートが承認されるかクローズされるまでアラートをエスカレートします。

統合による機能

SNS でアラートが作成されると、統合を通じて Jira Service Management でアラートが自動的に作成されます。

統合をセットアップする

Amazon SNS は API ベースの統合です。設定は次の手順で行います。

  • Jira Service Management で Amazon SNS 統合を追加する

  • Amazon SNS でサブスクリプションをセットアップする

Amazon SNS 統合を追加する

Jira Service Management の Free プランまたは Standard プランを使用している場合は、この統合はチームの運用ページからのみ追加できます。Settings (歯車のアイコン) > Products ([Jira 設定] の下) > OPERATIONS からこの機能にアクセスするには、Premium プランまたは Enterprise プランが必要です。

統合をチームの運用ページから追加すると、そのチームが統合の所有者になります。つまり、Jira Service Management は、この統合を通じて受信したアラートをチームにのみ割り当てます。

Jira Service Management で Amazon SNS 統合を追加するには、次の手順に従います。

  1. チームのオペレーション ページに移動します

  2. 左側のナビゲーション パネルで、[統合]、[統合を追加] の順に選択します。

  3. 検索を実行して「Amazon SNS」を選択します。

  4. 次の画面で、統合の名前を入力します。

  5. オプション: 特定のチームが統合からのアラートを受信するようにする場合は、[Assignee team (担当者チーム)] のチームを選択します。

  6. [続行] を選択します。
    この時点で、統合が保存されます。

  7. [統合を設定する手順] セクションを展開して、Jira Service Management のエンドポイントと API キーを含む統合 URL をコピーします。
    この URL は、後ほど Amazon SNS で統合を設定する際に使用します。

  8. [統合をオンにする] を選択します。
    統合のために作成したルールは、統合をオンにした場合にのみ機能します。

Amazon SNS でサブスクリプションをセットアップする

Amazon SNS でサブスクリプションをセットアップするには、次の手順に従います。

  1. SNS トピックを作成します。Amazon SNS の使用を開始する方法をご確認ください

  2. Jira Service Management で統合を追加する際にコピーした URL をエンドポイントとして使用して、トピックに HTTPS サブスクリプションを追加します。設定が正常に完了すると、Jira Service Management で確認のアラートが作成されます。HTTPS サブスクリプションを追加する方法をご確認ください

  3. メッセージ属性によって、アラートのエイリアス、エンティティ、タグ、受信者、チーム、カスタム アクションを指定します。Amazon SNS メッセージ属性の詳細をご確認ください

SNS メッセージ属性

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 AmazonSNSClient snsClient = new AmazonSNSClient(new BasicAWSCredentials("AWS_ACCESS_KEY","AWS_SECRET_KEY")); String msg = "This is the description of Sns Integration test alert"; String subject = "Sns Integration Test alert"; PublishRequest publishRequest = new PublishRequest("arn:aws:sns:us-east-1:974xxxxxxx:JsmSns", msg, subject);publishRequest.addMessageAttributesEntry("eventType", new MessageAttributeValue() .withDataType("String").withStringValue("create")); publishRequest.addMessageAttributesEntry("alias", new MessageAttributeValue() .withDataType("String").withStringValue("testalertalias")); publishRequest.addMessageAttributesEntry("entity", new MessageAttributeValue() .withDataType("String").withStringValue("Test alert entity")); publishRequest.addMessageAttributesEntry("tags", new MessageAttributeValue() .withDataType("String").withStringValue("trial")); publishRequest.addMessageAttributesEntry("recipients", new MessageAttributeValue() .withDataType("String").withStringValue("none")); publishRequest.addMessageAttributesEntry("teams", new MessageAttributeValue() .withDataType("String").withStringValue("team1,team2")); publishRequest.addMessageAttributesEntry("actions", new MessageAttributeValue() .withDataType("String").withStringValue("customAction")); PublishResult publishResult = snsClient.publish(publishRequest);

「MessageAttributes」のすべてのフィールドはオプションです。実行するアクションを指定するには、"eventType" フィールドを送信します。"eventType" が指定されていない場合は、アラートが作成されます。アクションを実行するには、"eventType" を次のように指定します。

  • アクションを作成 > "eventType" : {"Type":"String","Value":"create"}

  • アクションをクローズ > "eventType" : {"Type":"String","Value":"close"}

  • アクションを承認 > "eventType" : {"Type":"String","Value":"acknowledge"}

  • 「メモを追加」アクション > "eventType" : {"Type":"String","Value":"addNote"}

Amazon SNS から送信されるペイロードの例

アラート ペイロード (JSON 形式) を作成する

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 { "Type" : "Notification", "MessageId" : "0323d595-6aed-5dd4-a378-9811daf7d3ed", "TopicArn" : "arn:aws:sns:us-east-1:9747xxxxxxx:gj", "Subject" : "Sns Integration Test alert", "Message" : "This is the description of Sns Integration test alert", "Timestamp" : "2015-03-18T15:24:31.877Z", "SignatureVersion" : "1", "Signature" : "QplK4lyJWAtjIV9BzcF4AHTKT+VTupYqJIzxxxxxxxxxxx4QR8EdAYr31xDjI8...", "SigningCertURL" : "https://sns.us-east-1.amazonaws.com/SimpleNotificationService-dxxxxd67.pem", "UnsubscribeURL" : "https://sns.us-east-1.amazonaws.com/?Action=Unsubscribe..", "MessageAttributes" : { "alias" : {"Type":"String","Value":"testalertalias"}, "entity" : {"Type":"String","Value":"snstestentity"}, "tags" : {"Type":"String","Value":"tag1,tag2"}, "eventType" : {"Type":"String","Value":"create"}, "recipients" : {"Type":"String","Value":"all"}, "teams" : {"Type":"String","Value":"team1,team2"}, "actions" : {"Type":"String","Value":"act1,act2"} } }

 

その他のヘルプ