| 両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン |
| ja:documentation:pandorafms:monitoring:06_web_monitoring [2026/04/18 02:00] – [variable_name] junichi | ja:documentation:pandorafms:monitoring:06_web_monitoring [2026/04/18 02:33] (現在) – [高度なトランザクション監視] junichi |
|---|
| |
| Sets the value of a variable declared with ''[[#variable_name|variable_name]]''. | Sets the value of a variable declared with ''[[#variable_name|variable_name]]''. |
| | |
| | ''[[#variable_name|variable_name]]''で宣言された変数の値を設定します。 |
| |
| **For greater code clarity** (and to facilitate debugging tasks, if applicable) **it is recommended to use in ordered pairs of contiguous lines**, first ''variable_name'' and then ''variable_value''. | **For greater code clarity** (and to facilitate debugging tasks, if applicable) **it is recommended to use in ordered pairs of contiguous lines**, first ''variable_name'' and then ''variable_value''. |
| | |
| | **コードの明瞭性を高めるため**(また、該当する場合はデバッグ作業を容易にするため)**連続する行の順序付きペアで、最初に ''variable_name''、次に ''variable_value'' を使用することをお勧めします。** |
| |
| <WRAP center round info 90%> | <WRAP center round info 90%> |
| |
| The [[#debug_button|debug button]] omits syntax verification of this command: If a value is omitted and/or there is disparity with ''variable_name'', it will **still and always** show a //correct syntax//. | The [[#debug_button|debug button]] omits syntax verification of this command: If a value is omitted and/or there is disparity with ''variable_name'', it will **still and always** show a //correct syntax//. |
| | |
| | </WRAP> |
| | |
| | <WRAP center round info 90%> |
| | |
| | [[#debug_button|デバッグボタン]] はこのコマンドの構文検証を省略します。値が省略された場合、または ''variable_name'' と不一致がある場合でも、**常に**正しい構文が表示されます。 |
| |
| </WRAP> | </WRAP> |
| |
| //While these instructions can be placed in any order, this can cause unpredictable results if// odd //or orphan commands are accidentally established//. | //While these instructions can be placed in any order, this can cause unpredictable results if// odd //or orphan commands are accidentally established//. |
| | |
| | //これらの命令は任意の順序で配置できますが、奇妙なコマンドや孤立したコマンドが誤って作成されると、予期しない結果が生じる可能性があります。// |
| |
| <WRAP center round tip 90%> | <WRAP center round tip 90%> |
| |
| See "[[#ks1_4_5|Form check on a web page]]" | See "[[#ks1_4_5|Form check on a web page]]" |
| | |
| | </WRAP> |
| | |
| | <WRAP center round tip 90%> |
| | |
| | [[#ks1_4_5|ウェブページ上のフォームチェック]] も参照してください。 |
| |
| </WRAP> | </WRAP> |
| |
| <wrap #ks2_11 /> | <wrap #ks2_11 /> |
| | |
| ==== get_content ==== | ==== get_content ==== |
| |
| Unlike the ''[[#check_string|check_string]]'' and ''[[#check_not_string|check_not_string]]'' commands, which only return a true or false result, **the** ''get_content'' **command is used when a numeric value or a specific text string needs to be obtained**. | Unlike the ''[[#check_string|check_string]]'' and ''[[#check_not_string|check_not_string]]'' commands, which only return a true or false result, **the** ''get_content'' **command is used when a numeric value or a specific text string needs to be obtained**. |
| | |
| | ''[[#check_string|check_string]]'' および ''[[#check_not_string|check_not_string]]'' コマンドは、真偽値のみを返しますが、** ''get_content'' コマンドは、数値または特定のテキスト文字列を取得する必要がある場合に使用されます。** |
| |
| Similarly, these three commands use //regular expressions// to perform their work with the fundamental difference that ''get_content'' delivers the full result of its search. | Similarly, these three commands use //regular expressions// to perform their work with the fundamental difference that ''get_content'' delivers the full result of its search. |
| | |
| | 同様に、これら 3 つのコマンドは //正規表現// を使用して処理を実行しますが、根本的な違いは ''get_content'' が検索の完全な結果を返すことです。 |
| |
| To obtain a numeric value from an [[#ks1_4_3|API-type query]], the following code can be used \\ ''get_content \d+'' **in a code block** ''[[#task_begin|task_begin]]'' … ''[[#task_end|task_end]]'': | To obtain a numeric value from an [[#ks1_4_3|API-type query]], the following code can be used \\ ''get_content \d+'' **in a code block** ''[[#task_begin|task_begin]]'' … ''[[#task_end|task_end]]'': |
| | |
| | [[#ks1_4_3|API タイプのクエリ]] から数値を取得するには、次のコードを使用できます。 \\ ''get_content \d+'' **コードブロック内** ''[[#task_begin|task_begin]]'' … ''[[#task_end|task_end]]'': |
| |
| <code bash> | <code bash> |
| |
| <wrap #ks2_12 /> | <wrap #ks2_12 /> |
| | |
| ==== get_content_advanced ==== | ==== get_content_advanced ==== |
| |
| Allows extracting a text string in an HTML element. "Numeric" values can also be extracted, depending on the regular expression used. Syntax: | Allows extracting a text string in an HTML element. "Numeric" values can also be extracted, depending on the regular expression used. Syntax: |
| | |
| | HTML 要素内のテキスト文字列を抽出できます。使用する正規表現によっては、「数値」も抽出できます。構文: |
| |
| <code> | <code> |
| |
| It must be used in conjunction with ''[[#get|get]]'' to set the URL to check. Once its HTML content is obtained, the entire page will be searched until an **HTML element** match is found and its content will be returned. See "[[#ks1_3_4|Obtaining text data from a web page]]". | It must be used in conjunction with ''[[#get|get]]'' to set the URL to check. Once its HTML content is obtained, the entire page will be searched until an **HTML element** match is found and its content will be returned. See "[[#ks1_3_4|Obtaining text data from a web page]]". |
| | |
| | チェック対象の URL を設定するには、''[[#get|get]]''と組み合わせて使用する必要があります。HTML コンテンツが取得されると、ページ全体が検索され、一致する **HTML要素**が見つかり、そのコンテンツが返されます。詳細については、"[[#ks1_3_4|Webページからテキストデータを取得する]]" を参照してください。 |
| |
| <wrap #ks2_13 /> | <wrap #ks2_13 /> |
| | |
| ==== header ==== | ==== header ==== |
| |
| Allows adding HTTP headers to the web query. | Allows adding HTTP headers to the web query. |
| | |
| | ウェブクエリに HTTP ヘッダを追加できるようにします。 |
| |
| By default, [[#curl|Curl]] is used to perform web checks and two elements are always included: | By default, [[#curl|Curl]] is used to perform web checks and two elements are always included: |
| | |
| | デフォルトでは、[[#curl|Curl]] がウェブチェックを実行するために使用され、常に 2つの要素が含まれます。 |
| |
| - ''-H 'Pragma: no-cache''': Used to skip CDN cache. ''Pragma'' is compatible with HTTP 1.0 (the most used HTTP versions currently are 1.1 and 2.0). | - ''-H 'Pragma: no-cache''': Used to skip CDN cache. ''Pragma'' is compatible with HTTP 1.0 (the most used HTTP versions currently are 1.1 and 2.0). |
| - ''-H 'Accept: text/html''': This indicates that the HTML code is requested as the first response. | - ''-H 'Accept: text/html''': This indicates that the HTML code is requested as the first response. |
| | |
| | - ''-H 'Pragma: no-cache''': CDN キャッシュをスキップするために使用します。''Pragma'' は HTTP 1.0 と互換性があります(現在最もよく使用されている HTTP バージョンは 1.1 と 2.0 です)。 |
| | - ''-H 'Accept: text/html''': HTML コードを最初のレスポンスとして要求することを示します。 |
| |
| With ''header'' included in a ''[[#task_begin|task_begin]]''…''[[#task_end|task_end]]'' block, additional value pairs can be specified. In a [[:en:documentation:pandorafms:technical_reference:02_annex_externalapi#ks2_4_1|PFMS API 1.0]] query, this is very useful when authenticating via a user's private //Bearer token// and then checking an expected response value with ''[[#check_string|check_string]]'': | With ''header'' included in a ''[[#task_begin|task_begin]]''…''[[#task_end|task_end]]'' block, additional value pairs can be specified. In a [[:en:documentation:pandorafms:technical_reference:02_annex_externalapi#ks2_4_1|PFMS API 1.0]] query, this is very useful when authenticating via a user's private //Bearer token// and then checking an expected response value with ''[[#check_string|check_string]]'': |
| | |
| | ''[[#task_begin|task_begin]]''…''[[#task_end|task_end]]'' ブロックに ''header'' が含まれている場合、追加の値ペアを指定できます。[[:ja:documentation:pandorafms:technical_reference:02_annex_externalapi#ks2_4_1|PFMS API 1.0]] クエリでは、これはユーザのプライベート //Bearer トークン// を介して認証し、その後 ''[[#check_string|check_string]]'' を使用して期待される応答値をチェックする場合に非常に便利です。 |
| |
| <code> | <code> |
| |
| It could also be useful for explicitly requesting a response in a specific language: \\ ''header Accept-Language en-US''. | It could also be useful for explicitly requesting a response in a specific language: \\ ''header Accept-Language en-US''. |
| | |
| | また、特定の言語での応答を明示的に要求する場合にも役立ちます: \\ ''header Accept-Language en-US'' |
| |
| <WRAP center round info 90%> | <WRAP center round info 90%> |
| |
| With ''header'', it is unnecessary to use double or single quotes, or colons, since when executing the check these characters are inserted in the appropriate way: | With ''header'', it is unnecessary to use double or single quotes, or colons, since when executing the check these characters are inserted in the appropriate way: |
| | |
| | </WRAP> |
| | |
| | <WRAP center round info 90%> |
| | |
| | ''header'' の場合、二重引用符や一重引用符、コロンを使用する必要はありません。チェックを実行する際に、これらの文字は適切な方法で挿入されるためです。 |
| |
| </WRAP> | </WRAP> |
| * The //referrer// (indicates the web page visited previously) ''header Referer pandorafms.com'': \\ ''<nowiki>-H 'Referer:pandorafms.com'</nowiki>'' | * The //referrer// (indicates the web page visited previously) ''header Referer pandorafms.com'': \\ ''<nowiki>-H 'Referer:pandorafms.com'</nowiki>'' |
| * If the queried web server requires particular headers, these must start with ''-X…''. It is usually followed by one or more hyphens and then the name and value of the header itself. \\ Take the case of sending a customer identifier ''header X-Customer-ID "Ñ123"'', it is queried: \\ ''<nowiki>-H 'X-Customer-ID:"Ñ123"'</nowiki>'' (note the use of double quotes to //wrap// ''Ñ123''). | * If the queried web server requires particular headers, these must start with ''-X…''. It is usually followed by one or more hyphens and then the name and value of the header itself. \\ Take the case of sending a customer identifier ''header X-Customer-ID "Ñ123"'', it is queried: \\ ''<nowiki>-H 'X-Customer-ID:"Ñ123"'</nowiki>'' (note the use of double quotes to //wrap// ''Ñ123''). |
| | |
| | * 言語ヘッダ ''Accept-Language es-ES'' は、[[#curl|Curl]] を使用して次のように照会します。 \\ ''<nowiki>-H 'Accept-Language:es-ES'</nowiki>'' |
| | * //referrer//(以前にアクセスしたウェブページを示す)''header Referer pandorafms.com'': \\ ''<nowiki>-H 'Referer:pandorafms.com'</nowiki>'' |
| | * 照会先のウェブサーバが特定のヘッダを要求する場合、それらは ''-X…'' で始まる必要があります。通常、その後に 1つ以上のハイフンが続き、その後にヘッダー名と値が続きます。 \\ 顧客識別子 ''header X-Customer-ID "Ñ123"'' を送信する場合、クエリは次のようになります。\\ ''<nowiki>-H 'X-Customer-ID:"Ñ123"'</nowiki>'' (二重引用符を使用して ''Ñ123'' を囲んでいることに注意してください)。 |
| |
| See also: | See also: |
| | |
| | 以下も参照してください: |
| |
| * [[#ks1_4_7|Web browser identifier]]. | * [[#ks1_4_7|Web browser identifier]]. |
| * ''[[#cookie|cookie]]''. | * ''[[#cookie|cookie]]''. |
| | |
| | * [[#ks1_4_7|ウェブブラウザ識別子]] |
| | * ''[[#cookie|cookie]]'' |
| |
| <wrap #ks2_14 /> | <wrap #ks2_14 /> |
| | |
| ==== debug ==== | ==== debug ==== |
| |
| Web checks can be debugged by adding the ''debug\_<path>/<file_name>'' option. \\ Two files ''<path><file_name>.req'' and ''<path><file_name>.res'' will be created with the contents of the HTTP request and response, respectively: | Web checks can be debugged by adding the ''debug\_<path>/<file_name>'' option. \\ Two files ''<path><file_name>.req'' and ''<path><file_name>.res'' will be created with the contents of the HTTP request and response, respectively: |
| | |
| | ウェブチェックは、''debug\_<path>/<file_name>'' オプションを追加することでデバッグできます。 \\ HTTP リクエストとレスポンスの内容がそれぞれ ''<path><file_name>.req'' と ''<path><file_name>.res'' という 2 つのファイルが作成されます。 |
| |
| <code> | <code> |
| |
| When [[:en:documentation:pandorafms:monitoring:01_intro_monitoring#ks2_3|forcing checks]] to speed up debugging work, you must always wait for the response from the server or device being monitored. There is at least one way to see the content of these files in real time via command line: | When [[:en:documentation:pandorafms:monitoring:01_intro_monitoring#ks2_3|forcing checks]] to speed up debugging work, you must always wait for the response from the server or device being monitored. There is at least one way to see the content of these files in real time via command line: |
| | |
| | デバッグ作業を高速化するために[[:ja:documentation:pandorafms:monitoring:01_intro_monitoring#ks2_3|強制チェック]]を行う場合、監視対象のサーバまたはデバイスからの応答を必ず待つ必要があります。コマンドラインを使用してこれらのファイルの内容をリアルタイムで確認する方法が少なくとも1つあります。 |
| |
| <code bash> | <code bash> |
| </WRAP> | </WRAP> |
| |
| | <WRAP center round info 90%> |
| | |
| | 指定された名前で作成されたこれらのデバッグファイルには、後続のクエリとレスポンスが必ず追加され、ファイルサイズが常に増加します。デバッグが完了したら、すべての ''debug'' 命令を削除することをお勧めします。 |
| | |
| | </WRAP> |
| |
| <wrap #ks2_15 /> | <wrap #ks2_15 /> |
| | |
| ==== task_end ==== | ==== task_end ==== |
| |
| Marks the completion of a block of codes. See ''[[#task_begin|task_begin]]''. | Marks the completion of a block of codes. See ''[[#task_begin|task_begin]]''. |
| | |
| | コードブロックの完了を示します。''[[#task_begin|task_begin]]'' を参照してください。 |
| |
| <wrap #ks3 /> | <wrap #ks3 /> |
| |
| | ===== ウェブ監視の例 ===== |
| |
| | <wrap #ks3_1 /> |
| | ==== ウェブページの読み込み時間確認 ==== |
| |
| | To check the response time in seconds (latency) of a web page, select the <wrap :en>**Remote HTTP module to check latency**</wrap> module type. |
| |
| | ウェブページの応答時間(レイテンシ)を秒単位で確認するには、<wrap :ja>**Remote HTTP module to check latency**</wrap> モジュールタイプを選択します。 |
| |
| | <WRAP center round tip 90%> |
| |
| ===== Web monitoring examples ===== | The download time of the web's HTML code is different from the time it takes to display a web in a browser. The latter usually depends on the loading time of multimedia elements and the loading and execution of the incorporated JavaScript code. |
| |
| <wrap #ks3_1 /> | </WRAP> |
| ==== Checking a web page load time ==== | |
| | |
| To check the response time in seconds (latency) of a web page, select the <wrap :en>**Remote HTTP module to check latency**</wrap> module type. | |
| |
| <WRAP center round tip 90%> | <WRAP center round tip 90%> |
| |
| The download time of the web's HTML code is different from the time it takes to display a web in a browser. The latter usually depends on the loading time of multimedia elements and the loading and execution of the incorporated JavaScript code. | ウェブサイトの HTML コードのダウンロード時間と、ブラウザでウェブサイトを表示するのにかかる時間は異なります。後者は通常、マルチメディア要素の読み込み時間と、組み込まれた JavaScript コードの読み込みおよび実行時間に依存します。 |
| |
| </WRAP> | </WRAP> |
| |
| In a WEB test, one //or several intermediate requests// may exist that complete the transaction. In this way, it obtains the total time elapsed from the first request until the last one is checked. | In a WEB test, one //or several intermediate requests// may exist that complete the transaction. In this way, it obtains the total time elapsed from the first request until the last one is checked. |
| | |
| | ウェブテストでは、トランザクションを完了させるために、1つまたは複数の中間リクエストが存在する場合があります。このようにして、最初のリクエストから最後のリクエストがチェックされるまでの合計経過時間を取得します。 |
| |
| <code> | <code> |
| * Web checks also support the use of [[#ks1_4_2|proxy servers]]; for this, the fields named <wrap :en>**Proxy**</wrap> that are necessary must be completed. | * Web checks also support the use of [[#ks1_4_2|proxy servers]]; for this, the fields named <wrap :en>**Proxy**</wrap> that are necessary must be completed. |
| * The ''[[#debug|debug]]'' parameter is used to keep an accumulated record in two files of both the query and the response of each check. | * The ''[[#debug|debug]]'' parameter is used to keep an accumulated record in two files of both the query and the response of each check. |
| | |
| | * チェック定義でトランザクションが複数回実行される場合(''[[#get|get]]''コマンド)、各リクエストの平均時間が使用されます。 |
| | * **警告状態と障害状態のしきい値はユーザが設定する必要があります。** |
| | * ダウンロード時間にすべてのリソース(JavaScript、CSS、画像など)を含めるには、''[[#resource|resource 1]]''を''[[#task_end|task_end]]''の前の行に追加する必要があります。 |
| | * ウェブチェックは[[#ks1_4_2|プロキシサーバ]]の使用もサポートしています。そのためには、必要な<wrap :ja>**Proxy**</wrap>という名前のフィールドを入力する必要があります。 |
| | * ''[[#debug|debug]]'' パラメータは、各チェックのクエリとレスポンスの両方の累積レコードを 2つのファイルに保持するために使用されます。 |
| |
| <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 ドキュメント一覧に戻る]] |