ja:documentation:pandorafms:monitoring:16_ncm

ネットワーク設定管理 (NCM)

Enterprise versionPandora FMS NCM Server (Network Config Management) allows interacting with any network device, through Telnet and SSH protocols, to manage its configuration, perform backups, restore the configuration of the devices from the backups made and even perform custom executions with them.

Enterprise版Pandora FMS NCM サーバ(ネットワーク設定管理)を使用すると、Telnet および SSH プロトコルを介して任意のネットワークデバイスと対話し、設定の管理、バックアップの実行、作成したバックアップからのデバイス設定の復元、さらにはカスタム実行が可能です。

To carry out all of these tasks, it is based on a system of templates by Manufacturer-Model that will allow to customize all the executions the network devices will carry out, having the control and knowledge of all the executions that will be carried out in each and every one of the above mentioned network devices.

これらのタスクの実行は、メーカ - モデル によるテンプレートのシステムに基づいています。ネットワークデバイスで実行できる処理のデータを持っており、すべての処理をカスタマイズすることができます。上記のそれぞれの処理やすべてを実行することができます。

To enable this feature in Pandora FMS, it is necessary for the NCM service to be enabled in pandorafms server.

Pandora FMS でこの機能を有効化するには、pandorafms サーバで NCM サービスを有効化する必要があります。

The following parameters must be correctly configured in pandora_server.conf file:

pandora_server.conf ファイルで、次のパラメータを設定する必要があります。

# Network manager configuration server (PANDORA FMS ENTERPRISE ONLY).
ncmserver 1

# Threads for NCM server (PANDORA FMS ENTERPRISE ONLY).
ncmserver_threads 1

# NCM utility to execute SSH and Telnet connections.
ncm_ssh_utility /usr/share/pandora_server/util/ncm_ssh_extension

Once enabled, a new server will appear in the server view and all the sections corresponding to this feature will be enabled in the console.

有効化したら、サーバ一覧に新たなサーバが表示され、コンソール上でこの機能に関連するセクションが有効化されます。


To display the menus for everything related to NCM server each user must have the corresponding ACL rights. See more information about that in this article.


NCM サーバに関連するすべてのメニューを表示するには、各ユーザが対応するACL権限を持っている必要があります。詳細はこちらを参照してください。

If you use the Enterprise Alternative Server packages, install libnsl and openssh-clients for the feature to work properly.

Enterprise 代替サーバパッケージ を利用している場合、この機能が正しく動作するためには libnsl および openssh-clients をインストールしてください。

Before starting work, you must make sure that the system has the manufacturer and model(s) of the devices to be used defined. To that end use the Vendor and Model editors.

利用開始する前に、利用するデバイスのベンダとモデルが定義されていることを確認する必要があります。それには、ベンダ および モデル エディタを利用します。

You will find these editors in the ConfigurationNetwork Config Manager section.

設定(Configuration)ネットワーク設定管理(Network Config Manager) セクションに、これらのエディタがあります。

This is only a descriptive definition. The logic is applied in the network equipment Templates.

これは説明的な定義にすぎません。 ロジックは、ネットワーク機器のテンプレートに適用されます。

Templates are applied on a Manufacturer and on one or more models. Templates define how to interact with a network computer. The NCM and the equipment can be connected through Telnet or SSH. In both cases it will be necessary to provide one or more sets of credentials (in the case of the Cisco manufacturer the access username/password and the enable mode password). In other devices there may be two pairs of credentials.

テンプレートは、メーカーと1つ以上のモデルに適用されます。 テンプレートは、ネットワーク機器との対話方法を定義します。 NCM と機器は、Telnet または SSH を介して接続できます。 どちらの場合も、1つ以上の資格情報のセットを提供する必要があります(Cisco の場合は、アクセスユーザ名/パスワードと enable モードのパスワード)。他のデバイスでは、2組の資格情報が存在する場合があります。

For the credentials, use Pandora FMS internal credentials system that allows to reuse them without knowing the details. That way the administrator may specify different user/password “pairs” with an identifier, and an operator may use them without seeing the content. In NCM, these users and passwords are passed to the dialog with the device through macros.

