X-Pack (Elasticsearch Watcher) と統合する
統合でできるようになること
X-Pack Alerting 統合を使用して、X-Pack Alerting アラートを Jira Service Management に転送します。Jira Service Management は、これらのアラートのディスパッチャーとして機能して、オンコール スケジュールに基づいて通知する適切な担当者を決定します。メール、テキスト メッセージ (SMS)、電話、iPhone や Android のプッシュ通知による通知を行い、アラートが承認またはクローズされるまでアラートをエスカレーションします。
統合による機能
X-Pack Alerting でアラートが発生すると、統合を通じて Jira Service Management でアラートが自動的に作成されます。Jira Service Management でアラートが承認されると、そのアラートが X-Pack Alerting で承認されます。
統合をセットアップする
X-Pack Alerting は双方向の統合です。次の手順でセットアップを行います。
Jira Service Management で X-Pack Alerting 統合を追加する
X-Pack Alerting で統合を設定する
X-Pack Alerting の統合を追加する
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 で X-Pack Alerting 統合を追加するには、次の手順を実行します。
Next to Operations in the sidebar, select More actions (), then General configuration.
Select Integrations and then Add integration.
検索を実行して「X-Pack Alerting」を選択します。
次の画面で、統合の名前を入力します。
オプション: 特定のチームが統合からのアラートを受信するようにする場合は、[Assignee team (担当者チーム)] のチームを選択します。
[Continue] を選択します。
この時点で、統合が保存されます。[統合を設定する手順] セクションを展開して、API キーをコピーします。
このキーは、後ほど X-Pack Alerting で統合を設定する際に使用します。この記事の「X-Pack Alerting で統合を設定する」セクションに記載されているコードをコピーします。
このコードは、後ほど X-Pack Alerting で統合を設定する際に使用します。[統合をオンにする] を選択します。
統合のために作成したルールは、統合をオンにした場合にのみ機能します。
X-Pack Alerting で統合を設定する
Elasticsearch で Jira Service Management に統合を追加する際にコピーしたコードを貼り付けます。
X-Pack Alerting でアラートを設定します。
X-Pack Alerting の詳細については、X-Pack Alerting のドキュメントを参照してください。さきほど Jira Service Management からコピーした API キーを [API キー] に貼り付けます。
X-Pack Alerting のその他の設定
(JSON 形式)
PUT _watcher/watch/[WATCH ID]
{
[OTHER CONFIGURATIONS OF YOUR X-PACK ALERTING ALERT]
.
.
.
.
.
"actions" : {
"jsm": {
"webhook": {
"scheme": "https",
"method": "POST",
"host": "api.atlassian.com",
"port": 443,
"path": "/jsm/ops/integration/v1/json/eswatcher",
"headers": {
"Content-Type" : "application/json"
},
"params": {
"apiKey": "<span>{{itgs.temp.apiKey}}</span>"
},
"body": "<span ng-non-bindable>{{#toJson}}ctx{{/toJson}}</span>"
}
}
}
}
X-Pack Alerting でアラートを承認する
Jira Service Management でアラートが承認されたときに X-Pack Alerting でアラートが自動的に承認されるように統合を設定します。
統合設定ページの [送信] セクションにある [X-Pack Alerting でのアラートの承認] チェックボックスを選択します。
統合設定を編集し、[Authenticate with an X-Pack Alerting account (X-Pack Alerting アカウントで認証)] を選択します。次の値を設定します。
[X-Pack Alerting Action Id (X-Pack Alerting アクション ID)] にアクション ID を入力します。
[X-Pack Alerting Host URL (X-Pack Alerting ホスト URL)] に X-Pack Alerting ホスト URL を入力します。完全な URL アドレスを [プロトコル]://yourserveraddr:[ポート] として指定します (例: http://yourserver.com:9200)。
[保存] を選択します。
ペイロードの例
(JSON 形式)
{
"id": "event_critical_watch_249-2016-09-28T11:31:05.955Z",
"vars": {},
"trigger": {
"triggered_time": "2016-09-28T11:31:05.955Z",
"scheduled_time": "2016-09-28T11:31:05.511Z"
},
"execution_time": "2016-09-28T11:31:05.955Z",
"watch_id": "event_critical_watch",
"payload": {
"hits": {
"total": 1,
"hits": [
{
"_type": "event",
"_source": {
"eventDescription": "System has detected 3 failed login attempts",
"eventId": 1,
"eventName": "3 failed login attempts",
"eventType": "LOG",
"eventCategory": "CRITICAL"
},
"_id": 1,
"_index": "event",
"_score": 0.30685282
}
],
"max_score": 0.30685282
},
"_shards": {
"total": 1,
"failed": 0,
"successful": 1
},
"timed_out": false,
"took": 1
},
"metadata": "null"
}
この内容はお役に立ちましたか?