REST API を使用した ESC の正常性のモニタリング
ESC は、ESC およびそのサービスの正常性を監視するためのサードパーティ製ソフトウェアに REST API を提供します。サードパーティ製ソフトウェアは API を使用して ESC が正常な状態であるかを定期的に照会し、ESC が稼働中であるかどうかを確認できます。クエリへの応答として、API はステータスコードとメッセージを提供します。詳細については、表 1を参照してください。HA セットアップでは、仮想 IP(VIP)をモニタリング IP として使用する必要があります。戻り値で、ESC HA ペアの全体的な状態が示されます。詳細については、表 3を参照してください。
ESC の正常性を監視する REST API は次のとおりです。
GET to https://<esc_vm_ip>:8060/esc/health
(注) |
|
次に、エラー状態のヘルス API のモニタリングの応答を示します。
JSON 応答の例:
<?xml version="1.0" encoding="UTF-8" ?>
<esc_health_report>
<status_code>{error status code}</status_code>
<message>{error message}</message>
</esc_health_report>
<?xml version="1.0" encoding="UTF-8" ?>
<esc_health_report>
<status_code>2010</status_code>
<message>ESC service is being provided. ESC AA cluster one or more node(s) not healthy</message>
<nodes>
<node>
<name>aa-esc-1.novalocal</name>
<status>HEALTHY</status>
<datacenter>dc1</datacenter>
<services>
<service>
<name>escmanager</name>
<status>running</status>
<is_expected>True</is_expected>
</service>
<service>
<name>elector</name>
<status>leader</status>
<is_expected>True</is_expected>
</service>
<service>
<name>drbd</name>
<status>active</status>
<is_expected>True</is_expected>
</service>
<service>
<name>pgsql</name>
<status>running</status>
<is_expected>True</is_expected>
</service>
...
</services>
</node>
<node>
<name>aa-esc-2.novalocal</name>
<status>HEALTHY</status>
<datacenter>dc1</datacenter>
<services>
<service>
<name>escmanager</name>
<status>running</status>
<is_expected>True</is_expected>
</service>
<service>
<name>elector</name>
<status>follower</status>
<is_expected>True</is_expected>
</service>
<service>
<name>drbd</name>
<status>standby</status>
<is_expected>True</is_expected>
</service>
<service>
<name>pgsql</name>
<status>stopped</status>
<is_expected>True</is_expected>
</service>
...
</services>
</node>
<node>
<name>aa-esc-3.novalocal</name>
<status>NOT_HEALTHY</status>
<datacenter>dc1</datacenter>
<services>
<service>
<name>escmanager</name>
<status>stopped</status>
<is_expected>False</is_expected>
</service>
<service>
<name>elector</name>
<status>follower</status>
<is_expected>True</is_expected>
</service>
<service>
<name>vimmanager</name>
<status>running</status>
<is_expected>True</is_expected>
</service>
...
</services>
</node>
</nodes>
</esc_health_report>
XML 応答と JSON 応答は、ヘルス API のモニタリングでもサポートされています。
API 応答が成功すると、 stage という追加のフィールドが導入されます。
<?xml version="1.0" encoding="UTF-8" ?>
<esc_health_report>
<status_code>{success status code}</status_code>
<stage>{Either INIT or READY}</stage>
<message>{success message}</message>
</esc_health_report>
stage フィールドには、INIT パラメータまたは READY パラメータが含まれています。
INIT:INIT パラメータは ESC が設定パラメータの設定や VIM コネクタの登録などの事前プロビジョニング要求を受け入れる初期段階のものです。
READY:ESC は、このパラメータを使用した展開、展開解除などのあらゆるプロビジョニング要求に対応できます。
ESC の正常性の状態が次のステータスコードとメッセージで示されます。2000 シリーズのステータスコードは、ESC が動作していることを意味します。5000 シリーズのステータスコードは、1 つ以上の ESC コンポーネントが稼働していないことを意味します。
ステータス コード |
メッセージ |
||
---|---|---|---|
2000 |
ESC サービスが実行されています。(ESC services are running.) |
||
2010 |
ESC サービスが提供されています。(ESC services are being provided.)ESC AA クラスタの 1 つまたは複数のノードが正常ではありません。(ESC AA cluster one or more node(s) not healthy.) |
||
2040 |
ESC サービスが実行されています。VIM が設定されており、ESC が VIM への接続を初期化しています。(ESC services running. VIM is configured, ESC initializing connection to VIM.) |
||
5010 |
ESC サービス、ESC_MANAGER が実行されていません。(ESC service, ESC_MANAGER is not running.) |
||
5020 |
ESC サービス、CONFD が実行されていません。(ESC service, CONFD is not running.) |
||
5030 |
ESC サービス、MONA が実行されていません。(ESC service, MONA is not running.) |
||
5040 |
ESC サービス、VIM_MANAGER が実行されていません。(ESC service, VIM_MANAGER is not running.) |
||
[5060] |
ESC サービス、ETSI が実行されていません。(ESC service, ETSI is not running.) |
||
5070 |
Vimコネクタ ID [vimId_1,vimId_2,...,vimId_N] がダウンしています。(Vim Connector IDs [vimId_1,vimId_2,...,vimId_N] are down.) または 25 個のうち 6 個の VIM コネクタがダウンしています。(6 of 25 VIM Connectors are down.)
|
||
5080 |
NFVO サービスは使用できません。(The NFVO service is not available.) |
||
5090 |
複数の ESC サービス(ConfD や Mona など)が実行されていません。(More than one ESC service (for example, confd and mona) are not running.) |
||
5091 |
1 つ以上の ESC サービスが実行されていないため、NFVO サービスを使用できません。(One or more ESC services is not running and the NFVO service is not available.) |
||
5092 |
VIM コネクタ ID [vim-1] がダウンしています。(VIM Connector ID [vim-1] is down.)NFVO サービスは使用できません。(The NFVO service is NOT available.) |
ステータス コード |
メッセージ |
---|---|
2000 |
ESC サービスが実行されています(アクティブ/アクティブセットアップ)。(ESC services are running (Active-Active setup).) |
2010 |
ESC サービスが提供されています。(ESC services are provided.)ESC アクティブ/アクティブクラスタの 1 つまたは複数のノードが正常ではありません。(In ESC Active/Active cluster one or more node(s) are not healthy.) |
5000 |
ESC サービスが提供されていません。ESC AA クラスタが正常ではありません(ESC services not being provided, ESC AA cluster not healthy) |
(注) |
ESC HA モードでは、DRBD セットアップでのみ ESC HA を参照します。ESC HA セットアップの詳細については、『Cisco Elastic Services Controller Install Guide』を参照してください。 |
次の表では、スタンドアロン ESC のステータスメッセージと、成功シナリオと障害シナリオの HA について説明します。ESC のスタンドアロンおよび HA のセットアップの詳細については、『Cisco Elastic Services Controller Install Guide』を参照してください。
Success(成功) |
Partial Success(一部成功) |
Failure(失敗) |
|||||
---|---|---|---|---|---|---|---|
スタンドアロン Esc |
応答はヘルス API のモニタリングから収集され、ステータスコードは 2000 になります。 |
なし |
|
||||
HA の ESC(アクティブ/スタンバイ) |
応答はヘルス API のモニタリングから収集され、ステータスコードは 2000 になります。 |
応答はヘルス API のモニタリングから収集され、ステータスコードは 2010 になります。これは、ESC スタンバイノードが ESC HA の ESC アクティブノードに接続できないことを示します。ただし、これはノースバウンドへの ESC サービスには影響しません。 |
|
||||
HA(アクティブ/アクティブ)のESC |
応答はヘルス API のモニタリングから収集され、ステータスコードは 2000 になります。 |
応答はヘルス API のモニタリングから収集され、ステータスコードは 2010 になります。この状態は、ESC サービスは提供されているが、ESC AA クラスタ内の 1 つまたは複数のノードが正常ではないことを示します。ただし、これはノースバウンドへの ESC サービスには影響しません。 |
|
ESC ヘルスモニタの機能拡張
ESC ヘルスモニタ API の機能が次のように拡張されています。
-
ESC コンポーネントのステータスが判別されます。
-
接続と認証の詳細を簡素化するために、SNMP エージェント用の単一連絡ポイントが提供されます。
ESC モニタコンポーネントにヘルスモニタ API が実装されました。この API を使用して、ダウンした ESC コンポーネントのリストが提供されます。ヘルスモニタは、各 ESC コンポーネントのパブリックおよび内部ヘルス URL を使用して、個々のステータスを判別します。たとえば、VNFM ステータスは、ヘルスモニタが次の URL を実行して判別します。
https://localhost:8252/etsi/health
URL によって ESC コンポーネントのステータスが判別され、該当するステータスコードとステータスメッセージが SNMPトラップ通知の一部としてを返されます。
VIM 接続ステータス用の ESC ヘルスモニタ API
ESC ヘルスモニタ API が拡張され、新しい ESC ヘルスモニタ API(URL)を使用して VIM コネクタの詳細を照会できるようになりました。
http://<escmanager-host>:8088/escmanager/vims
ESC スタンドアロン型および HA 設定では、アクティブノードに対して URL が実行されます。ESC アクティブ/アクティブ設定では、すべてのノードに対して URL が実行されます
ヘルスモニタペイロードは、設定されたすべての VIM コネクタのバイナリステータスを判断するために必要な追加情報を返します。VIM コネクタのステータスは、正常またはダウンです。
ESC ヘルスモニタ API は、単一の VIM コネクタが正常かどうかを判断するために、VIM コネクタが定義されている VIM に対してクエリを実行します。クエリの結果に CONNECTION_SUCCESSFUL の内部ステータスが含まれる場合、その VIM コネクタは正常です。
クエリに失敗した場合、その VIM コネクタはダウンしています。
さらに、返されるステータスメッセージには、ダウンしている特定の VIM ID のカンマ区切りリストが含まれます。この例は、ESC ヘルスモニタが 2 つのダウンした VIM コネクタのペイロードを返しています。
{
"message": "VIM Connector IDs [vim-connector-site-1A, vim-connector-site-1C] are down.",
"status_code": "5070"
}
VIM コネクタの SNMP トラップ通知の詳細については、SNMP トラップ通知を使用した ESC の正常性のモニタリングを参照してください。
ESC ヘルスモニタは、デフォルトでは VIM コネクタのステータスをモニタしません。ESC ヘルスモニタを有効にするには、SNMP トラップ通知の「VIM および NFVO モニタリング用の SNMP トラップの有効化」を参照してください。
NFVO 接続ステータス用の ESC ヘルスモニタ API
ESC ヘルスモニタ API は、NFVO への接続状況を判別できます。ESC は、NFVO から ESC への接続状況を照会するための API を備えています。NFVO は、標準の SOL003 定義 API クエリに応答します。URL は次のとおりです。
https://<vnfm-host>:8252/etsi/nfvo/health
NFVO が正常に認証され、SOL003 定義 API に応答する場合、NFVO は到達可能で正常です。
この例は、NFVO が設定されているが到達不能な場合に ESC ヘルスモニタが返すペイロードを示しています。
{
"message": "The NFVO service is NOT available.",
"status_code": "5080"
}
ESC ヘルスモニタは、デフォルトでは NFVO の接続ステータスをモニタしません。ESC ヘルスモニタを有効にするには、SNMP トラップ通知の「VIM および NFVO モニタリング用の SNMP トラップの有効化」を参照してください。
ETSI 展開の詳細については、Cisco Elastic Services Controller 5.2 ETSI NFV MANO ユーザガイドを参照してください。