| 両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン |
| ja:documentation:pandorafms:monitoring:06_web_monitoring [2026/04/18 02:17] – [Checking a web page load time] junichi | ja:documentation:pandorafms:monitoring:06_web_monitoring [2026/04/18 02:33] (現在) – [高度なトランザクション監視] junichi |
|---|
| <wrap #ks3_2 /> | <wrap #ks3_2 /> |
| |
| ==== Checking a web page response ==== | ==== ウェブページの応答を確認する ==== |
| |
| With a <wrap :en>**Remote HTTP module to check server response**</wrap> type module, a ''1'' (<wrap :en>**OK**</wrap>) or a ''0'' (<wrap :en>**CRITICAL**</wrap>) is obtained as a result of checking the entire transaction. | With a <wrap :en>**Remote HTTP module to check server response**</wrap> type module, a ''1'' (<wrap :en>**OK**</wrap>) or a ''0'' (<wrap :en>**CRITICAL**</wrap>) is obtained as a result of checking the entire transaction. |
| | |
| | <wrap :ja>**Remote HTTP module to check server response**</wrap> タイプのモジュールでは、トランザクション全体をチェックした結果、''1''(<wrap :ja>**正常(OK)**</wrap>)または ''0''(<wrap :ja>**障害(CRITICAL)**</wrap>)が得られます。 |
| |
| <WRAP center round tip 90%> | <WRAP center round tip 90%> |
| |
| The module type (''web_proc'') used here dispenses with values set in the thresholds: It only accepts false (''0'') and true values. In this way, it is uniquely and automatically associated with normal and critical (''0'') states. | The module type (''web_proc'') used here dispenses with values set in the thresholds: It only accepts false (''0'') and true values. In this way, it is uniquely and automatically associated with normal and critical (''0'') states. |
| | |
| | </WRAP> |
| | |
| | <WRAP center round tip 90%> |
| | |
| | ここで使用されているモジュールタイプ(''web_proc'')は、しきい値に設定された値を必要としません。偽(''0'')と真の値のみを受け入れます。このようにして、正常状態と障害状態(''0'')に一意かつ自動的に関連付けられます。 |
| |
| </WRAP> | </WRAP> |
| |
| If there are several attempts but at least one of them fails, the test as a whole is also considered to have failed. Specifically, the number of attempts is sometimes used to avoid false positives; for this, use the <wrap :en>**[[#ks1_4_6#|Requests]]**</wrap> field in advanced options. | If there are several attempts but at least one of them fails, the test as a whole is also considered to have failed. Specifically, the number of attempts is sometimes used to avoid false positives; for this, use the <wrap :en>**[[#ks1_4_6#|Requests]]**</wrap> field in advanced options. |
| | |
| | 複数回試行しても、そのうち少なくとも 1回が失敗した場合、テスト全体も失敗したとみなされます。具体的には、試行回数は誤検出を回避するために使用されることがあります。そのためには、詳細オプションの<wrap :ja>**[[#ks1_4_6#|Requests]]**</wrap> フィールドを使用してください。 |
| |
| In its basic syntax, it is enough to add the following in the <wrap :en>**Web Checks**</wrap> box: | In its basic syntax, it is enough to add the following in the <wrap :en>**Web Checks**</wrap> box: |
| | |
| | 基本的な構文では、<wrap :ja>**ウェブチェック(Web Checks)**</wrap> ボックスに以下を追加するだけで十分です。 |
| |
| <code> | <code> |
| |
| Unlike the [[#ks1_3_5|HTTP status check]], the previous check brings all the HTML code, which can be used for additional purposes such as checking that a text string exists on said website with ''[[#check_string|check_string]]'': | Unlike the [[#ks1_3_5|HTTP status check]], the previous check brings all the HTML code, which can be used for additional purposes such as checking that a text string exists on said website with ''[[#check_string|check_string]]'': |
| | |
| | [[#ks1_3_5|HTTPステータスチェック]]とは異なり、前述のチェックではすべての HTML コードが取得されるため、''[[#check_string|check_string]]'' を使用して、指定された Web サイトにテキスト文字列が存在するかどうかを確認するなど、追加の目的に使用できます。 |
| |
| <code> | <code> |
| * Although other parameters such as ''[[#resource|resource]]'' can be used to download all resources (images, etc.), this will only overload the PFMS Server with unnecessary work. \\ //The addition of other parameters must be weighed carefully; only those really necessary should be used//, especially if it is a simple query. | * Although other parameters such as ''[[#resource|resource]]'' can be used to download all resources (images, etc.), this will only overload the PFMS Server with unnecessary work. \\ //The addition of other parameters must be weighed carefully; only those really necessary should be used//, especially if it is a simple query. |
| * The same applies to downloading and saving ''[[#cookie|cookies]]''; unless other web check steps are going to be performed, you can explicitly declare to skip them: | * The same applies to downloading and saving ''[[#cookie|cookies]]''; unless other web check steps are going to be performed, you can explicitly declare to skip them: |
| | |
| | * 要求されたテキスト文字列が存在する場合は、通常ステータスに移行し、存在しない場合はクリティカルステータスに移行します。 |
| | * ''[[#check_not_string|check_not_string]] <テキスト>'' は、逆の場合に使用できます。指定されたテキストが**存在しない**場合は、通常ステータスに移行し、存在する場合はクリティカルステータスに移行します。 |
| | * ''[[#resource|resource]]'' などの他のパラメータを使用してすべてのリソース(画像など)をダウンロードすることもできますが、これは PFMS サーバに不要な負荷をかけるだけです。//他のパラメータの追加は慎重に検討する必要があります。特に単純なクエリの場合は、本当に必要なもののみを使用してください。// |
| | * ''[[#cookie|cookies]]'' のダウンロードと保存についても同様です。他のウェブチェック手順が実行されない限り、明示的にスキップするように指定できます。 |
| |
| <code> | <code> |
| |
| Note the use of comments at the beginning of a line with ''# ''. | Note the use of comments at the beginning of a line with ''# ''. |
| | |
| | </WRAP> |
| | |
| | <WRAP center round tip 90%> |
| | |
| | 行頭に ''#'' を付けるとコメントになることに注意してください。 |
| |
| </WRAP> | </WRAP> |
| |
| <wrap #ks3_3 /> | <wrap #ks3_3 /> |
| ==== Obtaining numeric data from a web page ==== | |
| | ==== ウェブページから数値データを取得する ==== |
| |
| To check that a web page responds with a numeric value, or contains a specific value, the <wrap :en>**Remote HTTP module to retrieve numeric data**</wrap> module type is used. | To check that a web page responds with a numeric value, or contains a specific value, the <wrap :en>**Remote HTTP module to retrieve numeric data**</wrap> module type is used. |
| | |
| | ウェブページが数値で応答するか、特定の値を含むかどうかを確認するには、<wrap :ja>**Remote HTTP module to retrieve numeric data**</wrap> モジュールタイプを使用します。 |
| |
| For this, the basic query ''[[#get_content|get_content]] \d+ '' can be used (the added regular expression //filters// only digits). The mechanism is to analyze the entire HTTP response from the beginning and start comparing until it matches the given regular expression. | For this, the basic query ''[[#get_content|get_content]] \d+ '' can be used (the added regular expression //filters// only digits). The mechanism is to analyze the entire HTTP response from the beginning and start comparing until it matches the given regular expression. |
| | |
| | このためには、基本的なクエリ ''[[#get_content|get_content]] \d+ '' を使用できます(追加された正規表現は数字のみをフィルタリングします)。このメカニズムは、HTTP レスポンス全体を最初から分析し、指定された正規表現に一致するまで比較を開始することです。 |
| |
| * **Thresholds for warning and critical states must be set by the user**. By default, these thresholds are zero, so any valid numeric check obtained will be classified as normal status. | * **Thresholds for warning and critical states must be set by the user**. By default, these thresholds are zero, so any valid numeric check obtained will be classified as normal status. |
| * To force a direct query with Curl to the web server (thus skipping CDN cache), PFMS includes the command ''[[#header|header]] Pragma: no-cache'' by default. \\ ''Pragma'' was chosen instead of ''Cache-Control'' to maintain compatibility with HTTP 1.0 (the most used versions currently are 1.1 and 2.0). | * To force a direct query with Curl to the web server (thus skipping CDN cache), PFMS includes the command ''[[#header|header]] Pragma: no-cache'' by default. \\ ''Pragma'' was chosen instead of ''Cache-Control'' to maintain compatibility with HTTP 1.0 (the most used versions currently are 1.1 and 2.0). |
| * For an advanced query and to extract a numeric value from **any** HTML element on the page, such as a level 3 heading or the first paragraph that appears with a specific CSS Attribute, see the ''[[#get_content_advanced|get_content_advanced]]'' parameter. | * For an advanced query and to extract a numeric value from **any** HTML element on the page, such as a level 3 heading or the first paragraph that appears with a specific CSS Attribute, see the ''[[#get_content_advanced|get_content_advanced]]'' parameter. |
| | |
| | * **警告状態と障害状態のしきい値はユーザが設定する必要があります。** デフォルトではこれらのしきい値はゼロなので、有効な数値チェックはすべて正常状態として分類されます。 |
| | * [[#ks1_4_2|プロキシサーバ]] は、必要な <wrap :ja>**Proxy**</wrap> フィールドに入力することで使用できます。 |
| | * ''[[#debug|debug]]'' 命令を追加すると、クエリとレスポンスが 2 つのファイルに保存され、後でデバッグできます。 |
| | * Curl を使用して Web サーバに直接クエリを実行する(CDN キャッシュをスキップする)ために、PFMS にデフォルトで ''[[#header|header]] Pragma: no-cache'' コマンドが含まれています。 \\ HTTP 1.0 との互換性を維持するために、''Cache-Control'' の代わりに ''Pragma'' が選択されました(現在最もよく使用されているバージョンは 1.1 と 2.0 です)。 |
| | * 高度なクエリを実行して、レベル 3 の見出しや特定の CSS 属性とともに表示される最初の段落など、ページ上の **任意の** HTML 要素から数値を抽出するには、''[[#get_content_advanced|get_content_advanced]]'' パラメーターを参照してください。 |
| |
| <WRAP center round info 90%> | <WRAP center round info 90%> |
| |
| If no figure is obtained from the last check, or the web server is unable to respond or is unreachable, **the last value and therefore the last recorded state of the module will be kept**. | If no figure is obtained from the last check, or the web server is unable to respond or is unreachable, **the last value and therefore the last recorded state of the module will be kept**. |
| | |
| | </WRAP> |
| | |
| | <WRAP center round info 90%> |
| | |
| | 最後のチェックで数値が得られなかった場合、または Web サーバが応答できないかアクセスできない場合は、**最後の値、つまりモジュールの最後に記録された状態が保持されます。** |
| |
| </WRAP> | </WRAP> |
| |
| <wrap #ks3_4 /> | <wrap #ks3_4 /> |
| ==== Obtaining text data from a web page ==== | |
| | ==== ウェブページからテキストデータを取得する ==== |
| |
| The <wrap :en>**Remote HTTP module to retrieve string data**</wrap> module type works similarly [[#ks1_3_3|to its numeric counterpart]] without the inconvenient filtering process to guarantee only figures. | The <wrap :en>**Remote HTTP module to retrieve string data**</wrap> module type works similarly [[#ks1_3_3|to its numeric counterpart]] without the inconvenient filtering process to guarantee only figures. |
| | |
| | <wrap :ja>**Remote HTTP module to retrieve string data**</wrap> モジュールタイプは、数値版と同様に動作しますが、数値のみを保証するためのフィルタリング処理は不要です。 |
| |
| <code> | <code> |
| |
| Here ''[[#get_content_advanced|get_content_advanced]]'' is the key parameter that allows choosing an HTML element (in this case a level three heading ''h3'', class ''ha2-b'') and then, according to a regular expression ''(.*)'', extracting the character string located there. | Here ''[[#get_content_advanced|get_content_advanced]]'' is the key parameter that allows choosing an HTML element (in this case a level three heading ''h3'', class ''ha2-b'') and then, according to a regular expression ''(.*)'', extracting the character string located there. |
| | |
| | ここで ''[[#get_content_advanced|get_content_advanced]]'' は、HTML 要素 (この場合はレベル 3 の見出し ''h3''、クラス ''ha2-b'') を選択し、正規表現 ''(.*)'' に従って、そこにある文字列を抽出することを可能にするキーパラメータです。 |
| |
| {{ :wiki:pfms-web_module-academy_pandorafms_com.png }} | {{ :wiki:pfms-web_module-academy_pandorafms_com.png }} |
| |
| Since for the normal condition values cannot be compared, the warning threshold or the critical threshold is used **with the inverse interval set** with the expected text: | Since for the normal condition values cannot be compared, the warning threshold or the critical threshold is used **with the inverse interval set** with the expected text: |
| | |
| | 通常の状態では値を比較できないため、期待される次のようなテキストおよび条件の反転設定とともに、警告しきい値または障害しきい値が使用されます。 |
| |
| ''Terms & Important Notes'' (note the use of entities in the received HTML code). | ''Terms & Important Notes'' (note the use of entities in the received HTML code). |
| | |
| | ''Terms & Important Notes''(受信したHTMLコードにおけるエンティティの使用に注意してください) |
| |
| <wrap #ks3_5 /> | <wrap #ks3_5 /> |
| ==== Server status code check ==== | |
| | ==== サーバステータスコード確認 ==== |
| |
| To check the status code of a web page, select the <wrap :en>**Remote HTTP module to check server status code**</wrap> module type (''web_server_status_code_string'' type) with the following [[#task_begin|task_begin]] … [[#task_end|task_end]] code block: | To check the status code of a web page, select the <wrap :en>**Remote HTTP module to check server status code**</wrap> module type (''web_server_status_code_string'' type) with the following [[#task_begin|task_begin]] … [[#task_end|task_end]] code block: |
| | |
| | ウェブページのステータスコードを確認するには、次の [[#task_begin|task_begin]] … [[#task_end|task_end]] コードブロックを使用して、<wrap :ja>**Remote HTTP module to check server status code**</wrap> モジュールタイプ (''web_server_status_code_string'' タイプ) を選択します。 |
| |
| <code bash> | <code bash> |
| * It is important to use the ''[[#head|head]]'' parameter to obtain the status code. | * It is important to use the ''[[#head|head]]'' parameter to obtain the status code. |
| * To configure the critical threshold, ''HTTP/X 200 OK'' can be placed (where ''X'' is the protocol version) and marking the inverse interval: | * To configure the critical threshold, ''HTTP/X 200 OK'' can be placed (where ''X'' is the protocol version) and marking the inverse interval: |
| | |
| | * [[#curl|サーバ設定]]では、Curl を使用する必要があります。 |
| | * ステータスコードを取得するには、''[[#head|head]]'' パラメータを使用することが重要です。 |
| | * 障害しきい値を設定するには、''HTTP/X 200 OK''(''X''はプロトコルバージョン)を指定し、条件の反転を指定します。 |
| |
| {{ :wiki:pfms-web_module-head.png }} | {{ :wiki:pfms-web_module-head.png }} |
| |
| This way, upon receiving any different response, the module will change to critical status: | This way, upon receiving any different response, the module will change to critical status: |
| | |
| | このように、異なる応答を受け取った場合、モジュールは障害状態に変わります。 |
| |
| {{ :wiki:pfms-web_module-head-http_400_response.png }} | {{ :wiki:pfms-web_module-head-http_400_response.png }} |
| |
| <wrap #ks4 /> | <wrap #ks4 /> |
| ===== Advanced transactional monitoring ===== | |
| | ===== 高度なトランザクション監視 ===== |
| |
| In addition to the functionality offered by PFMS Web server, there is another way to perform transactional monitoring: [[:en:documentation:pandorafms:monitoring:13_user_monitorization|Web User Experience Monitoring (WUX)]]. | In addition to the functionality offered by PFMS Web server, there is another way to perform transactional monitoring: [[:en:documentation:pandorafms:monitoring:13_user_monitorization|Web User Experience Monitoring (WUX)]]. |
| | |
| | PFMS ウェブサーバが提供する機能に加えて、トランザクション監視を実行する別の方法があります: [[:ja:documentation:pandorafms:monitoring:13_user_monitorization|ウェブユーザエクスペリエンス監視(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)]]. | 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)]]。 | PFMS ウェブサーバが提供する機能に加えて、トランザクション監視を実行する別の方法があります: [[:ja:documentation:pandorafms:monitoring:13_user_monitorization|WEB ユーザエクスペリエンス監視 (WUX)]] |
| |
| [[ja:documentation:start|Pandora FMS ドキュメント一覧に戻る]] | [[ja:documentation:start|Pandora FMS ドキュメント一覧に戻る]] |