ja:documentation:pandorafms:technical_reference:01_development_and_extension

差分

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

この比較画面へのリンク

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
ja:documentation:pandorafms:technical_reference:01_development_and_extension [2024/09/01 06:51] – [メーリングリスト] 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 の技術情報]] を参照してください。
行 755: 行 755:
 このプロジェクトはボランティア開発者の貢献によって維持されています。新しい開発者、ドキュメント作成者、または協力したい人はいつでも歓迎します。始めるには、メーリングリストや [[https://pandorafms.com/community/|フォーラム]] を購読するのが良い方法です。 このプロジェクトはボランティア開発者の貢献によって維持されています。新しい開発者、ドキュメント作成者、または協力したい人はいつでも歓迎します。始めるには、メーリングリストや [[https://pandorafms.com/community/|フォーラム]] を購読するのが良い方法です。
  
-==== バグ / エラー ====+==== バグ ====
  
-Informar acerca de posibles errores nos ayuda a mejorar Pandora FMS. Por favor, antes de enviar un informe de error, [[https://github.com/pandorafms/pandorafms/issues|revise nuestra base de datos de bugs]]//.//+Inform about possible errors helps us improve Pandora FMS. Pleasebefore forwarding a bug report [[https://github.com/pandorafms/pandorafms/issues|check our bug database]]//.//
  
 考えられるエラーを報告することは、Pandora FMS の改善に役立ちます。バグレポートを送信する前に、[[https://github.com/pandorafms/pandorafms/issues|バグデータベースを確認してください]]。 考えられるエラーを報告することは、Pandora FMS の改善に役立ちます。バグレポートを送信する前に、[[https://github.com/pandorafms/pandorafms/issues|バグデータベースを確認してください]]。
行 772: 行 772:
 ==== 最新ソースの入手 ==== ==== 最新ソースの入手 ====
  
-我々のリポジトリから最新のソースを入手するには、Subversion クライアントが必要です。そして、次のように実行します。+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.
  
-  svn co https://svn.sourceforge.net/svnroot/pandora pandora+最新バージョンのコードを入手するには、公式の Pandora FMS リポジトリが公開されているコードリポジトリ [[http://github.com/pandorafms/pandorafms/issues|GitHub]] からソースをダウンロードすることが不可欠です。
  
-==== Windows ==== 
  
-ソースからビルドするには、MinGW tools を含む最新の Dev-Cpp IDE 版が必要です。[[http://www.bloodshed.net/devcpp.html|こちらからダウンロードできます。]]+===== Pandora FMS API =====
  
-''PandoraAgent.dev'' を Dev-Cpp で開き、プロジェクトを作成します。デフォルトのインストールですべてコンパイル可能です。+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]].
  
-からのビルドで問題見つけ場合は、メール (ramon.novoa@artica.es) もしくは [[http://pandora.sourceforge.net|SourceForge 上のプロジェクトページ]] にてお知らせください+Pandora FMS 外部 API を使用すると、サドパーティのアプリケーションを Pandora FMS にリンクして、Pandora FMS から情報取得しPandora FMS 内に情報を取り込んだりすることができます。このドキュントすべて [[ja:documentation:pandorafms:technical_reference:02_annex_externalapi|Pandora FMS 外部 API]] にあります
  
-==== Linux でのクロスコンパイル ====+===== XML データファイルフォーマット =====
  
-Linux で Pandora FMS Windows エージェントをクロスコンパイルするには、次のようにします。+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.
  
-=== Linux への MinGW のイントール ===+Pandora FMS の XML データファイルフォーマットを理解することで、エージェントプラグインの拡張や、独自エージェンの作成、Pandora FMS デタサーバへの独自 XML ファイの送信などができるようになります。
  
-Ubuntu/Debian の場合:+Like any XML document, the data file must begin with an XML declaration:
  
-  sudo aptitude install mingw32+すべての XML ドキュメントど同じように、データファイルは次のような XML の宣言で始まります。 
  
-SUSE または RPM 管理の環境の場合 (手動での Zypper の利用) は、以下の RUL より:+<code xml> 
 +<?xml version='1.0' encoding='UTF-8'?>
  
-  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>
  
-依存関係やライブラリの問題は、ご自身で解決する必要があります。 +Next comes the **agent_data** element that defines the agent that sends the dataIt supports the following attributes:
-これらを簡単にできるように、Pandora FMS の公式ダウンロードサイトに必要なライブラリとインクルードファイルを tar で固めたファイルを //mingw_pandorawin32_libraries_9Oct2009.tar.gz// +
-という名前で置いてあります。 +
- +
-=== コンパイルおよびリンク === +
- +
-コンパイラおよび、インクルードファイル、ライブラリのインストール後、Pandora FMS エージェントのソースディレクトリへ行き、以下を実行します。 +
- +
-  ./configure --host=i586-mingw32msvc && make +
- +
-これで、実行可能な .exe ファイルが生成されます。 +
- +
-===== 外部 API ===== +
- +
-Pandora FMS には、他のアプリケーションとの連携をとり、Pandora FMS から情報を取得したり Pandora FMS に情報を提供するための外部 API があります。これに関するドキュメントは、補足資料の Pandora FMS 外部 API にあります。 +
- +
-===== Pandora FMS XML データファイルフォーマット ===== +
- +
-Pandora FMS の XML データファイルのフォーマットを理解することで、エージェントプラグインの拡張や、独自エージェントの作成、Pandora FMS データサーバへの独自 XML ファイルの送信などができるようになります。 +
- +
-すべての XML ドキュメントど同じように、データファイルは次のような XML の宣言で始まります。  +
- +
-   <?xml version='1.0' encoding='UTF-8'?>+
  
 次に、エージェントが送るデータを定義する **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//: エージェントの説明
行 887: 行 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** という要素が必要です。モジュールの定義のために、次の要素を入れることができます。
行 892: 行 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.
行 923: 行 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**: モジュールの名前。
行 969: 行 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>
行 998: 行 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.1725173488.txt.gz
  • 最終更新: 2024/09/01 06:51
  • by junichi