Opsgenie を VMware Center と統合する
Opsgenie が VMware vCenter ユーザーに提供するもの
Opsgenie の VMware vCenter インテグレーションを使用して、VMware vCenter インシデントを Opsgenie に転送します。Opsgenie はこれらのインシデントのディスパッチャーとして機能して、オンコール スケジュールに基づいて通知する適切な担当者を決定します。メール、テキスト メッセージ (SMS)、電話、iPhone、Android のプッシュ通知によって通知し、アラートが承認されるかクローズされるまでアラートをエスカレートします。
統合の機能性
VMware vCenter でアラームが作成されると、Opsgenie でアラートが作成されます。
Opsgenie で VMware vCenter インテグレーションを追加する
Opsgenie の Free プランまたは Essentials プランを使用している、または Jira Service Management の Standard プランで Opsgenie を使用している場合は、チーム ダッシュボードからのみこの統合を追加できます。 このプランでは、[設定] の [統合] ページが利用できません。
[チーム] に移動して自分のチームを選択します。
左側のナビゲーションで [統合] を選択し、[統合を追加] を選択します。
統合をチーム ダッシュボードから追加すると、そのチーム統合の所有者になります。Opsgenie では、この統合を通じて受信したアラートはそのチームのみに割り当てられます。このセクションの残りの手順に従って、統合を設定してください。
Go to Settings > Integrations. Search for VMware vCenter and select Add.
Specify who is notified of VMware vCenter alerts using the Responders field. Autocomplete suggestions are provided as you type.
API キーをコピーします。
[Save Integration (統合の保存)] を選択します。
VMware vCenter での設定
Download Opsgenie VMware vCenter zip file under C:\ directory.
C:\ ディレクトリの下にファイルを解凍します。
C:\opsgenie\opsgenie-integration\conf\opsgenie-integration.conf ファイルに API キーを貼り付けます。
vSphere Client を実行します。
vSphere Client で [Actions (アクション)] をクリックします。
[Alarms (アラーム)]、[New Alarm (新しいアラーム)] の順に選択します。
[Configuration (構成)] セクションで、[Run Command (コマンドの実行)] アクションを追加し、vcenter2opsgenie パスを指定します。
8. アラームを保存します。
VMware vCenter での Opsgenie プラグイン設定
プラグインは golang-executable ファイル (vcenter2opsgenie としてプラグインに含まれる) を使用して、Opsgenie でアラートを作成します。イベント時にこのファイルを実行して Opsgenie でアラートを作成するように、VMware vCenter を構成します。
apiKey の設定は必須です。その他の設定パラメーターは既定値に設定され、ほとんどの VMware vCenter 実装で動作しますが、変更が必要な場合もあります。
設定パラメーター
apiKey - Copy the API key from the VMware vCenter integration created above. vcenter2opsgenie uses this key to authenticate to Opsgenie. The API key is also used to identify the right integration configuration to process alerts.
teams - Teams field is used to specify which teams should be notified for the VMware vCenter alerts. This field is used to set the default teams field value. Modify this field to route different alerts to different teams in Opsgenie VMware vCenter integration, Advanced Settings page.
tags - Tags field is used to specify the tags of the alert that created in Opsgenie.
logPath - ログ ファイルの完全なパスを指定します(既定値は C:\opsgenie\vcenter2opsgenie.log)。
vcenter2opsgenie.http.proxy.enabled - vcenter2opsgenie.http.proxy.enabled フィールドは、外部プロキシ設定を有効/無効にするためのフィールドです。既定値は false です。
vcenter2opsgenie.http.proxy.host - プロキシのホスト。
vcenter2opsgenie.http.proxy.port - プロキシのポート。
vcenter2opsgenie.http.proxy.scheme - プロキシ接続プロトコル。プロキシ サーバーに応じて http または https になる場合があります。既定値は http です。
vcenter2opsgenie.http.proxy.username - プロキシ認証ユーザー名。
vcenter2opsgenie.http.proxy.password - プロキシ認証パスワード。
opsgenie.api.url - 別のドメインから Opsgenie を使用している場合 (例: EU、サンドボックス)、この設定を更新する必要があります。
golang 実行可能ファイルを設定するには、次の 3 つの方法があります。
conf ファイルからの設定:
Configure from C:\opsgenie\conf\opsgenie-integration.conf file. Configuring from conf file overwrites the configurations made in the script.
Golang フラグを使用して設定:
Configure by entering flags to the command of the notification created in VMware vCenter, which is described in "Configure Triggers in VMware vCenter" section. Use -apiKey flag for the apiKey.
If you want to send additional custom arguments, you can add them after the flags as: customArgName1 customArgValue1 customArgName2 customArgValue2
You can parse custom arguments by adding {{_payload.customArgName}}
to wherever you need on the input fields.
For more information about using raw parameters please visit the Dynamic Fields document.
スクリプトからの設定:
apiKey vcenter2opsgenie.go スクリプトを設定します。スクリプトを再構築し、新しい実行可能ファイルを /usr/bin ディレクトリに配置します。vcenter2opsgenie.go の場所と go スクリプトの構築方法については、「ソース」セクションを参照してください。
VMware vCenter から送信されるペイロードのサンプル
アラートのペイロードを作成します。
JSON
{
"VMWARE_ALARM_ALARMVALUE": "Event details",
"VMWARE_ALARM_DECLARINGSUMMARY": "([Event alarm expression: Alarm created; Status ",
"VMWARE_ALARM_EVENTDESCRIPTION": "Reconfigured testAlarm 'testAlarm' on Datacenter. \n \nModified: \n \ninfo.expression.expression: ((comparisons ",
"VMWARE_ALARM_EVENT_DATACENTER": "Datacenter",
"VMWARE_ALARM_EVENT_USERNAME": "VSPHERE.LOCAL\\Administrator",
"VMWARE_ALARM_ID": "alarm-310",
"VMWARE_ALARM_NAME": "OpsgenieAlarm",
"VMWARE_ALARM_NEWSTATUS": "Green",
"VMWARE_ALARM_OLDSTATUS": "Yellow",
"VMWARE_ALARM_TARGET_ID": "datacenter-21",
"VMWARE_ALARM_TARGET_NAME": "Datacenter",
"VMWARE_ALARM_TRIGGERINGSUMMARY": "Event: Alarm reconfigured (1978)\nSummary: Reconfigured alarm 'testAlarm' on Datacenter. \n \nModified: \n \ninfo.expression.expression: ((comparisons "
}
このペイロードは Opsgenie によって次のように解析されます。
JSON
{
"alarmValue": "Event details",
"declaringSummary": "([Event alarm expression: Alarm created; Status ",
"eventDescription": "Reconfigured testAlarm 'testAlarm' on Datacenter. \n \nModified: \n \ninfo.expression.expression: ((comparisons ",
"eventDatacemter": "Datacenter",
"eventUsername": "VSPHERE.LOCAL\\Administrator",
"alarmID": "alarm-310",
"alarmName": "OpsgenieAlarm",
"newStatus": "Green",
"oldStatus": "Yellow",
"targetID": "datacenter-21",
"targetName": "Datacenter",
"triggeringSummary": "Event: Alarm reconfigured (1978)\nSummary: Reconfigured alarm 'testAlarmæ' on Datacenter. \n \nModified: \n \ninfo.expression.expression: ((comparisons "
}
この内容はお役に立ちましたか?