ユーザーとして Opsgenie の利用を開始する
プロフィールの設定、Opsgenie からの通知の取得、オンコール スケジュールの表示に関するすべての方法を説明します。
Opsgenie の Azure Autoscale 統合を使用して Azure アラートを詳細情報と共に OpsgenieのAPI に送信します。Opsgenie は Azure Autoscale によって生成されたアラートのディスパッチャーとして機能します。Opsgenie は、電子メール、テキスト メッセージ (SMS)、電話、プッシュ通知を使用して、オンコール スケジュールとエスカレーションに基づいて通知する適切なユーザーを決定します。
Azure Autoscale でアラートが作成されると、統合によって Opsgenie でアラートが自動で作成されます。
この統合はチーム ダッシュボードから追加可能
Opsgenie の Free または Essentials の各プランを使用している、または Jira Service Management の Standard プランで Opsgenie を使用している場合、このプランでは [設定] の [統合] ページが利用できないため、この統合はチーム ダッシュボードからのみ追加できます。
統合をチーム ダッシュボードから追加すると、そのチーム統合の所有者になります。Opsgenie では、この統合を通じて受信したアラートはそのチームのみに割り当てられます。
そのためには、次の手順に従います。
Teams からチーム ダッシュボードに移動します。
[統合] > [統合を追加] の順に選択します。
残りの手順に従って統合を完了します。
[設定] > [統合] の順に移動します。Azure Autoscale を検索して [追加] を選択します。
[応答者] フィールドによって Azure Autoscale アラートの通知先を指定します。入力し始めると、オートコンプリートの候補が表示されます。
Opsgenie エンドポイントと API キーを含む統合 URL をコピーします。
[Save Integration (統合を保存)] をクリックします。
Azure ポータルにログインします。
[監視] セクションの [オートスケール] を選択します。
3. 自動拡張するリソースを選択します。
4. オートスケールを有効にします。
5. 選択したリソースのオートスケール設定を入力します。
6. 拡張ルールを定義します。
7. 設定を保存し、[通知] をクリックし、Opsgenie の Azure Autoscale 統合の URL を Webhook フィールドに貼り付けて保存します。
アラートのペイロードを作成します。
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"
}
この内容はお役に立ちましたか?