両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン |
ja:documentation:pandorafms:monitoring:13_user_monitorization [2025/07/19 22:26] – junichi | ja:documentation:pandorafms:monitoring:13_user_monitorization [2025/07/19 22:47] (現在) – [.SIDEファイル用コマンド] junichi |
---|
Pandora FMS WUX は、この目的に特化したバックエンド(Selenium®)を使って、合成モニタリング(<wrap :en>**Synthetic Monitoring**</wrap>)を行います。 つまり、Pandora FMS は、リモートサイト(Google Chrome®, Mozilla Firefox®など)とやりとりするために実際のブラウザを利用します。 | Pandora FMS WUX は、この目的に特化したバックエンド(Selenium®)を使って、合成モニタリング(<wrap :en>**Synthetic Monitoring**</wrap>)を行います。 つまり、Pandora FMS は、リモートサイト(Google Chrome®, Mozilla Firefox®など)とやりとりするために実際のブラウザを利用します。 |
| |
* 実際のユーザーが問題を経験する前に問題を検出します。 実際のユーザーからリアルタイムの閲覧データを収集する([[#ks6|webscrapping]])。 | * It detects problems before real users experience them. It collects real-time browsing data from real users ([[#ks6|webscrapping]]). |
| * It measures metrics such as load time, interactions, errors and user behavior (web analytics). |
| * Examples: Measuring page load, response times, screenshots (of the web), testing on different devices, testing complex applications that require logging, JavaScript® interaction, text inputs, passing data from one field to another as if done by a user, mouse clicks, waiting times, and so on. |
| |
| * 実際のユーザーが問題を経験する前に問題を検出します。 実際のユーザからリアルタイムの閲覧データを収集する([[#ks6|ウェブスクレーピング]])。 |
* ロード時間、インタラクション、エラー、ユーザー行動などの指標を測定します(ウェブ分析)。 | * ロード時間、インタラクション、エラー、ユーザー行動などの指標を測定します(ウェブ分析)。 |
* 例 ページロード、レスポンスタイム、(ウェブの)スクリーンショット、異なるデバイスでのテスト、ロギングを必要とする複雑なアプリケーションのテスト、JavaScript®によるインタラクション、テキスト入力、あるフィールドから別のフィールドへ、あたかもユーザーが行ったかのようにデータを渡す、マウスクリック、待ち時間などの測定。 | * 例 ページロード、レスポンスタイム、(ウェブの)スクリーンショット、異なるデバイスでのテスト、ロギングを必要とする複雑なアプリケーションのテスト、JavaScript®によるインタラクション、テキスト入力、あるフィールドから別のフィールドへ、あたかもユーザーが行ったかのようにデータを渡す、マウスクリック、待ち時間などの測定。 |
| |
<wrap #ks3 /> | <wrap #ks3 /> |
===== ディスカバリーPFMSでWUXを使用する ===== | ===== PFMS 自動検出で WUX を使用する ===== |
| |
<wrap #ks3_1 /> | <wrap #ks3_1 /> |
==== ディスカバリーPFMSプラグインのインストール ==== | ==== PFMS 自動検出プラグインのインストール ==== |
| |
Selenium 4 で WUX モニタリングを利用するためには、Pandora FMS ウェブコンソールのディスカバリセクションに ''.disco'' をインストールする必要があります。 これは、<wrap :en>**Manage disco packages**</wrap>ビューから、''.disco'' タイプのファイルを選択して、Pandora FMS ライブラリからプラグインをダウンロードすることで実行できます: | Selenium 4 で WUX モニタリングを利用するためには、Pandora FMS ウェブコンソールのディスカバリセクションに ''.disco'' をインストールする必要があります。 これは、<wrap :en>**Manage disco packages**</wrap>ビューから、''.disco'' タイプのファイルを選択して、Pandora FMS ライブラリからプラグインをダウンロードすることで実行できます: |
| |
<wrap #ks3_3 /> | <wrap #ks3_3 /> |
==== ディスカバリーからのトランザクション実行 ==== | ==== 自動検出からのトランザクション実行 ==== |
| |
Pandora FMS ウェブコンソールのディスカバリツールから録画を実行するには、アプリケーションメニューから Selenium 4 を使ってタスクを作成します (<wrap :en>**Management → Discovery → Applications**</wrap>): | Pandora FMS ウェブコンソールのディスカバリツールから録画を実行するには、アプリケーションメニューから Selenium 4 を使ってタスクを作成します (<wrap :en>**Management → Discovery → Applications**</wrap>): |
| |
<wrap #ks3_4 /> | <wrap #ks3_4 /> |
==== ディスカバリーPFMSタスク結果 ==== | ==== PFMS 自動検出タスク結果 ==== |
| |
この例の場合、Selenium プロジェクトは ''Selenium 4'' と名付けられ、''Test 1'' と ''Test 2'' という 2 つの異なるテストがあります。 タスク構成中にオプション<wrap :en>**Monitor time statistics**</wrap>がチェックされた場合、パフォーマンスデータをホストするプロジェクト名でエージェントが作成されます。 | この例の場合、Selenium プロジェクトは ''Selenium 4'' と名付けられ、''Test 1'' と ''Test 2'' という 2 つの異なるテストがあります。 タスク構成中にオプション<wrap :en>**Monitor time statistics**</wrap>がチェックされた場合、パフォーマンスデータをホストするプロジェクト名でエージェントが作成されます。 |
=== 手動実行(エージェントから、プラグインとして) === | === 手動実行(エージェントから、プラグインとして) === |
| |
手動実行のために、Selenium 4 プラグインをホストする Pandora FMS サーバ内に、[[:en:documentation:pandorafms:monitoring:02_operations|ソフトウェアエージェント]]を設定することができます。 | For manual execution you may configure a [[:en:documentation:pandorafms:monitoring:02_operations|EndPoint]] within Pandora FMS server itself that hosts the Selenium 4 plugin to perform these executions and to generate XML files for each one of them, to obtain different agents, each one with its corresponding modules. |
| |
| 手動で実行するには、Pandora FMS サーバ自体に Selenium 4 プラグインをホストする [[:ja:documentation:pandorafms:monitoring:02_operations|エンドポイント]] を設定して実行し、それぞれに対して XML ファイルを生成して、それぞれに対応するモジュールを持つ異なるエージェントを設定できます。 |
| |
| To do this, the Selenium 4 plugin may be configured as an agent plugin **using absolute paths**, so that the path to the plugin file and the necessary configuration files may be indicated. |
| |
これを行うために、Selenium 4 プラグインは、プラグインファイルへのパスと必要な設定ファイルを示すことができるように、エージェントプラグインとして **絶対パス** を使って設定することができます。 | これを行うために、Selenium 4 プラグインは、プラグインファイルへのパスと必要な設定ファイルを示すことができるように、エージェントプラグインとして **絶対パス** を使って設定することができます。 |
| |
<WRAP center round box 90%> | <WRAP center round box 90%> |
| <font inherit/Courier New,Courier,monospace;;inherit;;inherit>module_plugin /var/spool/pandora/data_in/discovery/pandorafms.selenium.4/bin/pandora_selenium -c /path/to/configuration/file -s /path/to/side/file -t task_name -i agent_interval -g ID_group -x</font> |
<font inherit/Courier New,Courier,monospace;;inherit;;inherit> | |
module_plugin /var/spool/pandora/data_in/discovery/pandorafms.selenium.4/bin/pandora_selenium -c /パス/への/構成/ファイル -s /パス/への/side/ファイル -t タスク名 -i エージェント間隔 -g ID_グループ -x | |
</font> | |
| |
</WRAP> | </WRAP> |
{{ :wiki:pfms-wux_4-image_240.png }} | {{ :wiki:pfms-wux_4-image_240.png }} |
| |
Pandora FMS と同じサーバにインストールされていないソフトウェアエージェントからプラグインを実行することも可能です。 このためには、ソフトウェアエージェントをホストしているサーバーで、プラグインの''.disk''パッケージをローカルにダウンロードし、そのフォーマットを''.zip''に変更するために名前を変更し、バイナリおよび動作に必要な残りのファイルにアクセスするためにコンテンツを解凍する必要があります。 | If you wish, it is also possible to execute the plugin from a EndPoint that **is not** installed in the same server as Pandora FMS. For that, it is necessary to download locally in the server that hosts the EndPoint the ''.disk'' package of the plugin, rename it to modify its format to ''.zip'' and decompress the content to have access to the binary and to the rest of the files that it may need to work. |
| |
| 必要に応じて、Pandora FMS と同じサーバにインストールされていないエンドポイントからプラグインを実行することも可能です。そのためには、エンドポイントをホストしているサーバにプラグインの ''.disk'' パッケージをローカルにダウンロードし、名前を ''.zip'' に変更して内容を解凍し、バイナリと動作に必要なその他のファイルにアクセスできるようにする必要があります。 |
| |
また、''-x'' パラメータで XML 形式のデータを送信し、''-S'' パラメータで XML を受信する Tentacle サーバの IP アドレスとポートを指定します。 実行は以下のようになります: | また、''-x'' パラメータで XML 形式のデータを送信し、''-S'' パラメータで XML を受信する Tentacle サーバの IP アドレスとポートを指定します。 実行は以下のようになります: |
| |
<WRAP center round box 90%> | <WRAP center round box 90%> |
| <font inherit/Courier New,Courier,monospace;;inherit;;inherit>module_plugin /path/to/binary/file/pandora_selenium -c /path/to/configuration/file -s /path/to/side/file -t task_name -i agent_interval -g ID_group -x -S IP_address_Tentacle_server:Tentacle_port</font> |
<font inherit/Courier New,Courier,monospace;;inherit;;inherit> | |
module_plugin /パス/への/バイナリ/ファイル/pandora_selenium -c /パス/への/構成/ファイル -s /パス/への/side/ファイル -t タスク名 -i エージェント間隔 -g ID_グループ -x -S IP_住所_Tentacle_サーバー:Tentacle_ポート | |
</font> | |
| |
</WRAP> | </WRAP> |
<WRAP center round tip 90%> | <WRAP center round tip 90%> |
| |
最後に、この種の実行は、端末から手動で実行することも、ソフトウェア・エージェントから実行することも可能であるが、**常にディスカバリーPFMSセクションから実行することを推奨する**ことに留意すべきである。 | Finally, it should be noted that, although it is possible to perform this type of executions, either manually from the terminal or from the EndPoint, **the recommendation is to always carry them out** from PFMS Discovery section, since the original operation method is designed to work in this way, and the task configuration is considerably simpler. |
| |
| </WRAP> |
| |
| <WRAP center round tip 90%> |
| |
| 最後に、このタイプの実行は、ターミナルから手動で実行することも、エンドポイントから実行することもできますが、元々自動検出で動作するように設計されておりタスク設定がかなり簡単になるので、**常に PFMS 自動検出から実行することをお勧めします** 。 |
| |
</WRAP> | </WRAP> |
| |
<wrap #ks4 /> | <wrap #ks4 /> |
| |
===== パラメータと設定 ===== | ===== パラメータと設定 ===== |
| |
===== .SIDEファイル用コマンド ===== | ===== .SIDEファイル用コマンド ===== |
| |
追加モジュールを生成するために、以下のカスタムコマンドを設定することができます。 ''<nowiki>//</nowiki>''): | The following custom commands may be configured to generate additional modules (all custom commands must begin with ''<nowiki>//</nowiki>''): |
| |
| 追加のモジュールを生成するために、次のカスタムコマンドを設定できます (すべてのカスタムコマンドは ''<nowiki>//</nowiki>'' で始まる必要があります)。 |
| |
| |''<nowiki>//phase_start:<phase_name></nowiki>'' |It indicates the beginning of a stage, which will \\ last until another ''<nowiki>//phase_start</nowiki>'' command is found \\ or until the end of the test. \\ This will generate a module with the status of the stage and another module with the time it has taken to complete. \\ For example: ''<nowiki>//phase_start:Login</nowiki>'' | |
| |''<nowiki>//getValue;<module_name>;<module_type>;<regexp></nowiki>'' |It generates a module with content from the web page \\ which may be obtained by means of a regular expression \\ from the source code of the web page. \\ For example: \\ ''<nowiki>//getValue;Temperature;generic_data;<span class="temperature">(\d+\.*\,*\d*).*</span></nowiki>'' \\ You would get the temperature indicated on a web page with this line in its source code: \\ ''<nowiki><p> The temperature of the solar panel is: <span class="temperature">54 º C</span></p></nowiki>'' | |
| |''<nowiki>//getVariable;<module_name>;<module_type>;<variable></nowiki>'' |It generates a module with the content \\ of a variable stored in the SIDE with the following ''store'' commands. \\ For example: \\ ''<nowiki>//getVariable;List count;generic_data;listCount</nowiki>'' | |
| |''<nowiki>//getScreenshot;<module_name></nowiki>'' |It generates a module with a screenshot of the current browser. \\ For example: \\ ''<nowiki>//getScreenshot;URL home</nowiki>'' | |
| |
| ''<nowiki>//phase_start:<phase_name></nowiki>'' | フェーズの開始を示す。このフェーズは、別の''<nowiki>//phase_start</nowiki>''コマンドが見つかるか、 テストが終了するまで続く。 \\ これは、フェーズのステータスを示すモジュールと、完了までにかかった時間を示す別のモジュールを生成する。 \\ 例えば、こうだ: ''<nowiki>//phase_start:Login</nowiki>'' | | | ''<nowiki>//phase_start:<phase_name></nowiki>'' | フェーズの開始を示す。このフェーズは、別の''<nowiki>//phase_start</nowiki>''コマンドが見つかるか、 テストが終了するまで続く。 \\ これは、フェーズのステータスを示すモジュールと、完了までにかかった時間を示す別のモジュールを生成する。 \\ 例: ''<nowiki>//phase_start:Login</nowiki>'' | |
| ''<nowiki>//getValue;<module_name>;<module_type>;<regexp></nowiki>'' | ウェブページのソースコードから正規表現で得られるウェブページの内容を含むモ ジュールを生成する。 \\ 例えば、こうだ: \\ ''<nowiki>//getValue;Temperature;generic_data;<span class="temperature">(\d+\.*\,*\d*).*</span></nowiki>'' \\ ソースコードにこの行があるウェブページでは、温度が表示される: \\ ''<nowiki><p> The temperature of the solar panel is: <span class="temperature">54 º C</span></p></nowiki>'' | | | ''<nowiki>//getValue;<module_name>;<module_type>;<regexp></nowiki>'' | ウェブページのソースコードから正規表現で得られるウェブページの内容を含むモ ジュールを生成する。 \\ 例: \\ ''<nowiki>//getValue;Temperature;generic_data;<span class="temperature">(\d+\.*\,*\d*).*</span></nowiki>'' \\ ソースコードにこの行があるウェブページでは、温度が表示される: \\ ''<nowiki><p> The temperature of the solar panel is: <span class="temperature">54 º C</span></p></nowiki>'' | |
| ''<nowiki>//getVariable;<module_name>;<module_type>;<variable></nowiki>'' | 以下の''store''コマンドで、SIDEに格納された変数の中身をモジュールとして生成する。 \\ 例えば、こうだ: \\ ''<nowiki>//getVariable;List count;generic_data;listCount</nowiki>'' | | | ''<nowiki>//getVariable;<module_name>;<module_type>;<variable></nowiki>'' | 以下の''store''コマンドで、SIDEに格納された変数の中身をモジュールとして生成する。 \\ 例: \\ ''<nowiki>//getVariable;List count;generic_data;listCount</nowiki>'' | |
| ''<nowiki>//getScreenshot;<module_name></nowiki>'' | 現在のブラウザのスクリーンショットを含むモジュールを生成します。 \\ 例えば、こうだ: \\ ''<nowiki>//getScreenshot;URL home</nowiki>'' | | | ''<nowiki>//getScreenshot;<module_name></nowiki>'' | 現在のブラウザのスクリーンショットを含むモジュールを生成します。 \\ 例: \\ ''<nowiki>//getScreenshot;URL home</nowiki>'' | |
| |
プラグインで実行可能なSIDEファイルのコマンドは以下の通りです(使用方法についてはSelenium IDEのドキュメントを参照してください): | プラグインで実行可能なSIDEファイルのコマンドは以下の通りです(使用方法についてはSelenium IDEのドキュメントを参照してください): |
| |
<wrap #ks6 /> | <wrap #ks6 /> |
===== ウェブ・スクラッピング ===== | ===== ウェブスクレーピング ===== |
| |
Pandora FMSでウェブスクラッピングを行うことは、複雑なトランザクションのパフォーマンスや結果を測定するために設計されたものですが、実現可能です。 | Pandora FMSでウェブスクラッピングを行うことは、複雑なトランザクションのパフォーマンスや結果を測定するために設計されたものですが、実現可能です。 |