Rackspace Cloud Monitoring と統合する
統合でできるようになること
Rackspace Cloud Monitoring を使用すると、オンプレミス、オフプレミス、クラウドプロバイダ、世界中のあらゆる場所にあるインフラストラクチャを簡単に監視できます。
Jira Service Management の通知機能のサポートをフル活用するには、Rackspace Cloud Monitoring アラートを Jira Service Management に送信します。メール、SMS、電話、iPhone と Android のプッシュ通知を通じて Jira Service Management の通知を受信し、添付ファイルを使用してアラートに追加情報を加え、アラート サイクル全体を記録します。
統合による機能
Rackspace でアラートが作成されると、統合を通じて Jira Service Management でアラートが自動的に作成されます。
統合をセットアップする
Rackspace は API 統合です。設定は次の手順で行います。
Jira Service Management で Rackspace 統合を追加する
Rackspace で統合を設定する
Rackspace 統合を追加する
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 で Rackspace 統合を追加するには、次の手順を実行します。
Next to Operations in the sidebar, select More actions (), then General configuration.
Select Integrations and then Add integration.
検索を実行して「Rackspace」を選択します。
次の画面で、統合の名前を入力します。
オプション: 特定のチームが統合からのアラートを受信するようにする場合は、[Assignee team (担当者チーム)] のチームを選択します。
[Continue] を選択します。
この時点で、統合が保存されます。[統合を設定する手順] セクションを展開して、API キーをコピーします。
このキーは、後ほど Rackspace で統合を設定する際に使用します。[統合をオンにする] を選択します。
統合のために作成したルールは、統合をオンにした場合にのみ機能します。
Rackspace で統合を設定する
Rackspace ではメールと Webhook の通知タイプをサポートしています。アラートはメールで送信できますが、Jira Service Management には Jira Service Management Data Center でアラートを直接作成するための Rackspace Cloud Monitoring 用 Webhook API が用意されています。Rackspace と Jira Service Management の統合を設定するには、次の手順に従います。
1. Rackspace アカウントの「webhook_token」を、さきほど Jira Service Management からコピーしたトークンで更新します。
2. さきほど Jira Service Management からコピーした Webhook URL を使用して Rackspace に Webhook を登録します。
curl -i -X PUT \
-d '{ "webhook_token" : "your_api_integration_key" }' \
-H 'X-Auth-Token: rackspace_auth_token' \
-H 'Content-Type: application/json' \
'https://monitoring.api.rackspacecloud.com/v1.0/1234/account'
3. https://api.atlassian.com/jsm/ops/integration/v1/json/rackspace
URL を使用して Rackspace Cloud Monitoring で Webhook 通知を作成します。この URL は Jira Service Management API によって提供されます。作成した通知を通知プランで使用します。Jira Service Management から通知されるユーザーとユーザー グループのいずれかまたは両方 (コンマ区切り) を「recipients」URL パラメーターで指定します。指定しない場合、すべてのユーザーに通知されます。
curl -i -X POST \
-d '{ "details" : { "url" : "https://api.atlassian.com/jsm/ops/integration/v1/json/rackspace? recipients=john.smith@mycompany.com,operationsgroup" },
"label" : "jsm web hook",
"type" : "webhook"
}' \
-H 'X-Auth-Token: rackspace_auth_token' \
-H 'Content-Type: application/json' \
'https://monitoring.api.rackspacecloud.com/v1.0/1234/notifications'
完了です。Jira Service Management の強力なアラート・システムのおかげで、SMS、電話、iPhone または Android のプッシュ通知として Rackspace アラートを受信できるようになりました。次の簡単なシナリオで、統合を実証しましょう。
4. ポート 8080 で実行されている Web サーバーのエンティティを Rackspace Cloud Monitoring で作成します。
curl -i -X POST \
-d '{ "ip_addresses" : { "default" : "78.187.83.242" },
"label" : "My Web Server"
}' \
-H 'X-Auth-Token: rackspace_auth_token' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
'https://monitoring.api.rackspacecloud.com/v1.0/1234/entities/'
5. 次に、HTTP チェックを作成します
curl -i -X POST \
-d' { "details" : {"method" : "GET",
"url" : "http://78.187.83.242:8080/"
},
"label" : "web server status check",
"monitoring_zones_poll" : [ "mzlon" ],
"period" : "60",
"target_alias" : "default",
"type" : "remote.http"
}' \
-H 'X-Auth-Token: rackspace_auth_token' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
'https://monitoring.api.rackspacecloud.com/v1.0/1234/entities/en41F9wnvg/checks'
6. Jira Service Management の Webhook 通知を作成します
curl -i -X POST \
-d '{ "details" : { "url" : "https://api.atlassian.com/jsm/ops/integration/v1/json/rackspace?recipients=all" },
"label" : "jsm web hook",
"type" : "webhook"
}' \
-H 'X-Auth-Token: rackspace_auth_token' \
-H 'Content-Type: application/json' \
'https://monitoring.api.rackspacecloud.com/v1.0/1234/notifications'
7. Jira Service Management の Webhook 通知を使用して通知プランを作成します
テキスト
curl -i -X POST \
-d '{
"label": "Notification Plan 1",
"warning_state": [
"ntWArqzcoK"
],
"critical_state": [
"ntWArqzcoK"
],
"ok_state": [
"ntWArqzcoK"
]
}' \
-H 'X-Auth-Token: rackspace_auth_token' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
'https://monitoring.api.rackspacecloud.com/v1.0/1234/notification_plans'
8. Web サーバーから送信された HTTP エラー・コードについて、通知プラン付きのアラームを作成します。
curl -i -X POST \
-d '{ "check_id" : "chTfxuO8lm",
"criteria" : "if (metric[\"code\"] regex \"^[23]..$\") { return OK } return WARNING",
"notification_plan_id" : "npMuW2B1YL"
}' \
-H 'X-Auth-Token: rackspace_auth_token' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
'https://monitoring.api.rackspacecloud.com/v1.0/1234/entities/en41F9wnvg/alarms'
Web サーバーがシャットダウンされると、Rackspace Cloud Monitoring は障害を検出し、Jira Service Management アラートを作成します。
この内容はお役に立ちましたか?