差分
このページの2つのバージョン間の差分を表示します。
次のリビジョン | 前のリビジョン | ||
ja:documentation:pandorafms:technical_reference:04_anexo_plugins_considerations [2022/09/16 21:41] – 作成 - 外部編集 127.0.0.1 | ja:documentation:pandorafms:technical_reference:04_anexo_plugins_considerations [2024/10/11 22:53] (現在) – [自動検出処理] junichi | ||
---|---|---|---|
行 1: | 行 1: | ||
====== プラグイン開発において考慮すべき点 ====== | ====== プラグイン開発において考慮すべき点 ====== | ||
+ | |||
{{indexmenu_n> | {{indexmenu_n> | ||
[[ja: | [[ja: | ||
+ | <wrap #ks1 /> | ||
===== 概要 ===== | ===== 概要 ===== | ||
- | The plugins allows to Pandora FMS to get information that requires | + | Plugins allow Pandora FMS to get information that requires complex |
- | プラグインにより Pandora は、複雑な処理を必要とするものや、複雑なシステムや API を利用する必要のある情報収集を実行することができます。プラグインの例をあげると、複雑な処理が必要な Oracle データベースのモニタリングや、何らかの自動検出処理があります。他には、Goliat ([[: | + | プラグインにより Pandora は、複雑な処理を必要とするものや、複雑なシステムや API を利用する必要のある情報収集を実行することができます。プラグインの例をあげると、複雑な処理が必要な Oracle データベースのモニタリングや、何らかの自動検出処理があります。他には、Goliat ([[: |
+ | |||
+ | <wrap #ks2 /> | ||
===== 実装とパフォーマンスの違い ===== | ===== 実装とパフォーマンスの違い ===== | ||
- | Pandora FMS offers two possibilities when executing plugins: execution in the [[:en: | + | Pandora FMS offers two possibilities when executing plugins: execution in the [[en: |
- | Pandora のプラグイン実行には、[[: | + | Pandora のプラグイン実行には、[[: |
- | サーバプラグインは、収集する情報ごとに個々に実行されます。サーバプラグインの実行は、重くなく、一つの種類の情報を取得するのを簡単な処理にする必要があるため、とても難しいです。特定の | + | * Server plugins do independent executions to collect each information piece. The server plugin execution is very difficult so it is only possible for " |
+ | * Software agent plugins allow to obtain several modules at the same time and for that reason they are much more flexible than server plugins. They are perfect for plugins that need several queries to get an information piece; they allow more flexibility to programmers so it is possible to return several modules at the same time. | ||
- | エージェントプラグインは、同時に複数のモジュールの情報を取得することができます。このことにより、サーバプラグインよりより柔軟性があります。一つの情報を取得するのに多くの処理が必要なプラグインに適しています。そのため、同時に複数のモジュールの値を返すことができ、開発者にとってより柔軟性があります。 | + | * サーバプラグインは、収集する情報ごとに個々に実行されます。サーバプラグインの実行は、重くなく、一つの種類の情報を取得するのを簡単な処理にする必要があるため、とても難しいです。特定の HTML をパースするプラグインは、多くの処理を実装せずにサーバに負荷をかけないようにする必要があります。 |
+ | * エージェントプラグインは、同時に複数のモジュールの情報を取得することができます。このことにより、サーバプラグインよりより柔軟性があります。一つの情報を取得するのに多くの処理が必要なプラグインに適しています。そのため、同時に複数のモジュールの値を返すことができ、開発者にとってより柔軟性があります。 | ||
+ | |||
+ | <wrap #ks3 /> | ||
===== 自動検出処理 ===== | ===== 自動検出処理 ===== | ||
+ | |||
+ | To do recon tasks on plugins that need it, there are two possibilities: | ||
+ | |||
プラグインで自動検出処理を実行するには、次の二種類の方法があります。 | プラグインで自動検出処理を実行するには、次の二種類の方法があります。 | ||
- | 一つは、Pandora | + | The first one consists on using Pandora |
- | エージェントプラグインを用いても自動検出処理を作成することができます。通常、エージェントプラグインは、Pandora サーバに対して送信する XML に記載されたモジュールを返します。しかし、エージェントのインストールと一緒にプラグインをインストールし、tentacle も入っていれば、Pandora サーバに XML を送信することができます。自動検出処理をエージェントプラグインから実行するには、この方法を利用することができます。さらに、通常のプラグインの実行と同じように、モジュールを追加します。自動検出処理が実行するように、エージェントの更新情報を Pandora へ XML で送信するようにプラグインを用意します。 | + | 一つは、Pandora サーバの[[: |
+ | |||
+ | It is also possible to create a recon task using an agent plugin. Usually, agent plugins return modules that are attached to the XML that the agent sends to Pandora server. But, consider that when installing the agent in a machine with it, [[: | ||
+ | |||
+ | エージェントプラグインを用いても自動検出処理を作成することができます。通常、エージェントプラグインは、Pandora サーバに対して送信する XML に記載されたモジュールを返します。しかし、エージェントのインストールと一緒にプラグインをインストールし、[[: | ||
+ | |||
+ | The idea is that the plugin, besides creating average modules, collects the information and creates and sends the XML simulating other installed agents if necessary. | ||
プラグインにより平均的なモジュールの作成および情報収集を行ったり、必要に応じて他のエージェントをシミュレートするXMLを作成して送信するという考え方です。 | プラグインにより平均的なモジュールの作成および情報収集を行ったり、必要に応じて他のエージェントをシミュレートするXMLを作成して送信するという考え方です。 | ||
+ | |||
+ | The reason to create a plugin that sends data through XML and besides does recon task is to distribute the monitoring load among different machines and not centralize it into the server. | ||
XML でデータを送信するプラグインを作成する理由は、自動検出処理の負荷をサーバに集中させずに分散することにあります。 | XML でデータを送信するプラグインを作成する理由は、自動検出処理の負荷をサーバに集中させずに分散することにあります。 | ||
+ | |||
+ | <wrap #ks4 /> | ||
===== サーバプラグインとエージェントプラグイン ===== | ===== サーバプラグインとエージェントプラグイン ===== | ||
- | A [[:en: | + | A [[en: |
- | [[: | + | [[: |
* The load of each execution is small, for example, simple queries. | * The load of each execution is small, for example, simple queries. | ||
行 47: | 行 67: | ||
* 自動検出処理の実行間隔が長い場合。例えば、1週間に一度など。 | * 自動検出処理の実行間隔が長い場合。例えば、1週間に一度など。 | ||
- | An [[:en: | + | An [[en: |
- | [[: | + | [[: |
* 情報収集において多くの処理がある場合。 | * 情報収集において多くの処理がある場合。 | ||
* 自動検出処理で高い負荷がかかる場合。 | * 自動検出処理で高い負荷がかかる場合。 | ||
* 自動検出処理の実行間隔が通常のエージェントの実行間隔に近い場合。例えば、5分間隔など。 | * 自動検出処理の実行間隔が通常のエージェントの実行間隔に近い場合。例えば、5分間隔など。 | ||
+ | |||
+ | <wrap #ks5 /> | ||
===== 開発における標準化 ===== | ===== 開発における標準化 ===== | ||
行 60: | 行 82: | ||
すべてのプラグインを可能な限り標準化し、同様の機能を持たせるには、次の点を考慮する必要があります。 | すべてのプラグインを可能な限り標準化し、同様の機能を持たせるには、次の点を考慮する必要があります。 | ||
+ | |||
+ | <wrap #ks5_1 /> | ||
==== プラグインと拡張のバージョン管理 ==== | ==== プラグインと拡張のバージョン管理 ==== | ||
行 67: | 行 91: | ||
Pandora FMS では、次の形式のプラグインのバージョンシステムに従います。 | Pandora FMS では、次の形式のプラグインのバージョンシステムに従います。 | ||
- | | + | < |
+ | v1r1 | ||
+ | |||
+ | </ | ||
Being: | Being: | ||
行 73: | 行 100: | ||
ここで: | ここで: | ||
- | * vX: plugin version, the step of one version to another is made when a new important functionality is added or an error that makes impossible the correct working of the plugin is corrected.The first version is the v1. | + | * '' |
- | * rY: Plugin revisión, | + | * '' |
- | * vX: プラグインのバージョンです。新しい重要な機能が追加されたり、プラグインが正常動作しないような不具合が修正されたりしたときに、あるバージョンから別のバージョンへあげられます。最初のバージョンは v1 です。 | + | * '' |
- | * rY: プラグインのリビジョンです。 | + | * '' |
The change to one revision to another is done when any bug is fixed or a minor feature is implemented. The first revision is the r1. | The change to one revision to another is done when any bug is fixed or a minor feature is implemented. The first revision is the r1. | ||
行 87: | 行 114: | ||
常に最初のリビジョンから開始し、新しいバージョンへ変更していく必要があります。つまり、バージョン v1r5 のプラグインに対して、より新しいバージョンを定義したい場合は、v2r1 などになります。 | 常に最初のリビジョンから開始し、新しいバージョンへ変更していく必要があります。つまり、バージョン v1r5 のプラグインに対して、より新しいバージョンを定義したい場合は、v2r1 などになります。 | ||
+ | |||
+ | <wrap #ks5_2 /> | ||
==== 使い方とプラグインのバージョン ==== | ==== 使い方とプラグインのバージョン ==== |