| 両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン |
| ja:documentation:pandorafms:monitoring:06_web_monitoring [2025/06/15 06:55] – [LWP の代わりの Curl の利用] junichi | ja:documentation:pandorafms:monitoring:06_web_monitoring [2025/11/02 04:41] (現在) – [HTTP の簡単な認証] junichi |
|---|
| ==== 概要 ==== | ==== 概要 ==== |
| |
| In Pandora FMS, the Web server works as an separate server, similar to the [[:en:documentation:pandorafms:introduction:02_architecture#ks1_1_2|Network server]], to the [[:en:documentation:pandorafms:introduction:02_architecture#ks1_1_4|WMI server ]] or to the [[:en:documentation:pandorafms:introduction:02_architecture#ks1_1_6|Plugin server]]. This system operates on the principle of //web transaction//, where each completed transaction against one or more WEB pages is defined by one or more consecutive steps, which must be completed successfully in order to consider the transaction as successfully completed. | In Pandora FMS, the Web Server works in a separate server, the [[:en:documentation:pandorafms:introduction:02_architecture#network_server|Network server]]. This system operates on the principle of //web transaction//, where each completed transaction against one or more WEB pages is defined by one or more consecutive steps, which must be completed successfully in order to consider the transaction as successfully completed. |
| |
| Pandora FMS では、ネットワークサーバ、WMIサーバ、プラグインサーバなどと同様に、独立したサーバとして機能します。 このシステムは、"Webトランザクション" という考えのもとで動作します。ここでは、各トランザクションは 1つまたは複数の連続ステップで定義され、トランザクションを正常に完了させるために、正しく順序だてられている必要があります。"Webトランザクション" の実行では、フォーム内での自分自身の認証、メニューオプションのクリック、フォームの入力、各ステップで特定のテキスト文字列を返すことの確認など、完全なブラウジングプロセスを忠実に再現します。 | Pandora FMS では、ウェブサーバは [[:ja:documentation:pandorafms:introduction:02_architecture#network_server|ネットワークサーバ]] 内で動作します。このシステムは //Web トランザクション// の原理に基づいて動作します。つまり、1 つ以上の Web ページに対する各トランザクションは、1 つ以上の連続したステップによって定義され、トランザクションが正常に完了したとみなされるには、これらのステップが正常に完了している必要があります。 |
| |
| <WRAP center round info 90%> | <WRAP center round info 90%> |
| |
| * **The Web server has important limitations,such as dynamic management of JavaScript at runtime**. | * **The Network Server has important limitations,such as dynamic management of JavaScript at runtime**. |
| * For more complex web transactions, Pandora FMS has another much more powerful (and complex) component called [[:en:documentation:pandorafms:monitoring:13_user_monitorization|WUX (Web User Experience) monitoring]]. | * For more complex web transactions, Pandora FMS has another much more powerful (and complex) component called [[:en:documentation:pandorafms:monitoring:13_user_monitorization|WUX (Web User Experience) monitoring]]. |
| |
| <WRAP center round info 90%> | <WRAP center round info 90%> |
| |
| * **Web サーバには、実行時の JavaScript の動的管理などの重要な制限があります**。 | * **ネットワークサーバには、実行時の JavaScript の動的管理などの重要な制限があります**。 |
| * より複雑な Web トランザクション用に、Pandora FMS には [[:ja:documentation:pandorafms:monitoring:13_user_monitorization|WUX 監視 (Web ユーザエクスペリエンス)]] と呼ばれる、さらに強力な (そして複雑な) コンポーネントがあります。 | * より複雑な Web トランザクション用に、Pandora FMS には [[:ja:documentation:pandorafms:monitoring:13_user_monitorization|WUX 監視 (Web ユーザエクスペリエンス)]] と呼ばれる、さらに強力な (そして複雑な) コンポーネントがあります。 |
| |
| ==== インストールと設定 ==== | ==== インストールと設定 ==== |
| |
| The [[:en:documentation:pandorafms:installation:04_configuration#webserver|Web server must be activated]] and Pandora FMS server restarted. To activate the Web server, it must be modified in PFMS server configuration file: | The [[:en:documentation:pandorafms:installation:04_configuration#networkserver|Network Server]] is enabled by default. Depending on the number of requests you may have to increase the number of threads and the default timeout: |
| |
| [[:ja:documentation:pandorafms:installation:04_configuration#webserver|Webサーバを有効化]]し、Pandora FMS サーバを再起動してください。Webサーバを有効化するには、PFMS サーバ設定ファイルを変更する必要があります。 | [[:ja:documentation:pandorafms:installation:04_configuration#networkserver|ネットワークサーバ]]はデフォルトで有効になっています。リクエスト数に応じて、スレッド数とデフォルトのタイムアウト値を増やす必要がある場合があります。 |
| | |
| webserver 1 | |
| | |
| Depending on the number of requests you may have to increase the number of threads and the default timeout: | |
| | |
| リクエストの数に応じて、スレッド数とデフォルトのタイムアウトを増やす必要がある場合があります。 | |
| |
| web_threads 1 | web_threads 1 |
| web_timeout 60 | web_timeout 60 |
| |
| Goliat が使うライブラリのタイプ (LWP または CURL) を変更できる拡張設定トークンがあります。デフォルトでは CURL が利用されていますが、切り替えることができます。 | |
| |
| | |
| # Use curl or LWP | # Use curl or LWP |
| <wrap #ks1_3 /> | <wrap #ks1_3 /> |
| |
| ==== ウェブモジュールの作成方法 ==== | ==== ウェブモジュールの作成 ==== |
| ウェブページをモニタするには、まずはモジュールタブをクリックします。その後 'ウェブサーバモジュールの新規作成(Create a new webserver module)' を選択し、//作成(Create)// をクリックします。 | |
| |
| {{ :wiki:pfms-creating_web_modules-goliat_server-img_002.png }} | To remotely monitor a web page, once the agent has been created, click on the top tab of the modules (<wrap :en>**Modules**</wrap>). In there, select <wrap :en>**Create a new web module**</wrap> and click <wrap :en>**Create**</wrap>: |
| |
| //作成//をクリックすると、ウェブをモニタするために必要な設定を入力するためのフォームが表示されます。名前や、Webチェックのタイプなど、基本的なものです。 | ウェブページをリモート監視するには、エージェントを作成したら、モジュールのトップタブ(<wrap :ja>**モジュール(Modules)**</wrap>)をクリックします。そこで、<wrap :ja>**ウェブモジュールの新規作成(Create a new web module)**</wrap>を選択し、<wrap :ja>**作成(Create)**</wrap>をクリックします。 |
| |
| {{ :wiki:goliat_types.jpg?600 |goliat_types.jpg}} | Select the type of WEB check: |
| |
| 複数のチェックタイプが選択できます。 | ウェブチェックのタイプを選択します: |
| |
| * **Remote HTTP module to check latency**: 最初のリクエストから最後のチェックが完了するまでのトータルの時間を取得します (ウェブチェックを完了するには、1つ以上のトランザクションがあります)。複数のリクエストが定義されている場合、それぞれの平均時間が利用されます。 | * <wrap :en>**Remote HTTP module to check latency**</wrap>: It obtains the total time elapsed from the first request until the last one is checked (in a WEB test there are one or more intermediate requests that complete the transaction). If at check definition, the transaction is defined to be performed more than once, the average time of each request will be used. |
| | * <wrap :en>**Remote HTTP module to check server response**</wrap>: It gets 1 ( ''OK'' ) or 0 ( ''CRITICAL'' ) as a result of checking the whole transaction. If there are several attempts, but at least one of them fails, the test as a whole is considered to fail as well. Precisely, the number of attempts is sometimes used to avoid false positives, for that purpose use the //retries// field in advanced fields. |
| | * <wrap :en>**Remote HTTP module to retrieve numeric data**</wrap>: It gets a numeric value, parsing the HTTP response using a regular expression to get that value. |
| | * <wrap :en>**Remote HTTP module to retrieve string data**</wrap>: Analogous to the previous point but with a text string. |
| | * <wrap :en>**Remote HTTP module to check server status code**</wrap>: By means of the **curl** tool, duly enabled with the ''web_engine curl'' configuration token, HTTP headers may be returned. |
| |
| | * **Remote HTTP module to check latency**: 最初のリクエストから最後のチェックが完了するまでのトータルの時間を取得します (ウェブチェックを完了するには、1つ以上のトランザクションがあります)。複数のリクエストが定義されている場合、それぞれの平均時間が利用されます。 |
| * **Remote HTTP module to check server response**: すべてのトランザクションの結果をチェックし、1 (正常) もしくは、0 (異常) を返します。一部のステップが失敗すると、全体を障害として認識します。誤検出を避けるために、リトライ回数を設定することができます。 障害が発生した場合にテストを何回か実行する場合は、//リトライ// フィールドを使用してください(下記の詳細フィールドを参照)。 | * **Remote HTTP module to check server response**: すべてのトランザクションの結果をチェックし、1 (正常) もしくは、0 (異常) を返します。一部のステップが失敗すると、全体を障害として認識します。誤検出を避けるために、リトライ回数を設定することができます。 障害が発生した場合にテストを何回か実行する場合は、//リトライ// フィールドを使用してください(下記の詳細フィールドを参照)。 |
| |
| * **Remote HTTP module to retrieve numeric data**: 正規表現を利用して HTTP 応答から数値を取得します。 | * **Remote HTTP module to retrieve numeric data**: 正規表現を利用して HTTP 応答から数値を取得します。 |
| |
| * **Remote HTTP module to retrieve string data**: 正規表現を利用して HTTP 応答から文字列を取得します。 | * **Remote HTTP module to retrieve string data**: 正規表現を利用して HTTP 応答から文字列を取得します。 |
| |
| * **Remote HTTP module to check server status code:**: ''web_engine curl'' の設定トークンで **curl** ツールの利用を有効化すると、HTTPヘッダーを返すことができます。 | * **Remote HTTP module to check server status code:**: ''web_engine curl'' の設定トークンで **curl** ツールの利用を有効化すると、HTTPヘッダーを返すことができます。 |
| |
| **ウェブチェック** | <wrap :en>**Web checks**</wrap>: This essential field defines the WEB check to be performed. It is defined in one or more steps, or simple requests. The checks start with the ''task_begin'' tag and end with the ''task_end'' tag. |
| |
| この必須フィールドは、実行される WEB チェックを定義します。 これは、1つ以上のステップまたは単一のリクエストで定義されます。 これらのリクエストは、Web 検査フィールドに特別な形式で設定しなければなりません。 チェックは //task_begin// で開始し、//task_end// で終了します。 | <wrap :ja>**ウェブチェック**</wrap>: この必須フィールドは、実行するウェブチェックを定義します。これは、1つ以上のステップ、または単純なリクエストで定義されます。チェックは ''task_begin'' タグで始まり、''task_end'' タグで終了します。 |
| | |
| | Several additional variables are available for form testing: |
| | |
| | フォームのテストには、いくつかの追加変数を使用できます。 |
| | |
| | * <wrap :en>**resource**</wrap> (1 or 0): Download all web resources (images, videos, etc.). |
| | * <wrap :en>**cookie**</wrap> (1 or 0): Keep a cookie, or an open session for later checks. |
| | * <wrap :en>**variable_name**</wrap>: Name of a variable in a form. |
| | * <wrap :en>**variable_value**</wrap>: Value of the previous variable in the form. |
| | |
| | * **resource (1 または 0)**:ウェブリソース (画像、ビデオなど) のすべてをダウンロードします。 |
| | * **cookie (1 または 0)**:クッキーを保持し、以降のチェックのためにセッションを保持します。 |
| | * **variable_name**:フォームの変数名です。 |
| | * **variable_value**:上記変数名に対する値です。 |
| |
| 簡単なトランザクションの例を以下に示します。 | 簡単なトランザクションの例を以下に示します。 |
| task_end | task_end |
| </code> | </code> |
| |
| {{ :wiki:resources-manage_agents-modules-remote_http_module_to_check_server_status_code.png?550 }} | |
| |
| 保存したのち、モジュールを強制実行して結果を見ることができます。 | |
| |
| {{ :wiki:resources-manage_agents-modules-remote_http_module_to_check_server_status_code-result.png?600 }} | |
| |
| コマンドを追加した別の例: | コマンドを追加した別の例: |
| check_not_string Section 3 | check_not_string Section 3 |
| </code> | </code> |
| |
| ''check_string'' 構文がとる引数は、通常のテキスト文字列ではなく、"正規表現"です。 つまり、文字列 "Pandora FMS (4.0)" の検索は正規表現で行う必要があります。 例えば、''Pandora FMS \(4.0\)'' です。 これにより、強力な検索を行うことができますが、文字や数字以外の文字は ''\'' でエスケープする必要があることに注意してください。 | |
| |
| フォームをチェックするには、いくつかの拡張変数があります。 | |
| |
| * **resource (1 または 0)**:ウェブリソース (画像、ビデオなど) のすべてをダウンロードします。 | |
| * **cookie (1 または 0)**:クッキーを保持し、以降のチェックのためにセッションを保持します。 | |
| * **variable_name**:フォームの変数名です。 | |
| * **variable_value**:上記変数名に対する値です。 | |
| |
| これらの値を利用することにより、フォームにデータを送信し、正しく動作するかどうかをチェックすることができます。 | |
| |
| <WRAP center round important 90%> | <WRAP center round important 90%> |
| |
| ==== ウェブページのフォームのチェック ==== | ==== ウェブページのフォームのチェック ==== |
| より実用的な、Web フォームのチェックです。 しかし、これは単に Web ページ上のテキストをチェックするよりもはるかに複雑です。 このサンプルチェックでは、Pandora 自身のコンソールを使用してログインし、ログインできたことを確認し、ログインしているユーザのデータが表示されているワークスペースのテキストを確認します。 デフォルトのコンソールであれば、管理者のユーザには、"Admin Pandora" という記述が含まれています。 | |
| |
| このタイプのチェックを実行するには、ログインに必要な資格情報が必要です。これらの値を使用して HTML フォームに「送信」するためです。また、ページに移動して HTML のソースから変数名を見る必要があります。どのように Goliat が動作するかを理解するためには、HTML に関する最小限の知識が必要です。 | A form check is much more complex than simply checking text on a web page. In order to perform this type of check, you must have the necessary credentials. In addition, you need to //go// to the page and get the HTML code to get the variable names, and then you need to have minimal knowledge of HTML to enter the query for the Network Server. |
| | |
| | フォームチェックは、Webページ上のテキストを単純にチェックするよりもはるかに複雑です。この種のチェックを実行するには、必要な認証情報が必要です。さらに、ページにアクセスしてHTMLコードを取得し、変数名を取得する必要があります。さらに、ネットワークサーバへのクエリを入力するには、最低限のHTMLの知識が必要です。 |
| | |
| | <WRAP center round tip 90%> |
| | |
| | The practical method to design a WEB transactional test with several steps is to test them one by one in debugging mode. |
| |
| <WRAP center round tip 60%> | |
| 複数ステップの WEB トランザクションテストを設定するときに、設定を確認する良い方法としては、ステップの 1つで何かが見逃された場合に備えて、ステップごとにテストすることです。 | |
| </WRAP> | </WRAP> |
| | |
| | <WRAP center round tip 90%> |
| | |
| | 複数のステップを含む WEB トランザクションテストを設計する実用的な方法は、デバッグモードでステップを 1 つずつテストすることです。 |
| | |
| | </WRAP> |
| | |
| |
| Pandora コンソールのログイン URL が以下であると仮定します。 | Pandora コンソールのログイン URL が以下であると仮定します。 |
| </code> | </code> |
| |
| Pandora FMS 上での全体の設定は次のようになります。 | <wrap #ks1_6 /> |
| |
| {{ wiki:goliat_full_sample.jpg?800 }} | |
| |
| ==== サーバステータスコードの確認 ==== | ==== サーバステータスコードの確認 ==== |
| ==== HTTP の簡単な認証 ==== | ==== HTTP の簡単な認証 ==== |
| |
| いくつかのウェブページでは、[[https://en.wikipedia.org/wiki/Basic_access_authentication|HTTP 基本認証]] を必要とします。通常、これは高速認証、高度なセキュリティチェック(暗号化、データ永続性など)へのアクセスを可能にする最小限のセキュリティとして使用されます。 | Some pages may require simple HTTP authentication. It is generally used as a quick check, a minimal security //greeting// that allows access to more advanced security checks (encryption, data persistence, etc.). |
| |
| [[:wiki:conexion_http.png?id=ja:documentation:03_monitoring:06_web_monitoring&media=wiki:conexion_http.png|{{ :wiki:conexion_http.png?nolink&650 }}]] | 一部のページでは、シンプルなHTTP認証が必要となる場合があります。これは通常、より高度なセキュリティチェック(暗号化、データの永続化など)へのアクセスを可能にする、最低限のセキュリティチェックとして使用されます。 |
| |
| (上記スクリーンショットのように)拡張オプションで設定することも、次の設定トークンを使用して WEB タスク定義で直接設定することもできます。 | <WRAP center round important 90%> |
| |
| **チェックタイプ(Check type)** | * The use of quotation marks in the password for ''http_auth_pass'' is not supported. |
| | * Avoid using single quotation marks. |
| |
| HTTP サーバチェックタイプ | </WRAP> |
| |
| **http認証(ログイン)(http auth (login))** | <WRAP center round important 90%> |
| | |
| ユーザ名 | |
| | |
| **http認証(パスワード)(http auth (password))** | |
| | |
| パスワード | |
| | |
| **プロキシ認証レルム(Proxy auth realm)** | |
| | |
| 認証レルム名 | |
| | |
| **プロキシ認証(サーバ)(Proxy auth (server))** | |
| | |
| 待ち受けているドメインと HTTP ポート | |
| | |
| **プロキシURL(Proxy URL)** | |
| | |
| プロキシサーバの URL | |
| | |
| **プロキシ認証(ログイン)(Proxy auth (login))** | |
| | |
| プロキシ接続ユーザ | |
| | |
| **プロキシ認証(パスワード)(Proxy auth (pass))** | |
| | |
| プロキシ接続パスワード | |
| | |
| タスク全体の例: | |
| <code> | |
| | |
| task_begin | |
| get http://artica.es/pandoraupdate4/ui/ | |
| cookie 1 | |
| resource 1 | |
| check_string Pandora FMS Update Manager \(4.0\) | |
| http_auth_serverport artica.es:80 | |
| http_auth_realm Private area | |
| http_auth_user admin | |
| http_auth_pass xxxx | |
| task_end | |
| | |
| </code> | |
| | |
| <WRAP center round important 60%>The use of quotation marks in the password for ''http_auth_pass'' is not supported. Avoid using single quotes '' ' ''. | |
| | |
| </WRAP> | |
| |
| <WRAP center round important 60%> ''http_auth_pass'' に指定するパスワードではクォーテーションには対応していません。シングルクォート '' ' '' の利用は避けてください。 | * ''http_auth_pass'' に指定するパスワードではクォーテーションには対応していません。 |
| | * シングルクォート '' ' '' の利用は避けてください。 |
| |
| </WRAP> | </WRAP> |
| |
| | <wrap #ks1_8 /> |
| |
| ==== WEB サービスおよび API モニタリング ==== | ==== WEB サービスおよび API モニタリング ==== |
| ===== 高度なトランザクション監視 ===== | ===== 高度なトランザクション監視 ===== |
| |
| Goliath が提供する機能に加えて、Web トランザクション監視を実行する他の方法があります。一つは分散型(UX)で、アクセスできないネットワークであっても、サーバとは異なるシステムに "エージェント" として展開します。もう一つは集中化された方法(WUX)です。より詳細については [[ja:documentation:03_monitoring:13_user_monitorization|ユーザエクスペリエンス監視 (UX および WUX)]] を参照してください。 | In addition to the feature offered by PFMS Web server, there is another way to perform transactional monitoring: the [[:en:documentation:pandorafms:monitoring:13_user_monitorization|WEB User Experience Monitoring (WUX)]]. |
| | |
| | PFMS ウェブサーバが提供する機能に加えて、トランザクション監視を実行する別の方法があります: [[:ja:documentation:pandorafms:monitoring:13_user_monitorization|WEB ユーザエクスペリエンス監視 (WUX)]]。 |
| |
| [[ja:documentation:start|Pandora FMS ドキュメント一覧に戻る]] | [[ja:documentation:start|Pandora FMS ドキュメント一覧に戻る]] |