NorthStarとHealthBotの統合
概要
NorthStar ControllerとHealthBot製品の統合は継続的な開発作業であり、段階的なアプローチでリリースされています。このトピックでは、NorthStar コントローラリリース5.1.0とHealthBotリリース2.1の統合ステータスについて説明します。
NorthStar Controllerは、サイドバイサイドインストールシナリオで、HealthBotを分析コレクターとして使用できます。NorthStarとHealthBotは個別にインストールおよび管理しますが、NorthStarの分析コレクター機能は、ElasticsearchではなくHealthBotによって処理されるように構成します。NorthStar Controllerリリース5.1.0では、(マルチベンダーサポートではなく)ジュニパーノードのみがサポートされており、HealthBotで処理できるのは以下の分析コレクションのみです。
Junos Telemetry Interface(JTI)LSP 統計情報
JTIインターフェイス統計(論理および物理)
RPM プローブを使用したリンク遅延統計
LDP show コマンドを使用した LDP デマンド統計
図1 は、HealthBotとNorthStarのコンポーネント間の関係をまとめたものです。番号は、次のプロセスに対応しています。
NorthStarは、デバイスリストとプロファイル情報をHealthBotにプッシュします。
NorthStarは、ネットワークデバイスからのデータ収集に使用する一連のルールをHealthBotに提供します。
NorthStarルールにより、HealthBotはAMQPを介したライブサンプルデータ収集についてNorthStarに自動的に通知できます。
NorthStar node.jsとNorthStarレポートジェネレーターは、ジンジャテンプレートに基づいてHealthBotデータベースにクエリを実行します。
HealthBot からの統計とデータは、NorthStar UI またはその他のノースバウンド インターフェイス(NBI)で表示できます。

ルールとプレイブック、および一般的な HealthBot の操作については、HealthBot のドキュメントを参照してください。参考までに、以下の基本的なHealthBot用語を提供します。
ヘルスボット用語 |
説明 |
---|---|
ルール |
ネットワークまたはJunosデバイスから特定の情報を抽出するために必要なコンポーネントまたはブロックのパッケージ。ルールは、分析アプリケーション用に調整されたドメイン固有言語 (DSL) に準拠しています。 |
脚本 |
特定のユース ケースに対処するためのルールのコレクション。 |
プレイブックインスタンス |
デバイスまたはネットワーク グループに適用されるプレイブックの特定のインスタンス。 |
ユーザー定義関数 (UDF) |
ユーザー定義関数は、ルールの内部で使用されます。 |
NorthStarデータ収集ルールとプレイブックでHealthBotを更新
HealthBot が収集データを NorthStar に提供する準備をするには、次の手順を実行します。
HealthBot サービスが稼働していることを確認します。
python3 モジュール リクエストと pika を HealthBot サーバーにインストールします。例えば:
pip3 install requests; pip3 install pika
NorthStarルールをNorthStarアプリケーションサーバーからHealthBotサーバー上の一時ディレクトリにコピーします。
[root@northstar]# cp /opt/northstar/northstar_bundle_x.x.x/hb_config/hb-rules-config.tar.gz /var/tmp
HealthBot サーバーで、ルール ファイルを解凍します。
[root@healthbot]# tar xvf hb-rules-config.tar.gz
HealthBot サーバーで、NorthStar ルールとプレイブックを HealthBot に挿入して HealthBot UI に表示されるようにし、NorthStar のユーザー定義関数 (UDF) を更新するスクリプトを実行します。このスクリプトは、NorthStar と HealthBot 間の通信に必要な資格情報も取得します。
[root@healthbot]:~/ns/installation# ./install-ns-rules.sh
このスクリプトは、次のプロンプトを表示します。
NorthStarサーバーのIPアドレスまたはVIPアドレスあるいはホスト名
NorthStar管理者のユーザー名とパスワード
HealthBotアプリケーションサーバーのIPアドレス
HealthBot 管理者のユーザー名とパスワード
スクリプトの進行状況が表示されます。
root@healthbot:~/ns/installation# ./install-ns-rules.sh Copying config file /opt/northstar/data/northstar.cfg from Northstar APP server, Please enter below info --------------------------------------------------------------------------------------------------------- Please enter Northstar application server IP/VIP address or host name: 10.53.64.97 Please enter Northstar Web Admin username: admin Please enter Northstar Web Admin password: Please enter HealtBot application server IP address: 10.53.64.96 Please enter HealthBot Web Admin username: admin Please enter HealthBot Web Admin password: retrieving config file from application server... Saving to /root/ns/input/northstar.cfg Copying NS input files to /var/local/healthbot/input Starting Northstar rules and playbook upload/creation Rule/yml file directory: /root/ns/rules Successfully import the yml file: ns-ldp-demand-stats.yml Successfully import the yml file: ns-rpm-probe-ifl.yml Successfully import the rule file: ns-jti-logical-interface.rule Successfully import the rule file: ns-jti-label-switched-path.rule Successfully import the rule file: ns-ldp-demand-stats.rule Successfully import the rule file: ns-jti-physical-interface.rule Successfully import the rule file: ns-rpm-probe-ifl.rule Successfully created the playbook: "northstar" Updating UDF.... Running /root/ns/installation/udf-config.sh in iagent engine.. Success! See /tmp/.iagent_modification.log for logs Running /root/ns/installation/udf-config.sh in jtimon engine.. Success! See /tmp/.jtimon_modification.log for logs Running /root/ns/installation/udf-config.sh in fluentd engine.. Success! See /tmp/.fluentd_modification.log for logs Running /root/ns/installation/udf-config.sh in telegraf engine.. Success! See /tmp/.telegraf_modification.log for logs Running /root/ns/installation/udf-config.sh in itsdb engine.. Success! See /tmp/.itsdb_modification.log for logs
HealthBot サーバーで次のスクリプトを実行して、HealthBot と NorthStar の間の接続を確認します。
[root@healthbot]# /ns_config/installation/ns_setup.py -t Test connectivity with input/northstar.cfg # mq_host=10.53.64.97 mq_port=5672 mq_username=northstar mq_password_enc=eF0A0DhJ0GiKcHlAfEnFgMpB Connected to rabbitmq on 10.53.64.97 successfully
スクリプトが正常に完了すると、 図 2 に示すように、HealthBot UI に NorthStar ルールが表示されます。

