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

Opsgenie を Microsoft Azure AutoScale と統合する

Microsoft Azure のロゴ

概要

統合でできるようになること

Azure Autoscale 統合は、Azure アラートを詳細な情報と共に Opsgenie API に送信します。OpsgenieAzure Autoscale によって生成されたアラートのディスパッチャーとして機能します。Opsgenie は、オンコール スケジュールとエスカレーションに基づいて通知すべきユーザーを決定して、メール、テキスト メッセージ (SMS)、電話、プッシュ通知による通知を行います。

統合による機能

Azure Autoscale でアラートが作成されると、統合によって Opsgenie でアラートが自動で作成されます。

統合をセットアップする

Azure Autoscale は API ベースの統合です。次のステップに沿ってセットアップを行います。

  • OpsgenieAzure Autoscale 統合を追加する

  • Azure Autoscale で統合を設定する

Azure Autoscale 統合を追加する

Opsgenie の Free プランまたは Essentials プランを使用している、または Jira Service Management の Standard プランで Opsgenie を使用している場合は、チーム ダッシュボードからのみこの統合を追加できます。このプランでは、[設定] の [統合] ページが利用できません。

  1. [チーム] に移動して自分のチームを選択します。

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

統合をチーム ダッシュボードから追加すると、そのチーム統合の所有者になります。Opsgenie では、この統合を通じて受信したアラートはそのチームのみに割り当てられます。このセクションの残りの手順に従って、統合を設定してください。

OpsgenieAzure Autoscale 統合を追加するには、次の手順に従います。

  1. [設定] > [統合] の順に移動します。

  2. [統合を追加] を選択します。

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

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

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

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

  7. [統合を設定するステップ] セクションを展開して、Opsgenie のエンドポイントと API キーを含む統合 URL をコピーします。
    この URL は、後ほど Azure Autoscale で統合を設定する際に使用します。

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

Azure で統合を設定する

1. Azure ポータルで [監視] を選択します。

2. [設定] セクションで、[AutoScale] を選択します。

3. アラートを生成するリソースを選択します。

4. オートスケールを有効にします。

5. オートスケール設定を行います。

6. Opsgenie で統合を追加する際にコピーした URL を、[通知] タブの [Webhook] に貼り付けます。

Microsoft Azure AutoScale の設定

7. ルールを保存します。

Azure Autoscale から送信されたペイロードのサンプル

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 { "version": "1.0", "status": "Activated", "operation": "Scale In", "context": { "timestamp": "2016-03-11T07:31:04.5834118Z", "id": "/subscriptions/s1/resourceGroups/rg1/providers/microsoft.insights/autoscalesettings/myautoscaleSetting", "name": "myautoscaleSetting", "details": "Autoscale successfully started scale operation for resource 'MyCSRole' from capacity '3' to capacity '2'", "subscriptionId": "s1", "resourceGroupName": "rg1", "resourceName": "MyCSRole", "resourceType": "microsoft.classiccompute/domainnames/slots/roles", "resourceId": "/subscriptions/s1/resourceGroups/rg1/providers/microsoft.classicCompute/domainNames/myCloudService/slots/Production/roles/MyCSRole", "portalLink": "https://portal.azure.com/#resource/subscriptions/s1/resourceGroups/rg1/providers/microsoft.classicCompute/domainNames/myCloudService", "oldCapacity": "3", "newCapacity": "2" }, "properties": { "key1": "value1", "key2": "value2" } }

Opsgenie によって解析されたペイロード (JSON 形式)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 { "version":"1.0", "status":"Activated", "operation":"Scale In", "timestamp":"2016-03-11T07:31:04.5834118Z", "id":"/subscriptions/s1/resourceGroups/rg1/providers/microsoft.insights/autoscalesettings/myautoscaleSetting", "name":"myautoscaleSetting", "details":"Autoscale successfully started scale operation for resource 'MyCSRole' from capacity '3' to capacity '2'", "subscription_id":"s1", "resource_group_name":"rg1", "resource_name":"MyCSRole", "resource_type":"microsoft.classiccompute/domainnames/slots/roles", "resource_id":"/subscriptions/s1/resourceGroups/rg1/providers/microsoft.classicCompute/domainNames/myCloudService/slots/Production/roles/MyCSRole", "portal_link":"https://portal.azure.com/#resource/subscriptions/s1/resourceGroups/rg1/providers/microsoft.classicCompute/domainNames/myCloudService", "old_capacity":"3", "new_capacity":"2", "key1":"value1", "key2":"value2" }

その他のヘルプ