認証情報には、Pandora FMS 内部認証情報システム を使用して、詳細を知らなくても再利用できるようにします。 このようにして、管理者は識別子を使用して異なるユーザ/パスワードの ペア を指定でき、オペレーターは内容を見ずにそれらを使用できます。 NCM では、これらのユーザとパスワードは、マクロを介してデバイスとのダイアログに渡されます。

Macros in the dialog with the network device

ネットワークデバイスに対するダイアログにおけるマクロ

  • _enablepass_ : It will be replaced by the password field of the advanced key associated to the agent.
  • _username_ : It will be replaced by the username field of the agent's access key.
  • _password_ : It will be replaced by the password field of the agent's access key.
  • _advusername_ : It will be replaced by the username field of the enable advanced key.
  • _advpassword_ : It will be replaced by the password field of the enable advanced key. It is an alias of _enablepass_ and both can be used in the templates since they are equivalent to the same value.
  • _applyconfigbackup_ : It expands in as many commands as configuration lines the current backup has. It is applied line by line, as they are applied in Cisco® devices.
  • _enablepass_ : エージェントに関連付けられた拡張キーの パスワード フィールドに置き換えらえます。
  • _username_ : エージェントのアクセスキーの ユーザ名 フィールドに置き換えられます。
  • _password_ : エージェントのアクセスキーの パスワード に置き換えられます。
  • _advusername_ : enable 拡張キーの ユーザ名 フィールドに置き換えられます。
  • _advpassword_ : enable 拡張キーの パスワード フィールドに置き換えれれます。_enablepass_ の別名です。同じ値を参照しており、どちらもテンプレートで利用可能です。
  • _applyconfigbackup_ : 現在のバックアップにある設定行と同じ数のコマンドが展開されます。 Cisco® デバイスに適用する場合、1行ずつ適用されます。

Click the Define a NCM template button (menu Management → Configuration → Network Config Manager) and click the Create button.

NCM テンプレート定義(Define a NCM template) ボタン (メニュー 管理(Management) → 設定(Configuration) → ネットワーク設定マネージャー(Network Config Manager)) をクリックし、作成(Create) ボタンをクリックします。

Fill the fields:

フィールドに入力します。

  • Name: NCM template name.
  • Vendors: Comma separated, a vendors list compatible with scripts defined within template.
  • Models: Comma separated, a model list compatible with scripts defined within template.
  • Script: Test: This script will be used to test devices availability.
  • Script: Get configuration: This script will be used to retrieve configuration from devices
  • Script: set configuration: This script will be used to apply configuration, previously backed up, to devices.
  • Script: get firmware: This script will be used to retrieve firmware version from devices.
  • Script: set firmware: This script will be used to upgrade firmware version of the devices.
  • Script: custom task:This script will be executed on the devices when selecting CUSTOM task.
  • 名前(Name): NCM テンプレート名。
  • ベンダ(Vendors): カンマ区切りの、テンプレート内で定義されたスクリプトと互換性のあるベンダー一覧。
  • モデル(Models): カンマ区切りの、テンプレート内で定義されたスクリプトと互換性のあるモデル一覧。
  • スクリプト: テスト(Script: Test): デバイスの可用性をテストするために使用されるスクリプト。
  • スクリプト: 設定取得(Script: Get configuration): デバイスから設定を取得するために使用されるスクリプト。
  • スクリプト: 設定(Script: set configuration): デバイスの設定、以前のバックアップをするために使用されるスクリプト。
  • スクリプト: ファームウエア取得(Script: get firmware): デバイスからファームウエアのバージョンを取得するために使用されるスクリプト。
  • スクリプト: ファームウエア設定(Script: set firmware): デバイスのファームウエアをアップグレードするために使用されるスクリプト。
  • スクリプト: カスタムタスク(Script: custom task): カスタム(CUSTOM) タスクを選択したときにデバイスで実行されるスクリプト。

These scripts only work if the user you log in with (via Telnet or SSH) works with user and password and does not have enable field enabled by default.

これらのスクリプトは、(Telnet または SSH 経由で)ログインするユーザがユーザとパスワードを利用し、デフォルトで enable フィールドが有効になっていない場合にのみ機能します。

テスト

A test connection is made to the device and ended without performing any operation.

デバイスへのテスト接続が行われ、操作を実行せずに終了します。