また、 図 3 に示すように、NorthStar プレイブックが表示されていることも確認できます。

NorthStar プレイブックをクリックして、NorthStar ルールがプレイブックに関連付けられていることを確認します ( 図 4 参照)。必要に応じて、ここからルールを削除できます。

NorthStar 側を設定する
HealthBot から分析データを受信するように NorthStar を準備するには、次の手順を実行します。
config-healthbot-collector オプションを指定して net_setup.py スクリプトを実行して、コレクションの種類をデフォルト (Elasticsearch) から HealthBot に変更します。
[root@northstar]# /opt/northstar/utils/net_setup.py --config-healthbot-collector
このスクリプトは、変更を確認するプロンプトを表示し、次の情報の入力を求めます。
HealthBotウェブサーバーのIPアドレス
HealthBot UIのユーザー名とパスワード
HealthBot データベースの IP アドレス(これは通常、HealthBot Web サーバーの IP アドレスと同じです)
その後、スクリプトは構成ファイルを更新し、NorthStar ウェブサーバーを再起動します。プロセスが完了すると、成功メッセージが表示されます。
NorthStar CLI を使用して、HealthBot 関連のパラメーターを設定します。
[root@ns1 root]# /opt/northstar/utils/cmgd_cli root@ns1> edit Entering configuration mode [edit] root@ns1# set northstar analytics healthbot openconfig-port 32767 [edit] root@ns1# set northstar analytics healthbot iagent-port 830 [edit] root@ns1# set northstar analytics healthbot native-port 4000 [edit] root@ns1# set northstar analytics healthbot device-group-name northstar [edit] root@ns1# set northstar analytics healthbot playbook-name northstar [edit] root@ns1# set northstar analytics healthbot playbook-instance ns [edit] root@ns1# set northstar analytics healthbot rules northstar/juniper-jti-label- switched-path,northstar/juniper-jti-logical-interface,northstar/juniper-jti- physical-interface,northstar/juniper-ldp-demand-stats,northstar/juniper-rpm-probe-ifl; [edit] root@ns1# commit root@ns1# exit Exiting configuration mode root@ns1> show configuration northstar analytics healthbot openconfig-port 32767; iagent-port 830; native-port 4000; device-group-name northstar; playbook-name northstar; playbook-instance ns; rules northstar/juniper-jti-label-switched-path,northstar/juniper-jti-logical- interface,northstar/juniper-jti-physical-interface,northstar/juniper-ldp-demand- stats,northstar/juniper-rpm-probe-ifl;
JTIおよびRPMプローブデータをHealthBotサーバーに送信するように、ネットワーク内の各ジュニパーデバイスを設定します。手順については、 JTIテレメトリデータとRPM統計をデータコレクタに送信するためのルーターの設定 を参照してください。
NorthStar UIで、[>Device Profile]に移動してAdministrationデバイスプロファイル情報をHealthBotにプッシュし、NorthStarプレイブックインスタンスを適用します。
コレクションの種類を HealthBot に設定しているため、NorthStar UI の [デバイス プロファイル] ウィンドウには、 図 5 に示すように [デバイスを HealthBot に更新する] ボタンが含まれています。
図5:[デバイスの更新]ボタンのある[デバイスプロファイル]ウィンドウ
ボタンをクリックする前にデバイスを選択しないでください。ボタンをクリックすると、NorthStarによって管理されているすべてのジュニパーデバイスのすべてのデバイス情報がHealthBotに更新されます。プロセスが完了すると、成功メッセージが表示されます。
デバイス情報が HealthBot と共有されたことを確認するには、 図 6 に示すように、[デバイス] の下にある HealthBot UI ダッシュボードを確認します。HealthBotにプッシュされたすべてのジュニパーデバイスがここに一覧表示されます。デバイス名のいずれかをクリックすると、ポップアップウィンドウにプロファイル情報の詳細が表示されます。
図6:HealthBotダッシュボードのNorthStarデバイス
図 6 にも、NorthStar デバイス グループ (左端) が作成されていることに注目してください。グループの名前をクリックすると、HealthBotに情報をプッシュしたすべてのデバイスのリストが表示されます。
図 7 に示すように、HealthBot UI の [プレイブック] で、NorthStar プレイブック インスタンスが作成されていることを確認できます。ディスプレイは、プレイブックの 1 つのインスタンスが実行されていることを示します。
図 7: HealthBot UIの NorthStar Playbook インスタンス
プレイブック名の横にある矢印をクリックして、デバイスグループ、デバイス、ルールを含むインスタンスの詳細を表示します。
NorthStar UIでのデータの表示
収集されたデータを NorthStar UI で表示することは、コレクションの種類としての HealthBot と変わりませんが、NorthStar/HealthBot 統合のこのフェーズでは、いくつかの制限があります。以下は、まだサポートされていません。
LSPトラフィックチャートの合計
LSP、ノード、インターフェイス、インターフェイス遅延チャートの上位トラフィック
ネットフロー コレクション
SR 統計(SID トラフィック)
需要時レポートと需要グループレポート
メモ:これらのレポートは、Elasticsearch ネイティブ コレクションを使用して使用できます。