ja:documentation:pandorafms:monitoring:06_web_monitoring

差分

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

この比較画面へのリンク

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
ja:documentation:pandorafms:monitoring:06_web_monitoring [2024/02/05 06:37] junichija:documentation:pandorafms:monitoring:06_web_monitoring [2025/02/14 08:27] (現在) – [インストールと設定] junichi
行 9: 行 9:
 ==== 概要 ==== ==== 概要 ====
  
-Enterprise 版{{:wiki:icono-modulo-enterprise.png  |Versión Enterprise.}}では、Goliat サーバと呼ばれる Webサーバコンポーネントを用いて、Web を監視することができます。 {{  :wiki:goliatlogo_2.jpg?200|goliatlogo_2.jpg}} +In Pandora FMS it works as an independent server, similar to the [[:en:documentation:pandorafms:introduction:02_architecture#ks1_1_2|Network server]], the [[:en:documentation:pandorafms:introduction:02_architecture#ks1_1_4|WMI server]] or the [[:en:documentation:pandorafms:introduction:02_architecture#ks1_1_6|remote plugins server]]. This system operates under the principle of web transaction, where each completed transaction against one or several WEB pages is defined by one or more consecutive steps, which must conclude satisfactorily to consider that the transaction has ended successfully.
- +
-この機能は、Pandora FMS の創設者の古いプロジェクトが元になっています。Goliat F.I.S.T. は、Web サービスにおいて動的な認証の実行を行うオープンソースのプロジェクトでした。(2002年から)ソースコードを確認することができますが、更新は 2010年で終了しました。 [[https://sourceforge.net/projects/goliat/|https://sourceforge.net/projects/goliat/]]+
  
 Pandora FMS では、ネットワークサーバ、WMIサーバ、プラグインサーバなどと同様に、独立したサーバとして機能します。 このシステムは、"Webトランザクション" という考えのもとで動作します。ここでは、各トランザクションは 1つまたは複数の連続ステップで定義され、トランザクションを正常に完了させるために、正しく順序だてられている必要があります。"Webトランザクション" の実行では、フォーム内での自分自身の認証、メニューオプションのクリック、フォームの入力、各ステップで特定のテキスト文字列を返すことの確認など、完全なブラウジングプロセスを忠実に再現します。 Pandora FMS では、ネットワークサーバ、WMIサーバ、プラグインサーバなどと同様に、独立したサーバとして機能します。 このシステムは、"Webトランザクション" という考えのもとで動作します。ここでは、各トランザクションは 1つまたは複数の連続ステップで定義され、トランザクションを正常に完了させるために、正しく順序だてられている必要があります。"Webトランザクション" の実行では、フォーム内での自分自身の認証、メニューオプションのクリック、フォームの入力、各ステップで特定のテキスト文字列を返すことの確認など、完全なブラウジングプロセスを忠実に再現します。
  
-処理のある時点で障害が発生するとチェックに失敗します。 完全なトランザクションには、実際のナビゲーションに含まれるすべてのリソース(グラフィックス、アニメーションなど)のダウンロードが含まれます。 応答時間とパフォーマンスチェックの実行に加えて、Webページから値を抽出して処理することも可能です。+<WRAP center round info 90%>
  
-Goliatは、HTTP と HTTPS の両方を透過的に監視し、クッキーによるセッション管理、パラメータの受け渡しをサポートします。もちろん、各ページに関連するリソースをダウンロードできます。ただし、実行時の動的な javascript の管理などに制限があります。 より複雑な Web トランザクションの場合、Pandora FMS には [[:ja:documentation:03_monitoring:13_user_monitorization|WUX 監視]]というより強力で複雑なコンポーネントがあります。+   * **Web server has important limitations such as the 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 Monitoring (Web User Experience)]].
  
 +</WRAP>
 +
 +<WRAP center round info 90%>
 +
 +   * **Web サーバには、実行時の JavaScript の動的管理などの重要な制限があります**。
 +   * より複雑な Web トランザクション用に、Pandora FMS には [[:ja:documentation:pandorafms:monitoring:13_user_monitorization|WUX 監視 (Web ユーザエクスペリエンス)]] と呼ばれる、さらに強力な (そして複雑な) コンポーネントがあります。
 +
 +</WRAP>
  
 ==== インストールと設定 ==== ==== インストールと設定 ====
-Goliat を利用できるようにするには、最初に Pandora FMS Enterprise サーバを有効化する必要があります。+ 
 +[[:en:documentation:pandorafms:installation:04_configuration#webserver|The Pandora FMS server must be activated]] and restarted with: 
 + 
 +以下のように [[:ja:documentation:pandorafms:installation:04_configuration#webserver|Pandora FMS サーバを有効化]]再起動します。
  
 <code> <code>
行 41: 行 51:
 </code> </code>
  
-<WRAP center round info 60%>\\ +<WRAP center round info 60%> 
-Pandora FMS has protection against [[https://en.wikipedia.org/wiki/Cross-site_request_forgery|CSRF]] and it may happen that the web checks, when debugged, you get this message:\\ + 
-''Cannot verify the origin of the request'' \\ +Pandora FMS has protection against CSRF and it may happen that web checks, when debugged, get this message: ''Cannot verify the origin of the request'' Take this protection into account when considering the use of "[[:en: documentation:pandorafms:monitoring:13_user_monitorization#introduction|WUX Monitoring]]". 
-Please take this protection into account when considering the use of "[[:en:documentation:03_monitoring:13_user_monitorization#introduction|WUX monitoring]]". </WRAP>+ 
 +</WRAP> 
 + 
 +<WRAP center round info 60%> 
 + 
 +Pandora FMS は [[https://en.wikipedia.org/wiki/Cross-site_request_forgery|CSRF]] に対して保護されており、デバッグ時に Web チェックで ''Cannot verify the origin of the request'' というメッセージが表示される場合があります。 
 +[[:ja:documentation:pandorafms:monitoring:13_user_monitorization#概要|WUX 監視]] の使用を検討する際には、この保護を考慮に入れてください。 
 + 
 +</WRAP>
  
-<WRAP center round info 60%>\\ +<wrap #ks1_3 />
-Pandora FMS は [[https://en.wikipedia.org/wiki/Cross-site_request_forgery|CSRF]] に対して保護されており、デバッグ時に Web チェックで次のメッセージが表示される場合があります:\\ +
-''Cannot verify the origin of the request'' \\ +
-[[:ja:documentation:03_monitoring:13_user_monitorization#概要|WUX 監視]] の使用を検討する際には、この保護を考慮に入れてください、</WRAP>+
  
 ==== ウェブモジュールの作成方法 ==== ==== ウェブモジュールの作成方法 ====
行 153: 行 168:
  
 ==== ウェブの応答時間チェック ==== ==== ウェブの応答時間チェック ====
-ウェブの応答時間をチェックしたい場合は、モジュールタイプ //Remote HTTP module to check latency// を選択する必要があるのみです。<https://pandorafms.com> の応答時間を知りたい場合、コードは次のようになります。 
  
-<code> +To check the response time or latency of a web page, select the module type **Remote HTTP module to check latency**Example:
- task_begin +
- get https://pandorafms.com +
- task_end +
-</code>+
  
-設定トークン ''resource 1'' を追加すると、すべてのリソース(JavaScript、CSS、イメージなど)をダウンロードし、それにかかった実際の時間を計算できるようになります。 +ウェブの応答時間をチェックしたい場合は、モジュールタイプ **Remote HTTP module to check latency** を選択します。例:
- +
-<WRAP center round tip 60%> +
-ウェブサイトダウンロード時間は、ブラウザで Web サイト表示するのにかかる時間ではありません。通常、これはJavaScriptの読み込み時間に依存し、Goliat は JavaScriptをダウンロードしますが、実行しません。 +
-</WRAP> +
- +
-==== プロキシ経由でのウェブチェック ==== +
-ウェブチェックは、プロキシ経由でも行うことができます。プロキシを設定するには、//拡張オプション(Advanced options)// をクリックすると表示される、//プロキシURL(Proxy URL)// フィールドにプロキシの URL を設定する必要があります。 +
- +
-例えば、URL は次のようになります。 +
- +
-  http://proxy.domain.com:8080 +
- +
-認証が必要なプロキシの場合は、次のように ''my-user'' にユーザ名、''my_pwd'' にパスワードを指定ます。 +
- +
-  http://my_user:my_pwd@proxy.domain.com:8080 +
- +
-{{ wiki:Goliat_proxy_conf.png?700 }} +
- +
-==== Webコンテンツの取得 ==== +
- +
-Sometimes monitoring does not consist of finding out whether a specific Web site is working or how long it takes, but to get a real time value, such as the total number of modules registered in the same PFMS server [[:en:documentation:08_technical_reference:02_annex_externalapi#get_total_modules|through the API]]. For this example a module called **Remote HTTP module to retrieve numeric data** will be used with the appropriate regular expression: +
- +
-特定の Web サイトが稼動しているか、どれくらい時間がかかっているかを知りたいわけでなく[[:ja:documentation:08_technical_reference:02_annex_externalapi#get_total_modules|API を通して]]Pandora FMS サーバに登録されたモジュール数などのコンテンツの内容を確認したい場合もあります。そのためには、適切な正規表現で **Remote HTTP module to retrieve numeric data** モジュール利用します。+
  
 <code> <code>
- 
 task_begin task_begin
-get http://127.0.0.1/pandora_console/include/api.php?apipass=1234&user=internal_API&pass=1234&op=get&op2=total_modules&id=0 +get https://pandorafms.com
-get_content \d++
 task_end task_end
- 
 </code> </code>
  
-出力は次のようになります。+  * For the download time to include all resources (JavaScript, CSS, images, etc.), ''resource 1'' must be added in a line before ''task_end''
 +  * Web checks also support the use of proxy in the **Proxy URL** token.
  
-{{  :wiki:pfms-creating_web_modules-goliat_server-img_100.png  }}+  * すべてのリソース (JavaScript、CSS、画像など) のダウンロード時間取得には、''task_end'' の前の行に ''resource 1'' を追加する必要があります。 
 +  * Web チェックでは、**Proxy URL** トークンでのプロキシの使用もサポートされています。
  
-It is also possible to specify a more complex regular expression for collecting data from more complex HTTP responses with the ''get_content_advanced'' configuration token. In this **didactic** example, the year is obtained in the footer of Pandora FMS official documentation (and stored in a string data type, **Remote HTTP module to retrieve string data**):{{  :wiki:pfms-creating_web_modules-goliat_server-img_110.png  }}+<WRAP center round tip 90%>
  
-また、より複雑な HTTP 応答からのデータを収集するための正規表現を設定トークン ''get_content_advanced'' で指定することもできます。この**実践的な**例では、Pandora FMS 公式ドキュメントのフッターから年を取得します(また、文字列データタイプ **Remote HTTP module to retrieve string data** で保存します: {{  :wiki:pfms-creating_web_modules-goliat_server-img_110.png  }}+The web download time **is not** the time it takes to display a website in a browser, as this is usually dependent on the JavaScript load time.
  
-<code> +</WRAP>
-task_begin +
-get https://pandorafms.com/manual/ +
-get_content_advanced \(c\) ([\d]+) Pandora FMS\(tm\) </span> +
-task_end+
  
-</code>+<WRAP center round tip 90%>
  
-{{  :wiki:pfms-creating_web_modules-goliat_server-img_120.png  }}Note that the inverse interval has been used: if a string **other than** ''2022'' is received, the module will go into critical. +ウェブサイトダウンロード時間は、ブラウザで Web サイト表示するのにかかる時間ではありません。通常これJavaScriptの読み込み時間依存し、JavaScriptをダウンロードしますが、実行しません
- +
-{{  :wiki:pfms-creating_web_modules-goliat_server-img_120.png  }}しきい値反転が使用されていることに注意してください。''2022'' 以外の文字列受信するモジュール障害状態なります。 +
- +
-<WRAP center round important 75%> +
- +
-  * The part of the regular expression defined in ''get_content_advanced''  must be enclosed in brackets. +
-  * If the text to be looked for contains parentheses, you must escape the characters by means of the backslash ''\''.+
  
 </WRAP> </WRAP>
  
-<WRAP center round important 75%> 
-  * ''get_content_advanced'' に定義する正規表現は、カッコでくくらなければいけません。 
-  * 検索するテキストにカッコが含まれている場合は、バックスラッシュ ''\'' を使用して文字をエスケープする必要があります。 
-</WRAP> 
  
-{{  :wiki:pfms-creating_web_modules-goliat_server-img_130.png  }} 
- 
-To configure the thresholds that will trigger warning or critical status, use the module configuration to verify that the received string matches what is expected. 
- 
-警告または障害状態のしきい値を設定するには、モジュールの設定を使用して、受信した文字列が期待どおりのものであることを確認します。 
  
 ==== ウェブページのフォームのチェック ==== ==== ウェブページのフォームのチェック ====
行 295: 行 261:
 {{ wiki:goliat_full_sample.jpg?800 }} {{ wiki:goliat_full_sample.jpg?800 }}
  
-==== WEB リクエトの動作 ==== +==== サーバステータスコードの確認 ====
-拡張プロパィのフィルドは他のイプのモジュルのフィールと似ていますが、WEB チェックではいくつか異なるフィールドがあります。+
  
-**タイムアウト(Timeout)**+To check the server status code of a website, select the type of module <wrap :en>**Remote HTTP module to check server status code**</wrap>:
  
-これはリクエストのタイムアウトで。こ時間超えるとリクエストは破棄されます+ウェブサイトのサーバステースコードを確認るには、モジュール種類選択します <wrap :en>**Remote HTTP module to check server status code**</wrap>:
  
 +<code>
 +task_begin
 +head https://pandorafms.com
 +task_end
  
-**エージェントブラウザID(Agent browser id)**+</code>
  
- これは、特定のページが一部の Web ブラウザのみを受け入れる場合に使用する Web ブラウザの識別子です。(詳細は、https://www.zytrax.com/tech/web/browser_ids.htm を参照してください)+  * It is important to use the ''head''  parameter to obtain the status code. 
 +  * In server configuration, in section [[:en:documentation:pandorafms:installation:04_configuration#web_engine|web_engine]] ''curl'' must be typed in.
  
 +  * ステータス コードを取得するには、''head'' パラメータを使用することが重要です。
 +  * サーバ設定のセクション [[:ja:documentation:pandorafms:installation:04_configuration#web_engine|web_engine]] に ''curl'' と入力する必要があります。
  
-**リクエスト(Requests)** +<wrap #ks1_7 />
- +
- Pandora FMS は、このパラメータで示された回数だけチェックを繰り返します。 チェックの 1つが失敗した場合、障害とみなされます。モジュール内のチェックの数に応じて、一定数のページが取得されます。 つまり、モジュールが 3つのチェックで構成されている場合は、3ページがダウンロードされ、リクエストフィールドに値が設定されている場合は、ダウンロード数はその数を掛け合わせた数になります。 モジュールが処理を完了するのにかかる合計時間を把握するには、これを覚えておくことが重要です。 +
- +
-**リトライ(Retries)** +
- +
-成功するまで **リクエスト(Request)** を実行する数です。例: +
- +
-  * リトライ = 2、リクエスト = 1: 最初のテストに失敗すると、もう一度実行し、2回目で成功すると、正常と判断します。 +
-  * リトライ = 1、リクエスト = 2: 2回のチェックを実行します。しかし一方の失敗で、障害と判断します。+
  
 ==== HTTP の簡単な認証 ==== ==== HTTP の簡単な認証 ====
行 466: 行 429:
  
  
-==== HTTPS モニタリング ==== 
-Goliat は HTTP と HTTPS の両方をチェックできます。 HTTPS を利用しているセキュリティで保護されたウェブサイトのチェックを行うには、その URL にプロトコルを組み込むだけです。 
- 
-<code> 
-task_begin 
-get https://www.google.com/accounts/ServiceLogin?service=mail&passive=true&rm=false&continue=https%3A%2F%2Fmail.google.com%2Fmail%2F%3Fui%3Dhtml%26zy%3Dl&bsv=zpwhtygjntrz&ss=1&scc=1&ltmpl=default&ltmplcache=2 
-cookie 1 
-resource 0 
-check_string Google 
-task_end 
-</code> 
  
 ==== 拡張オプション ==== ==== 拡張オプション ====
行 488: 行 440:
  task_end  task_end
 </code> </code>
 +
 +<wrap #ks1_8_2 />
  
 === ウェブチェックのデバッグ === === ウェブチェックのデバッグ ===
行 516: 行 470:
  
 [[ja:documentation:start|Pandora FMS ドキュメント一覧に戻る]] [[ja:documentation:start|Pandora FMS ドキュメント一覧に戻る]]
 +
 +===== (OBSOLETE) =====
 +
 +==== プロキシ経由でのウェブチェック ====
 +ウェブチェックは、プロキシ経由でも行うことができます。プロキシを設定するには、//拡張オプション(Advanced options)// をクリックすると表示される、//プロキシURL(Proxy URL)// フィールドにプロキシの URL を設定する必要があります。
 +
 +例えば、URL は次のようになります。
 +
 +  http://proxy.domain.com:8080
 +
 +認証が必要なプロキシの場合は、次のように ''my-user'' にユーザ名、''my_pwd'' にパスワードを指定します。
 +
 +  http://my_user:my_pwd@proxy.domain.com:8080
 +
 +{{ wiki:Goliat_proxy_conf.png?700 }}
 +
 +==== Webコンテンツの取得 ====
 +
 +Sometimes monitoring does not consist of finding out whether a specific Web site is working or how long it takes, but to get a real time value, such as the total number of modules registered in the same PFMS server [[:en:documentation:08_technical_reference:02_annex_externalapi#get_total_modules|through the API]]. For this example a module called **Remote HTTP module to retrieve numeric data** will be used with the appropriate regular expression:
 +
 +特定の Web サイトが稼動しているか、どれくらい時間がかかっているかを知りたいわけではなく、[[:ja:documentation:08_technical_reference:02_annex_externalapi#get_total_modules|API を通して]]Pandora FMS サーバに登録されたモジュール数などのコンテンツの内容を確認したい場合もあります。そのためには、適切な正規表現で **Remote HTTP module to retrieve numeric data** モジュールを利用します。
 +
 +<code>
 +
 +task_begin
 +get http://127.0.0.1/pandora_console/include/api.php?apipass=1234&user=internal_API&pass=1234&op=get&op2=total_modules&id=0
 +get_content \d+
 +task_end
 +
 +</code>
 +
 +出力は次のようになります。
 +
 +{{  :wiki:pfms-creating_web_modules-goliat_server-img_100.png  }}
 +
 +It is also possible to specify a more complex regular expression for collecting data from more complex HTTP responses with the ''get_content_advanced'' configuration token. In this **didactic** example, the year is obtained in the footer of Pandora FMS official documentation (and stored in a string data type, **Remote HTTP module to retrieve string data**):{{  :wiki:pfms-creating_web_modules-goliat_server-img_110.png  }}
 +
 +また、より複雑な HTTP 応答からのデータを収集するための正規表現を設定トークン ''get_content_advanced'' で指定することもできます。この**実践的な**例では、Pandora FMS 公式ドキュメントのフッターから年を取得します(また、文字列データタイプ **Remote HTTP module to retrieve string data** で保存します: {{  :wiki:pfms-creating_web_modules-goliat_server-img_110.png  }}
 +
 +<code>
 +task_begin
 +get https://pandorafms.com/manual/
 +get_content_advanced \(c\) ([\d]+) Pandora FMS\(tm\) </span>
 +task_end
 +
 +</code>
 +
 +{{  :wiki:pfms-creating_web_modules-goliat_server-img_120.png  }}Note that the inverse interval has been used: if a string **other than** ''2022'' is received, the module will go into critical.
 +
 +{{  :wiki:pfms-creating_web_modules-goliat_server-img_120.png  }}しきい値の反転が使用されていることに注意してください。''2022'' 以外の文字列を受信すると、モジュールは障害状態になります。
 +
 +<WRAP center round important 75%>
 +
 +  * The part of the regular expression defined in ''get_content_advanced''  must be enclosed in brackets.
 +  * If the text to be looked for contains parentheses, you must escape the characters by means of the backslash ''\''.
 +
 +</WRAP>
 +
 +<WRAP center round important 75%>
 +  * ''get_content_advanced'' に定義する正規表現は、カッコでくくらなければいけません。
 +  * 検索するテキストにカッコが含まれている場合は、バックスラッシュ ''\'' を使用して文字をエスケープする必要があります。
 +</WRAP>
 +
 +{{  :wiki:pfms-creating_web_modules-goliat_server-img_130.png  }}
 +
 +To configure the thresholds that will trigger warning or critical status, use the module configuration to verify that the received string matches what is expected.
 +
 +警告または障害状態のしきい値を設定するには、モジュールの設定を使用して、受信した文字列が期待どおりのものであることを確認します。
 +
 +==== WEB リクエストの動作 ====
 +拡張プロパティのフィールドは他のタイプのモジュールのフィールドと似ていますが、WEB チェックではいくつかの異なるフィールドがあります。
 +
 +**タイムアウト(Timeout)**
 +
 +これはリクエストのタイムアウトです。この時間を超えるとリクエストは破棄されます。
 +
 +
 +**エージェントブラウザID(Agent browser id)**
 +
 + これは、特定のページが一部の Web ブラウザのみを受け入れる場合に使用する Web ブラウザの識別子です。(詳細は、https://www.zytrax.com/tech/web/browser_ids.htm を参照してください)
 +
 +
 +**リクエスト(Requests)**
 +
 + Pandora FMS は、このパラメータで示された回数だけチェックを繰り返します。 チェックの 1つが失敗した場合、障害とみなされます。モジュール内のチェックの数に応じて、一定数のページが取得されます。 つまり、モジュールが 3つのチェックで構成されている場合は、3ページがダウンロードされ、リクエストフィールドに値が設定されている場合は、ダウンロード数はその数を掛け合わせた数になります。 モジュールが処理を完了するのにかかる合計時間を把握するには、これを覚えておくことが重要です。
 +
 +**リトライ(Retries)**
 +
 +成功するまで **リクエスト(Request)** を実行する数です。例:
 +
 +  * リトライ = 2、リクエスト = 1: 最初のテストに失敗すると、もう一度実行し、2回目で成功すると、正常と判断します。
 +  * リトライ = 1、リクエスト = 2: 2回のチェックを実行します。しかし一方の失敗で、障害と判断します。
 +
 +==== HTTPS モニタリング ====
 +Goliat は HTTP と HTTPS の両方をチェックできます。 HTTPS を利用しているセキュリティで保護されたウェブサイトのチェックを行うには、その URL にプロトコルを組み込むだけです。
 +
 +<code>
 +task_begin
 +get https://www.google.com/accounts/ServiceLogin?service=mail&passive=true&rm=false&continue=https%3A%2F%2Fmail.google.com%2Fmail%2F%3Fui%3Dhtml%26zy%3Dl&bsv=zpwhtygjntrz&ss=1&scc=1&ltmpl=default&ltmplcache=2
 +cookie 1
 +resource 0
 +check_string Google
 +task_end
 +</code>
  
  • ja/documentation/pandorafms/monitoring/06_web_monitoring.1707115044.txt.gz
  • 最終更新: 2024/02/05 06:37
  • by junichi