enable
expect:Password:\s*
_enablepass_
exit

The test connection is used to verify that you can actually connect to the device. It can be modified (expect:xxxx) to expect a certain response, such as Ready. This is only a basic example.

テスト接続は、実際にデバイスに接続できることを確認するために使用されます。 Ready などの特定の応答を期待するように変更 (expect:xxxx) することができます。 これは基本的な例にすぎません。

現在の設定の取得

This block is used to define the way to obtain the configuration of the active device. In this example (Cisco®), the running configuration of the device is obtained by executing the show running-config command inside the device:

このブロックは、現在のデバイスの設定を取得する方法を定義するために使用されます。 この例(Cisco®)では、デバイスの running configuration は、デバイス内で show running-config コマンドを実行することによって取得されます。

enable
expect:Password:\s*
_enablepass_ term length 0
capture:show running-config exit

capture:<comando> : It is used to capture as active configuration what is returned by the screen.

capture:<comando> : 画面に返す現在の設定を取得するために使われています。

ファームウエアバージョンの取得

Similar to the previous case, run the show version | i IOS Software command to retrieve the firmware version of the device, and as in the previous case, the capture command is used to capture the output of the command.

前の例と似ていますが、show version | i IOS Software コマンドを使用してデバイスのファームウェアバージョンを取得します。前の例と同様に、capture コマンドを使用してコマンドの出力を取得します。

enable
expect:Password:\s*
_enablepass_
term length 0
capture:show version | i IOS Software
exit

設定バックアップのリストア

In this execution, the macro _applyconfigbackup_ is used to apply all the configuration stored in the Backup previously stored in the Console.

これは、マクロ _applyconfigbackup_ を使用して前もってコンソール上にバックアップ保存されているすべての設定を適用します。

enable
expect:Password:\s*
_enablepass_
term length 0
config terminal
_applyconfigbackup_
exit

カスタムスクリプトの例

Example of a custom script in which the values of some SHH parameters of the device are changed. Any necessary modification or command execution can be applied.

デバイスの SSH パラメータの一部の値を変更するカスタムスクリプトの例です。必要な変更やコマンドの実行を適用できます。

enable
expect:Password:\s*
_enablepass_
conf term
ip ssh authentication-retries 4
ip tcp synwait-time 10
end
exit

All changes recorded in the device will be recorded when performing a firmware backup and you will have control of the changes made, both by reports and by screen (Web Consol PFMS):

デバイスに記録されたすべての変更はファームウェアバックアップの実行時に記録され、レポートと画面(Webコンソール)の両方で行われた変更を制御できます。

Within each of the agents that need to manage their remote configuration, associate a model to it.

リモート設定管理をする必要がある各エージェント内で、モデルを関連付けます。

This association will have to be done in the NCM section of the agent, where the following parameters must be selected:

この関連付けは、エージェントの NCM セクションで行う必要があります。ここで、次のパラメータを選択する必要があります。

  • Device manufacturer.
  • Device model.
  • Connection method: Type of connection to be made (Telnet or SSH).
  • Port: Port to use in the Telnet or SSH connection.
  • Credentials to access device: Credentials stored in Credential Store of Pandora FMS, which will be used to make the initial Telnet or SSH connection. It is necessary for the user to need both parameters when connecting.
  • Credentials to admin device: Credentials stored in Credential Store of Pandora FMS, which will be identified within the template selected in NCM template to be used, with the macros _advusername_ for the user and _enablepass_ or _advpassword_ for the password.
  • デバイスのベンダ(Device manufacturer).
  • デバイスモデル(Device model).
  • 接続手法(Connection method): 接続タイプ(Telnet または SSH)
  • ポート(Port): Telnet または SSH 接続で利用するポート番号
  • デバイスへアクセスする認証情報(Credentials to access device): Pandora FMS の認証情報ストア 内の認証情報で、Telnet または SSH 接続に利用されます。ユーザが接続するときは、両方のパラメーターが必要です。
  • admin の認証情報(Credentials to admin device): Pandora FMS の認証情報ストア 内の認証情報で、使用する NCM テンプレートで選択されたテンプレート内で利用されます。マクロはユーザの場合は _advusername_、パスワードの場合は _enablepass_ または _advpassword_ です。

