ja:documentation:pandorafms:technical_reference:01_development_and_extension

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
ja:documentation:pandorafms:technical_reference:01_development_and_extension [2024/09/01 06:39] – [モジュール] junichija:documentation:pandorafms:technical_reference:01_development_and_extension [2024/10/11 23:01] (現在) – [Pandora FMS コードのアーキテクチャ] junichi
行 9: 行 9:
 ===== Pandora FMS コードのアーキテクチャ ===== ===== Pandora FMS コードのアーキテクチャ =====
  
-For a separate and detailed explanation about the Pandora FMS database structure see the article [[en:documentation:pandorafms:complex_environments_and_optimization:09_pandorafms_engineering#ks1_2|Pandora FMS engineering]].+For a separate and detailed explanation about Pandora FMS database structure see the article [[:en:documentation:pandorafms:complex_environments_and_optimization:09_pandorafms_engineering#ks1_2|Pandora FMS engineering]].
  
 Pandora FMS データベースの構造に関する詳細については、 [[:ja:documentation:pandorafms:complex_environments_and_optimization:09_pandorafms_engineering#ks1_2|Pandora FMS の技術情報]] を参照してください。 Pandora FMS データベースの構造に関する詳細については、 [[:ja:documentation:pandorafms:complex_environments_and_optimization:09_pandorafms_engineering#ks1_2|Pandora FMS の技術情報]] を参照してください。
行 649: 行 649:
 ==== ポリシー ==== ==== ポリシー ====
  
-これらの関数は、指定したポリシーのそれぞれの状態にあるエージェント数を返します。無効化したエージェントやモジュールには使えません。+These functions return the number of agents for each given state and policy. They do not use the disabled agents and modules to calculate the result.
  
-  * **policies_agents_critical ($id_policy)**: 指定たポリシーに属する障害状態のエージェント数を返します。+これらの関数は、指定され状態とポリシーごとにエージェント数を返します。無効なエージェントとモジュールは結果の計算に使用されません
  
-  * **policies_agents_ok ($id_policy)**: 指定したポリシーに属する正常状態のエージェント数を返します。+<code php> 
 +policies_agents_critical ($id_policy)
  
-  * **policies_agents_unknown ($id_policy)**: 指定したポリシーに属する不明状態のエージェント数を返します。+</code>
  
-  * **policies_agents_warning ($id_policy)**: 指定したポリシーに属する警告状態のエージェント数を返します。+Returns the number of agents with critical status that belong to a given policy.
  
-==== OS ====+指定されたポリシーに属する、障害状態のエージェント数を返します。
  
-これらの関数は、OS に基づいたエージェントの状態を返します。無効化したエージェントやモジュールには使えません。+----
  
-  * **os_agents_critical ($id_os)**: 指定した OS で障害状態のエージェント数を返します。+<code php> 
 +policies_agents_ok ($id_policy)
  
-  * **os_agents_ok($id_os)**: 指定した OS で正常状態のエージェント数を返します。+</code>
  
-  * **os_agents_warning ($id_os)**: 指定した OS で障害状態のエージェント数を返します。+Returns the number of agents with normal status that belong to a given policy.
  
-  * **os_agents_unknown ($id_os)**: 指定た OS で不明状態のエージェント数を返します。+指定されポリシーに属する、正常状態のエージェント数を返します。
  
-===== 開発 =====+----
  
-ほとんどの拡張は、サーバプラグイン、Unix エージェントプラグイン、コンソール拡張といったそれぞれの章で説明しています。この章では、Pandora FMS との連携および、Windows エージェントのソースからのコンパイル方法について説明します。今後も、特定の章に属さない開発に関わる内容については、この章に記載していきます。+<code php> 
 +policies_agents_unknown ($id_policy)
  
-==== Pandora FMS プロジェクトへの協力 ====+</code>
  
-このプロジェクトは、プロジェクトを支えるボランティアの開発者によって成り立っています。新たな開発者、ドキュメント作成者や、その他協力したいと考えている方は、常に歓迎です。まず最初は、メーリングリストやフォーラムに参加いただくのが良いです。+Returns the number of agents with unknown status that belong to a given policy.
  
 +指定されたポリシーに属する不明状態のエージェント数を返します。
  
 +----
  
-==== バグ / エラー ====+<code php> 
 +policies_agents_warning ($id_policy)
  
-不具合報告は、Pandora FMS の拡張の助けになります。なお、不具合報告を送信する前に、我々の不具合に関するデータベースを確認し、同様の報告がすでにあがっていないかを確認してください。不具合報告は、我々のプロジェクトページ http://sourceforge.net/projects/pandora/ から、Sourceforge のバグトラッキングシステムを使って送信することができます。+</code>
  
-==== メーリングリスト ====+Returns the number of agents with warning status that belong to a given policy.
  
-メーングリストは、簡単に最新情報をメルで受け取るは良い手段で。ユーザ向けお知らせを送信する public メグリスト (流量は少ないです) と、技術的な議論行う develop メーリングリストを用意ています。また、SVN システムから自動的に通知される変更情報を受け取るためのメーリングリスト (ほぼ毎日) があります。+指定されたポーにる警告状態ジェントします。
  
-===== Windows エージェントのソースからのコンパイル =====+==== OS ====
  
-==== 最新ソースの入手 ====+**These functions calculate the statistics for the agents based on the Operating Systems they belong to. They do not use disabled agents or modules.**
  
-我々のリポジトリか最新ソースを入手するには、Subversion クライアントが必要で。そし、次ように実行します。+**これらの関数は、エージェントがるオペレーティング システムに基づいエージェント統計を計算します。無効なエージェントやモジュールは使用しません。**
  
-  svn co https://svn.sourceforge.net/svnroot/pandora pandora+<code php> 
 +os_agents_critical ($id_os)
  
-==== Windows ====+</code>
  
-ソースからビルドするには、MinGW tools を含む最新の Dev-Cpp IDE 版が必要です。[[http://www.bloodshed.net/devcpp.html|こちらからダウンロードできます。]]+Returns the number of agents in critical state that belong to the given Operating System.
  
-''PandoraAgent.dev'' を Dev-Cpp で開きプロジェトを作成します。デフォルトのインストールですべてコンパイル可能です。+指定されたオペレーティングシステムに属する障害状態のエージェします。
  
-ソースからのビルドで問題を見つけた場合は、メール (ramon.novoa@artica.es) もしくは [[http://pandora.sourceforge.net|SourceForge 上のプロジェクトページ]] にてお知らせください。+----
  
-==== Linux でのクロスコンパイル ====+<code php> 
 +os_agents_ok($id_os)
  
-Linux で Pandora FMS Windows エージェントをクロスコンパイルするには、次のようにします。+</code>
  
-=== Linux への MinGW のインストール ===+Returns the number of agents in normal state that belong to the given Operating System.
  
-Ubuntu/Debian 場合:+指定されたオペレーティングシステムに属する、正常状態エージェント数を返します。
  
-  sudo aptitude install mingw32+----
  
-SUSE または RPM 管理の環境の場合 (手動での Zypper の利用は、以下の RUL より:+<code php> 
 +os_agents_warning ($id_os)
  
-  http://download.opensuse.org/repositories/CrossToolchain:/mingw/openSUSE_11.1/+</code>
  
-=== エージェントに必要な追加ライブラリのインストール ===+Returns the number of agents in warning status that belong to the given Operating System.
  
-  * win32api +指定されたオペレーティングシステムに属する警告状態のエージェント数を返します。
-  * odbc++ +
-  * curl +
-  * openssl +
-  * zlib +
-  * Boost C++ libraries (http://sourceforge.net/projects/boost/files/)+
  
-例えば、Openssl パッケージをインストールするには次のようにします。+----
  
-http://sourceforge.net/projects/devpaks/files/ へ行き、ファイルをダウンロードします。+<code php> 
 +os_agents_unknown ($id_os)
  
-  openssl-0.9.8e-1cm.DevPak+</code>
  
-openssl-0.9.8e-1cm.DevPak を展開します。+Returns the number of agents in unknown state that belong to the given Operating System.
  
-  tar jxvf openssl-0.9.8e-1cm.DevPak+指定されたオペレーティングシステムに属する不明状態のエージェント数を返します。
  
-ライブラリおよびインクルードファイルを MinGW のあるクロスコンパイル環境にコピーします。+===== 開発 =====
  
-<code> +Most of the extensions have been described as independent annexes, specialized for server plugin creation, Unix agent plugins, and Web Console extensions. This chapter describes how to collaborate in Pandora FMS and how to compile the Windows agent from the sources.
- cp lib/*.a /usr/i586-mingw32msvc/lib/ +
- cp -r include/* /usr/i586-mingw32msvc/include/ +
-</code>+
  
-依存関係やライリの問題はご自身解決する必要があります。 +ほとんどの拡張は、サーバプン、Unix エージェントプグインコンソール拡張といったそれぞれの章説明しています。この章、Pandora FMS 連携および、Windows エジェトのソスからのコンパイル方法について説明します。
-れらを簡単にきるように、Pandora FMS の公式ダウンロドサイトに必要なライブラリとイクルドファイルを tar で固めたファイルを //mingw_pandorawin32_libraries_9Oct2009.tar.gz// +
-という名前で置いてあります。+
  
-=== コンパイルおよびリンク ===+==== Pandora FMS プロジェトへの協力 ====
  
-コンパイラおよび、インクルードファイル、ライブラリのインストール後、Pandora FMS エージェントのソースディレクトリへ行き、以下を実行します。+This project is maintained by volunteer developers with their contributions. New developers, documentation writers, or people who want to help are always welcome. A good way to get started is by subscribing to our mailing lists and/or [[https://pandorafms.com/community/|forum]].
  
-  ./configure --host=i586-mingw32msvc && make+このプロジェクトはボランティア開発者の貢献によって維持されています。新しい開発者、ドキュメント作成者、または協力したい人はいつでも歓迎します。始めるには、メーリングリストや [[https://pandorafms.com/community/|フォーラム]] を購読するのが良い方法です。
  
-これで、実行可能な .exe ファイルが生成されます。+==== バグ ====
  
-===== 外部 API =====+Inform about possible errors helps us improve Pandora FMS. Please, before forwarding a bug report [[https://github.com/pandorafms/pandorafms/issues|check our bug database]]//.//
  
-Pandora FMS には、他のアプリケションとの連携をと、Pandora FMS から情報を取得したり Pandora FMS 情報を提供するための外部 API があります。これに関するドキュメントは補足資料の Pandora FMS 外部 API にあります+考えられるエラーを報告するこ、Pandora FMS の改善役立ちます。バグレポートを送信する前に[[https://github.com/pandorafms/pandorafms/issues|バグデータベースを確認してください]]
  
-===== Pandora FMS XML データファイルフォーマット =====+==== メーリングリスト ==== 
 + 
 +Mailing lists are a great way to keep up to date by email. We have a public mailing list for users and announcements (with low traffic) and a development mailing list for technical discussions and (sometimes daily) development notifications via our GIT (Code Version Control System) automatic notification system. 
 + 
 +メーリング リストは、電子メールで最新情報を入手するのに最適な方法です。ユーザーとお知らせ用の公開メーリング リスト (トラフィックは少ない) と、技術的な議論や (場合によっては毎日の) GIT (コード バージョン コントロール システム) 自動通知システム経由の開発通知用の開発メーリング リストがあります。 
 + 
 + 
 +===== Windows エージェントのソースからのコンパイル ===== 
 + 
 +==== 最新ソースの入手 ==== 
 + 
 +To get the latest version of the code it is essential to download the sources from the code repository [[http://github.com/pandorafms/pandorafms/issues|GitHub]], where the official Pandora FMS repository is published. 
 + 
 +最新バージョンのコードを入手するには、公式の Pandora FMS リポジトリが公開されているコードリポジトリ [[http://github.com/pandorafms/pandorafms/issues|GitHub]] からソースをダウンロードすることが不可欠です。 
 + 
 + 
 +===== Pandora FMS API ===== 
 + 
 +There is a Pandora FMS external API to be able to link third party applications with Pandora FMS, both to obtain information from Pandora FMS and to introduce information inside Pandora FMS. All this documentation is in the [[en:documentation:pandorafms:technical_reference:02_annex_externalapi|appendix of Pandora FMS External API]]. 
 + 
 +Pandora FMS 外部 API を使用すると、サードパーティのアプリケーションを Pandora FMS にリンクして、Pandora FMS から情報を取得したり、Pandora FMS 内に情報を取り込んだりすることができます。このドキュメントはすべて [[ja:documentation:pandorafms:technical_reference:02_annex_externalapi|Pandora FMS 外部 API]] にあります。 
 + 
 +===== XML データファイルフォーマット ===== 
 + 
 +Knowing the Pandora FMS data XML format can help to improve agent plugins, create customized agents or simply send customized XML files to the Pandora FMS data server.
  
 Pandora FMS の XML データファイルのフォーマットを理解することで、エージェントプラグインの拡張や、独自エージェントの作成、Pandora FMS データサーバへの独自 XML ファイルの送信などができるようになります。 Pandora FMS の XML データファイルのフォーマットを理解することで、エージェントプラグインの拡張や、独自エージェントの作成、Pandora FMS データサーバへの独自 XML ファイルの送信などができるようになります。
 +
 +Like any XML document, the data file must begin with an XML declaration:
  
 すべての XML ドキュメントど同じように、データファイルは次のような XML の宣言で始まります。  すべての XML ドキュメントど同じように、データファイルは次のような XML の宣言で始まります。 
  
-   <?xml version='1.0' encoding='UTF-8'?>+<code xml> 
 +<?xml version='1.0' encoding='UTF-8'?> 
 + 
 +</code> 
 + 
 +Next comes the **agent_data** element that defines the agent that sends the data. It supports the following attributes:
  
 次に、エージェントが送るデータを定義する **agent_data** 要素が来ます。次に示す属性に対応しています。 次に、エージェントが送るデータを定義する **agent_data** 要素が来ます。次に示す属性に対応しています。
  
-   * //description//: Agent description+  * //description//: Description of the agent
-  * //group//: Name of the group the agent belongs to (it must exist in Pandora FMS database). +  * //group//: Name of the group to which the agent belongs (it must exist in the Pandora FMS database). If it is left empty and there is no default group configured in the server, the agent will not be created
-  * //os_name//: Name of the operating system the agent runs in (it must exist in Pandora FMS database). +  * //os_name//: Name of the operating system where the agent runs (must exist in the Pandora FMS database). 
-  * //os_version//: Free string describing the version of the operating system.+  * //os_version//: Free string describing the operating system version.
   * //interval//: Agent interval (in seconds).   * //interval//: Agent interval (in seconds).
-  * //version//: Agent version string+  * //version//: String with the agent'version. 
-  * //timestamp//: Timestamp indicating when the XML file was generated (YYYY/MM/DD HH:MM:SS). +  * //timestamp//: Timestamp that indicates when the XML (''YYYY/MM/DD HH:MM:SS''). 
-  * //agent_name//: Name of the agent. +  * //agent_name//: Name of agent. 
-  * //timezone_offset//: Offset that will be added to the timestamp (in hours). Useful if you are working with UTC. +  * //timezone_offset//: Offset that is added to the timestamp (in hours). Useful when working with UTC. 
-  * //address//: Agent IP address (or FQN). +  * //address//: Agent IP address (or FQDN). 
-  * //parent_agent_name//: Name of the agent's parent.+  * //parent_agent_name//: Name of agent's parent.
   * //agent_alias//: Agent's alias.   * //agent_alias//: Agent's alias.
   * //agent_mode//: Agent's working mode (0: Normal mode, 1: Learning mode, 2: Autodisable mode) .   * //agent_mode//: Agent's working mode (0: Normal mode, 1: Learning mode, 2: Autodisable mode) .
   * //secondary_groups//: Secondary groups added to the agent.   * //secondary_groups//: Secondary groups added to the agent.
-  * //custom_id//: Custom agent ID. +  * //custom_id//: Personalized agent ID. 
-  * //url_address//: Agent access URL.+  * //url_address//: URL of access to the agent.
  
   * //description//: エージェントの説明   * //description//: エージェントの説明
行 808: 行 839:
  
    <agent_data description= group= os_name='linux' os_version='Ubuntu 10.10' interval='30' version='3.2(Build 101227)' timestamp='2011/04/20 12:24:03' agent_name='foo' timezone_offset='0' parent_agent_name='too' address='192.168.1.51' custom_id='BS4884' url_address='http://mylocalhost:8080'>    <agent_data description= group= os_name='linux' os_version='Ubuntu 10.10' interval='30' version='3.2(Build 101227)' timestamp='2011/04/20 12:24:03' agent_name='foo' timezone_offset='0' parent_agent_name='too' address='192.168.1.51' custom_id='BS4884' url_address='http://mylocalhost:8080'>
 +
 +A **module** element is then required for each module, and the following elements can be nested to define the module:
  
 そして、モジュールごとに、**module** という要素が必要です。モジュールの定義のために、次の要素を入れることができます。 そして、モジュールごとに、**module** という要素が必要です。モジュールの定義のために、次の要素を入れることができます。
行 813: 行 846:
   * **name**: Module name.   * **name**: Module name.
   * **description**: Module description.   * **description**: Module description.
-  * **tags**: Tags associated to the module. +  * **tags**: Tags associated with the module. 
-  * **type**: Module type (it must exist in Pandora FMS database).+  * **type**: Module type (must exist in Pandora FMS database).
   * **data**: Module data.   * **data**: Module data.
-  * **max**: Module's maximum value. +  * **max**: Maximum value of the module
-  * **min**: Module's minimum value. +  * **min**: Minimum module value. 
-  * **post_process**: Post-process value. +  * **post_process**: Post-processing value. 
-  * **module_interval**: Module interval (interval in seconds/agent interval). +  * **module_interval**: Module interval (interval in seconds / agent interval). 
-  * **min_critical**: Minimum value for critical status+  * **min_critical**: Minimum value for the critical state
-  * **max_critical**: Maximum value for critical status+  * **max_critical**: Maximum value for the critical state
-  * **min_warning**: Minimum value for warning status+  * **min_warning**: Minimum value for the alert state
-  * **max_warning**: Maximum value for warning status+  * **max_warning**: Maximum value for the alert state
-  * **disabled**: It disables (0) or enables (1) the module. Disabled modules are not processed. +  * **disabled**: Disable (0) or enable the module. Disabled modules are not processed. 
-  * **min_ff_event**: FF threshold. +  * **min_ff_event**: Minimum FF threshold. 
-  * **status**: Module status (NORMAL, WARNING or CRITICAL). Warning and critical thresholds are ignored if the status is set+  * **status**: Module status (NORMAL, WARNING or CRITICAL). The critical and warning status limits are ignored if the status is specified
-  * **datalist**: Sends the module data in datalist format (one database entry for each of the values received) [0/1]. +  * **datalist**: Sends the module data in datalist format (one database entry for each of the values received)[0/1]. 
-  * **unit**: Module unit. Supports the _Timeticks_ macro to transform a data in timeticks format to dd/hh/mm/ss.+  * **unit**: Module unit. Supports the ''_timeticks_'' macro to transform a data in //timeticks// format to dd/hh/mm/ss.
   * **timestamp**: Sets a timestamp on the data received from the module.   * **timestamp**: Sets a timestamp on the data received from the module.
   * **module_group**: Group of modules to which the module will be added.   * **module_group**: Group of modules to which the module will be added.
-  * **custom_id**: Module custom ID.+  * **custom_id**: Custom ID of the module.
   * **str_warning**: Warning threshold for string modules.   * **str_warning**: Warning threshold for string modules.
   * **str_critical**: Critical threshold for string modules.   * **str_critical**: Critical threshold for string modules.
-  * **critical_instructions**: Module Critical instructions. +  * **critical_instructions**: module Critical instructions. 
-  * **warning_instructions**: Module Warning instructions. +  * **warning_instructions**: module Warning instructions. 
-  * **unknown_instructions**: Module Unknown instructions.+  * **unknown_instructions**: module Unknown instructions.
   * **critical_inverse**: Activates the Inverse interval at the critical threshold of the module. [0/1].   * **critical_inverse**: Activates the Inverse interval at the critical threshold of the module. [0/1].
-  * **warning_inverse**: Activates the Inverse interval at the warning threshold of the module. [0/1].+  * **warning_inverse**: Activates the Inverse interval on the module warning threshold [0/1].
   * **quiet**: Activates the Quiet mode of the module [0/1].   * **quiet**: Activates the Quiet mode of the module [0/1].
   * **module_ff_interval**: Specifies a value of FF Interval of the module.   * **module_ff_interval**: Specifies a value of FF Interval of the module.
行 844: 行 877:
   * **crontab**: Specifies a crontab in the module.   * **crontab**: Specifies a crontab in the module.
   * **min_ff_event_normal**: FF threshold value on change of state to NORMAL.   * **min_ff_event_normal**: FF threshold value on change of state to NORMAL.
-  * **min_ff_event_warning**: FF threshold value on change of state to WARNING. +  * **min_ff_event_warning**: FF threshold value on state change to WARNING. 
-  * **min_ff_event_critical**: FF threshold value on change of state to CRITICAL.+  * **min_ff_event_critical**: FF threshold value on state change to CRITICAL.
   * **ff_timeout**: FlipFlop timeout value.   * **ff_timeout**: FlipFlop timeout value.
-  * **each_ff**: Activate option “Change each status”.+  * **each_ff**: Habilita la opción “Change each status”.
   * **module_parent**: Name of the module in the same agent that will be the parent of this module.   * **module_parent**: Name of the module in the same agent that will be the parent of this module.
-  * **ff_type**: Activates the Keep counter of the FF threshold[0/1].+  * **ff_type**: Activa el Keep counters del FF threshold [0/1]
 +  * **min_warning_forced**: Forces min_warning to the new specified value even if the module exists, takes precedence over **min_warning**. 
 +  * **max_warning_forced**: Forces max_warning to the new specified value even if the module exists, takes precedence over **max_warning**. 
 +  * **min_critical_forced**: Forces min_critical to the new value indicated even if the module exists, takes precedence over **min_critical**. 
 +  * **max_critical_forced**: Forces max_critical to the new specified value even if the module exists, it takes precedence over **max_critical**. 
 +  * **str_warning_forced**: Forces str_warning to the new specified value even if the module exists, takes precedence over **str_warning**. 
 +  * **str_critical_forced**: Forces str_critical to the new specified value even if the module exists, takes precedence over **str_critical**.
  
   * **name**: モジュールの名前。   * **name**: モジュールの名前。
行 890: 行 929:
   * **module_parent**: 同一エージェントでこのモジュールの親となるモジュールの名前。   * **module_parent**: 同一エージェントでこのモジュールの親となるモジュールの名前。
   * **ff_type**: 連続障害検知抑制のカウンタ維持の有効化。[0/1]   * **ff_type**: 連続障害検知抑制のカウンタ維持の有効化。[0/1]
 +  * **min_warning_forced**: モジュールが存在する場合でも、min_warning を新しい指定値に強制し、**min_warning** よりも優先されます。
 +  * **max_warning_forced**: モジュールが存在する場合でも、max_warning を新しい指定値に強制し、**max_warning** よりも優先されます。
 +  * **min_critical_forced**: モジュールが存在する場合でも、min_critical を指定された新しい値に強制し、**min_critical** よりも優先されます。
 +  * **max_critical_forced**: モジュールが存在する場合でも、max_critical を新しく指定された値に強制し、**max_critical** よりも優先されます。
 +  * **str_warning_forced**: モジュールが存在する場合でも、str_warning を新しい指定値に強制し、**str_warning** よりも優先されます。
 +  * **str_critical_forced**: モジュールが存在する場合でも、str_critical を新しい指定値に強制し、**str_critical** よりも優先されます。
  
-Pandora FMS バージョン 749 から、しきい値を強制するための新たなトークンが追加されました。+<WRAP center round important 90%>
  
-  * **min_warning_forced**: モジュールに設定が存在する場合でも、警告の最小値を新しい値にします。min_warningよりも優先されます。 +These tokens will only work for **dataserver plugins**.
-  * **max_warning_forced**: モジュールに設定が存在する場合でも、警告の最大値を新しい値にします。max_warningよりも優先されます。 +
-  * **min_critical_forced**: モジュールに設定が存在する場合でも、障害の最小値を新しい値にします。min_critical よりも優先されます。 +
-  * **max_critical_forced**: モジュールに設定が存在する場合でも、障害の最大値を新しい値にします。max_critical よりも優先されます。 +
-  * **str_warning_forced**: モジュールに設定が存在する場合でも、文字列の警告条件を新しい値にします。str_warning よりも優先されます。 +
-  * **str_critical_forced**: モジュールに設定が存在する場合でも、文字列の障害条件を新しい値にします。str_critical よりも優先されます。+
  
-<WRAP center round important 60%> 
-これらのトークンは、**データサーバプラグイン** のみで動作します。 
 </WRAP> </WRAP>
  
-その他の要素は、モジュールの拡張情報として Pandora FMS のデータベースに保存されます。+<WRAP center round important 90%>
  
-{{  :wiki:module_extended_info.png?900  }}+これらのトークンは、**データサーバプラグイン** のみで動作します。
  
-モジュールは、少なくとも **name**, **type**, および **data** の要素を持たなければいけません。+</WRAP>
  
-:+Any other element will be saved as extended information of the module in the Pandora FMS database. A module must have at least one element **name**, **type** and **data**, for example:
  
-<code>+その他の要素は、モジュールの拡張情報として Pandora FMS データベースに保存されます。モジュールには、少なくとも 1 つの要素 **name**、**type**、**data** が必要です。例: 
 + 
 +その他の要素は、モジュールの拡張情報として Pandora FMS のデータベースに保存されます。 
 + 
 +<code xml>
   <module>   <module>
     <name>CPU</name>     <name>CPU</name>
行 919: 行 961:
     <data>21</data>     <data>21</data>
   </module>   </module>
 +
 </code> </code>
 +
 +There can be any number of elements in an XML data file before closing the **agent_data** tag.
  
 XML データファイルは任意の数のモジュール要素を持つことができます。最後に、**agent_data** タグをクローズするのを忘れないでください。 XML データファイルは任意の数のモジュール要素を持つことができます。最後に、**agent_data** タグをクローズするのを忘れないでください。
 +
 +There is a special case of multi-item XML, based on a list of data. This applies only to string data. The XML would look something like this:
  
 アイテムリストによる、複数の XML データを含む特別なケースがあります。これは、文字列タイプの場合にのみ有効です。XML は次のようになります。  アイテムリストによる、複数の XML データを含む特別なケースがあります。これは、文字列タイプの場合にのみ有効です。XML は次のようになります。 
  
-<code>+<code xml>
 <module> <module>
-<type>async_string</type> + <type>async_string</type> 
-<datalist>+ <datalist>
    <data><value><![CDATA[xxxxx]]></value></data>    <data><value><![CDATA[xxxxx]]></value></data>
    <data><value><![CDATA[yyyyy]]></value></data>    <data><value><![CDATA[yyyyy]]></value></data>
    <data><value><![CDATA[zzzzz]]></value></data>    <data><value><![CDATA[zzzzz]]></value></data>
-</datalist>+ </datalist>
 </module> </module>
 +
 </code> </code>
 +
 +A time stamp can be specified for each value:
  
 タイムスタンプは、それぞれの値ごとに定義できます。 タイムスタンプは、それぞれの値ごとに定義できます。
  
-<code> +<code xml
-  <module> +<module> 
-  <type>async_string</type> + <type>async_string</type> 
-  <datalist> + <datalist> 
-    <data> +   <data> 
-      <value><![CDATA[xxxxx]]></value> +     <value><![CDATA[xxxxx]]></value> 
-      <timestamp>1970-01-01 00:00:00</timestamp> +     <timestamp>1970-01-01 00:00:00</timestamp> 
-    </data> +   </data> 
-    <data> +   <data> 
-      <value><![CDATA[yyyyy]]></value> +     <value><![CDATA[yyyyy]]></value> 
-      <timestamp>1970-01-01 00:00:01</timestamp> +     <timestamp>1970-01-01 00:00:01</timestamp> 
-    </data> +   </data> 
-    <data> +   <data> 
-      <value><![CDATA[zzzzz]]></value> +     <value><![CDATA[zzzzz]]></value> 
-      <timestamp>1970-01-01 00:00:02</timestamp> +     <timestamp>1970-01-01 00:00:02</timestamp> 
-    </data> +   </data> 
-  </datalist> + </datalist> 
-  </module>+ </module> 
 </code> </code>
  
-さら、使用量の単位と閾値の定義を含んだ例を見てみましょう。+[[ja:documentation:start|Pandora FMS ドキュメント一覧戻る]]
  
-<code> +===== (OBSOLETE) =====
-<module> +
- <name><![CDATA[Cache mem free]]></name> +
- <description><![CDATA[Free cache memory in MB]]></description> +
-        <tags>tag</tags> +
- <type>generic_data</type> +
- <module_interval>1</module_interval> +
- <min_critical>100</min_critical> +
- <max_critical>499</max_critical> +
- <min_warning>500</min_warning> +
- <max_warning>600</max_warning> +
- <unit><![CDATA[MB]]></unit> +
- <data><![CDATA[3866]]></data> +
-</module>+
  
-<module> +==== Windows ==== 
- <name><![CDATA[Load Average]]></name> + 
- <description><![CDATA[Average process in CPU (Last minute) ]]></description> +ソースからビルドするには、MinGW tools を含む最新の Dev-Cpp IDE 版が必要です。[[http://www.bloodshed.net/devcpp.html|こちらからダウンロードできます。]] 
-        <tags>tag</tags> + 
- <type>generic_data</type> +''PandoraAgent.dev'' を Dev-Cpp で開き、プロジェクトを作成します。デフォルトのインストールですべてコンパイル可能です。 
- <module_interval>1</module_interval> + 
- <data><![CDATA[1.89]]></data> +ソースからのビルドで問題を見つけた場合は、メール (ramon.novoa@artica.esもしくは [[http://pandora.sourceforge.net|SourceForge 上のプロジェクトページ]] にてお知らせください。 
-</module>+ 
 +==== Linux でのクロスコンパイル ==== 
 + 
 +Linux で Pandora FMS Windows エージェントをクロスコンパイルするには、次のようにします。 
 + 
 +=== Linux への MinGW のインストール === 
 + 
 +Ubuntu/Debian の場合: 
 + 
 +  sudo aptitude install mingw32 
 + 
 +SUSE または RPM 管理の環境の場合 (手動での Zypper の利用) は、以下の RUL より: 
 + 
 +  http://download.opensuse.org/repositories/CrossToolchain:/mingw/openSUSE_11.1
 + 
 +=== エージェントに必要な追加ライブラリのインストール === 
 + 
 +  * win32api 
 +  * odbc++ 
 +  * curl 
 +  * openssl 
 +  * zlib 
 +  * Boost C++ libraries (http://sourceforge.net/projects/boost/files/) 
 + 
 +例えば、Openssl パッケージをインストールするには次のようにします。 
 + 
 +http://sourceforge.net/projects/devpaks/files/ へ行き、ファイルをダウンロードします。 
 + 
 +  openssl-0.9.8e-1cm.DevPak 
 + 
 +openssl-0.9.8e-1cm.DevPak を展開します。 
 + 
 +  tar jxvf openssl-0.9.8e-1cm.DevPak 
 + 
 +ライブラリおよびインクルードファイルを MinGW のあるクロスコンパイル環境にコピーします。 
 + 
 +<code> 
 + cp lib/*.a /usr/i586-mingw32msvc/lib
 + cp -r include/* /usr/i586-mingw32msvc/include/
 </code> </code>
 +
 +依存関係やライブラリの問題は、ご自身で解決する必要があります。
 +これらを簡単にできるように、Pandora FMS の公式ダウンロードサイトに必要なライブラリとインクルードファイルを tar で固めたファイルを //mingw_pandorawin32_libraries_9Oct2009.tar.gz//
 +という名前で置いてあります。
 +
 +=== コンパイルおよびリンク ===
 +
 +コンパイラおよび、インクルードファイル、ライブラリのインストール後、Pandora FMS エージェントのソースディレクトリへ行き、以下を実行します。
 +
 +  ./configure --host=i586-mingw32msvc && make
 +
 +これで、実行可能な .exe ファイルが生成されます。
  
  • ja/documentation/pandorafms/technical_reference/01_development_and_extension.1725172792.txt.gz
  • 最終更新: 2024/09/01 06:39
  • by junichi