Once the agent configuration is finished, it will be ready to manage its configuration, back up, obtain firmware, restore the device configuration from the backups made and even perform custom executions with them.

エージェントの設定が完了すると、設定の管理、バックアップ、ファームウェアの取得、作成したバックアップからのデバイス設定の復元、さらにはそれらを使用したカスタム実行が可能になります。

To upload the firmware files and create backups of them with FTP, you must do it in an encrypted way to have the highest possible security. See section “FTP configuration to receive data in Pandora FMS” and the use of vsFTPd. You must use SFTP with exclusive chroot in:

/var/spool/pandora/firmware/

See the Pandora FMS “Security Architecture” for a comprehensive overview of this issue.

ファームウェアファイルをアップロードし、FTP でそれらのバックアップを作成するには、暗号化された方法でそれを実行して、可能な限り最高のセキュリティを確保する必要があります。 “Pandora FMS にデータを取り込むための FTP 設定” および vsFTPd の使用を参照してください。 次の場所で排他的な chroot を使用して SFTP を使用する必要があります。

/var/spool/pandora/firmware/

これに関する統合的な内容は、Pandora FMS の “セキュリティアーキテクチャ” を参照してください。

If the configuration has been successfully completed, you may access the agent view or the Management → Configuration → Network Config Management section to perform all possible management on each of them.

設定が正常に完了した場合は、エージェント表示または 設定(Configuration)ネットワーク設定管理(Network Config Management) セクションにアクセスして、それぞれで可能なすべての管理を実行できます。

Click on the Get running-config button to start getting all this information. Clicking it will ask for confirmation and accepting it will take you to the configured devices overview, where you will see the task in progress until it is finished:

Get running-config ボタンをクリックして、すべての情報の取得を開始します。 クリックすると確認を求められ、これを受け入れると、設定されたデバイスの概要が表示され、完了するまで進行中のタスクが表示されます。

From this same view, you will be able to perform all the interactions defined in the template, watching your process.

この同じ画面から、処理を見ながら、テンプレートで定義されたすべての処理を実行できます。

At that moment all the options will have been enabled in the agent view to be able to update the saved configuration, update the backup and even restore the current configuration of the network device by the one of the backup stored in Pandora FMS.

その時点で、すべてのオプションがエージェント表示で有効になり、保存された設定を更新したり、バックアップを更新したり、Pandora FMS に保存されているバックアップの 1つによってネットワークデバイスの現在の設定を復元したりできるようになります。

In case the last downloaded version does not match the backup version, a window will appear with the differences between both versions:

最後にダウンロードしたバージョンがバックアップバージョンと一致しない場合は、両方のバージョンの違いを示すウィンドウが表示されます:

For each of the executions that are made of this feature whether they are successful or not, a new event will be created in Pandora FMS indicating which task has been made, if it has been completed or not and its failure in case it has not completed successfully.

成功したかどうかに関係なく、この機能の実行ごとに Pandora FMS に新しいイベントが作成され、タスクが完了したかどうか、および正しく完了しなかった場合は失敗した旨の情報を示します。

For the NCM feature there are three different ACL bits in which you may define the different users from the following defined bits:

NCM 機能には、次の定義済みビットからさまざまなユーザを定義できる 3つの異なる ACL ビットがあります。

View NCM data → You will only be able to see the agent view and see the information reflected on it without being able to apply any changes on it.

NCM データ参照(View NCM data) → エージェント表示を参照でき、それに反映されている情報を見ることはできますが、変更を適用することはできません。

Operate NCM → You will be able to not only see the view, but also to perform the executions you wish on the agents and on the NCM view.

NCM 操作(Operate NCM) → 参照できるだけでなく、エージェントおよび NCM 表示で必要な処理を実行することもできます。

Manage NCM → With this permission you will be able to generate templates, models and new manufacturers in addition to the executions already performed by Operate NCM.

NCM 管理(Manage NCM) → この権限があれば、NCM 操作(Operate NCM) によってできる実行に加えて、テンプレート、モデル、および新しいメーカーを設定できます。

Pandora FMS ドキュメント一覧に戻る

  • ja/documentation/pandorafms/monitoring/16_ncm.txt
  • 最終更新: 2023/12/28 01:50
  • by 127.0.0.1