ja:documentation:pandorafms:technical_annexes:03_capacity_planning

キャパシティ分析

Pandora FMS is a quite complex distributed application that has several key elements, that could be a bottleneck if it is not measured and configured correctly. The main aim of this study is to detail the scalability of Pandora FMS regarding on an specific serial of parameters to know the requirements that it could have if it gets an specific capacity.

Pandora FMS は、正しく設定しないとボトルネックになりうる複数の要素がある複雑なアプリケーションです。ここでは、特定のキャパシティを得るための必要条件を知るために、特定のパラメータに関する Pandora FMS のスケーラビリティの詳細を見ていきます。

Load test were made in a first phase, aimed to a cluster based system, with an unique Pandora server centralized in a DDBB cluster. The load test are also useful to observe the maximum capacity per server. In the current architecture model (v3.0 or later), with “N” independent servers and with one Metaconsole , this scalability tends to be linear, while the scalability based on centralized models would be of the kind shown in the following graph:

最初は、クラスタを使ったシステムを対象にしたロードテストです。データベースクラスタの中に一つの Pandora サーバがあります。ロードテストは、サーバ一台ごとの最大のキャパシティを見るのに便利です。現在(バージョン 3.0以降)のアーキテクチャでは、N台の個別のサーバと一つのメタコンソールでスケーラビリティはリニアに伸びますが、一台のサーバではそうはなりません。(次のグラフに示します。)

データストレージと圧縮

実際に Pandora は、リアルタイムでデータを圧縮しています。これは、保存されるデータ量を計算するためにはとても重要です。最初に、データの保存方法に関して従来のシステムと Pandora FMS の “非同期” のデータ保存方法の違いについてみてみます。以下に図を示します。

従来のシステム

チェックを一日平均20実施すると、1年で 5MB の容量が必要です。エージェントあたり 50チェックでは、1年 250MB になります。

従来とは異なる Pandora FMS のような非同期システム

チェックにおいて 1日平均 0.1の状態変化では、1年で 12.3KBの容量になります。エージェントあたり 50チェックでは、1年で 615KB です。

用語の定義

Next is described a glossary of specific terms for this study, for a better comprehension.

次に、より理解を深められるように、ここで使われている用語について説明します。

  • Fragmentation of the information: the information that Pandora FMS manages could have different performances, it could change constantly (e.g. a CPU percentage meter), or be static ( for example, determine the state of one service). As Pandora FMS exploits this to “compact” the information in the database (DB), it's a critical factor for the performance and the study of the capacity, so the more fragmentation, the more size in the DB and more capacity of process will be necessary to use in order to process the same information.
  • Module: is the basic piece of the collected information for its monitoring. In some environments is known as Event, in others as a monitor and in others as a metric..
  • Interval: is the amount of time that pass between information collects of one module. It is usually expressed in minutes or seconds. The “average” value is usually 5 minutes.
  • Alert: is the notification that Pandora FMS executes when a data is out of the fixed margins or changes its state to CRITICAL or WARNING.
  • 情報の断片化: Pandora FMS が扱う情報によりパフォーマンスは変化します。情報には、常に変化するもの(CPUの使用率など)や、固定(あるサービスの状態など)のものがあります。Pandora FMS は、これらをデータベースに圧縮して保存します。これはパフォーマンスおよびキャパシティに対して重要な要素となります。そこで、より断片化し、データベースにたくさん保存し、処理量を増やすことが、同じ情報を処理するために必要となります。
  • モジュール: モニタリングにおいて情報を収集する基本的な単位です。他では、イベントであったり、監視項目、メトリックとも言われるものです。
  • 間隔: 一つのモジュールで情報を収集する時間間隔です。通常、分または秒で表されます。 “平均” 値は通常 5分です。
  • アラート: データがしきい値を越えたり状態が 障害警告 になったときに、Pandora FMS が実行する通知です。

これまでの考察と対象範囲

次の 3種類のパターンで設定を行う場合を考えてみます。

  • ステージ1: 500エージェントでの設定
  • ステージ2: 3000エージェントでの設定
  • ステージ3: 6000エージェントでの設定

このデータ量において、正しく Pandora FMS の要求スペックを決めるためには、どのような種類のモニタリングをする予定であるかを知る必要があります。次の例では、“QUASAR TECNOLOGIES” という架空の会社の特徴を示しています。

  • 90% のモニタリングをソフトウエアエージェントで実施。
  • 技術/ポリシーでグループ化できる似たようなシステムがある。
  • モニタするモジュールやイベント間で、実行間隔が異なる。
  • 大量の非同期情報がある(イベントやログなど)。
  • あまり変化がない状態を確認する処理がたくさんある。
  • 全体的にパフォーマンスに関する情報は少ない。

すべての技術的な内容とその実装に関する調査(システムとそのモニタ方法の確認)の結果、次のような結論に至ります。

  • 1システムあたり、平均して 40個のモジュールやイベントが存在する。
  • 平均モニタリング間隔は、1200秒(20分)である。
  • 5分ごとに情報を送ってくるモジュールもあれば、1週間に一度だけのモジュールもある。
  • 全グループの全モジュール (240,000) のうち、確認のたびに変更が発生する可能性があるのは 25% である。
  • モジュールごとのアラート比率は 1.3 (モジュール/イベントごとに 1.3 アラート) である。
  • アラートの発生率は、1% と仮定する。(これは我々の経験上の予測です)

この結論は、予測を策定するための基本となります。理解しやすいように Excel シートにまとめてみます。

これらの初期データに対して必要な計算をあてはめます。データベースのサイズおよび、モニタリングに必要となる一秒間あたりのモジュール実行数、その他パラメータを予測できます。

キャパシティの考察

Once known the basic requirements for the implementation in each phase ( modules/second rate), number of total alerts, modules per day and megabytes / month, next step is to do a real stress test on a server quite similar to the production systems ( test couldn't have been done in a system similar to the production ones).

それぞれのフェーズで実装のための基本的な要求事項 (秒あたりのモジュール実行数)、アラートの数、日ごとのモジュール実行数、月ごとの容量がわかったら、本番に近いシステムで実際にサーバの負荷テストを行います。(ここでのテストは、本番に近いシステムでは実行できていません。)

これらの負荷テストでは、Pandora FMS の処理能力がわかり、どの程度で性能劣化するかがわかります。これは、次のような目的において便利です。

  1. 対象のハードウエアで最大どれくらいの規模まで対応できるかを推定する場合。
  2. ストレージの限界および、ヒストリー DB へ情報を移すポイントを知りたい場合。
  3. サービス停止や計画停止により、処理する情報がたまった場合の最大処理量に対する余裕を知りたい場合。
  4. モニタ対象の情報の変化率が変わった場合のパフォーマンスに与える影響を知りたい場合。
  5. 大量のアラート処理の影響を知りたい場合。

The tests have been done on a DELL server PowerEdge T100® with 2,4 Ghz Intel Core Duo® Processor and 2 GB RAM. This server, working on an Ubuntu Server 8.04, has given us the base of our study for the tests on High Availability environments. The tests have been done on agent configurations quite similar to that of the QUASAR TECHNOLOGIES project, so is not available the same hardware, but replicate a high availability environment, similar to the QUASAR TECHNOLOGIES to evaluate the impact in the performance as times goes on and set other problems ( mainly of usability) derived from managing big data volume.

テストは、Intel Core Duo プロセッサ 2.5GHz および、メモリ 2GB を積んだ DELL のサーバ PowerEdge T100 にて実施しました。このサーバでは、Ubuntu Server 8.04 が動いており、HA 環境のテストに使っています。テストは、QUASAR TECHNOLOGIES プロジェクトに似たエージェント設定で実施しました。同じハードウエアではありませんが、同じような HA 環境で、WUASAR TECHNOLOGIES と似たパフォーマンスの影響および大量のデータを扱うことによるその他問題(主に利便性)を評価できる環境です。

得られた結果はとても良く、システムは非常に過負荷にもかかわらず、非常に興味深い情報量を処理することができました(180,000モジュール、6000エージェント、120,000アラート)。これから得られた結論は次の通りです。

1. リアルタイムの情報は、最大 15日間でヒストリーデータベースへ移動させるべきである。一週間より古いデータを動かすことがベストです。これにより、より早い動作が保障されます。

2. 情報量を考慮して、処理の余裕は想定能力よりも高い最大能力の 50% ほどである。

3 システムを構築する場合のパフォーマンスと必要な容量を決定するには、データの細分化の割合がとても重要である。

The previous chapter was a “quick” study based only in modules typer “dataserver”, this section shows a more complete way of doing an analysis of the Pandora FMS capacity.

前の章は、“データサーバ” モジュールのみに基づく “迅速な” 調査でした。このセクションでは、Pandora FMS 容量の分析を行うためのより完全な方法を示します。

As starting point, in all cases is assume the worst-case scenario providing for choose. If can not choose it, it will be the “ Common case” philosophy. It will be never considered anything in the “best of cases” so this phylosophy doesn't work.

出発点として、すべての選択の場面において、最悪のシナリオを想定しています。 それができない場合、それは “一般的な考察” になります。 “最良の場合” は考慮していません

Next step is how to calculate the system capacity, by monitoring type or based on the information origin.

次のステップは、監視のタイプまたは情報の出所に基づいて、システム容量を計算する方法です。

データサーバ

Based on the achievement of certain targets, as we have seen in the previous point, we suppose that the estimated target, is to see how it works wiht a load of 100,000 modules, distributed between a total of 3000 agents, that is, an average of 33 modules per agent.

前のポイントで見たように、特定の目的に基づいて考えます。合計 3000 のエージェントに分散された 100,000 モジュールの負荷、つまり平均でエージェントあたり 33モジュールでどのような負荷で動作するかを確認したいと想定します。

A task will be created of pandora_xmlstress , executed through cron or manual script, that has 33 modules, distributed with a configuration similar to this one:

pandora_xmlstressタスクを作成し、cron または手動スクリプトを介して実行します。33個のモジュールがあり、次のような設定で展開されます。

  • 1 module type string.
  • 17 modules type generic_proc.
  • 15 modules type generic_data.
  • 文字列タイプの 1モジュール
  • generic_proc タイプの 17モジュール
  • generic_data タイプの 15モジュール

We will configure the thresholds of the 17 modules of generic_proc type this way:

generic_proc タイプの 17個のモジュールのしきい値を次のように設定します。

module_begin
module_name Process Status X
module_type generic_proc
module_description Status of my super-important daemon / service / process
module_exec type=RANDOM;variation=1;min=0;max=100
module_end

In the 15 modules of generic_data type, we should define thresholds. The procedure to follow is the following:

generic_data タイプの 15個のモジュールでは、しきい値を定義する必要があります。 手順は次の通りです。

We should configure the thresholds of the 15 modules of generic_data type so data of this type will be generated:

このタイプのデータが生成されるように、generic_data タイプの 15個のモジュールのしきい値を設定する必要があります。

module_exec type=SCATTER;prob=20;avg=10;min=0;max=100

Then, we configure the thresholds for these 15 modules, so they have this pattern:

これらの 15個のモジュールのしきい値を設定すると、次のパターンになります。

 0-50 normal
 50-74 warning
 75- critical

We add to the configuration file of our pandora_xml_stress some new tokens, to could define the thresholds from the XML generation. Attention: Pandora FMS only “adopts” the definition of thresholds in the creation of the module, but not in the update with new data.

pandora_xml_stress の設定ファイルにいくつかの新しいトークンを追加して、XML 生成からのしきい値を定義できるようにします。 重要: Pandora FMS は、モジュールの作成時にしきい値の定義を採用するだけで、新しいデータの更新には利用されません。

module_min_critical 75
module_min_warning 50

Execute the pandora_xml_stress.

pandora_xml_stress を実行します。

Should let it running at least for 48 hours without any kind of interruption and we should monitor (with a Pandora FMS agent) the following parameters:

中断することなく少なくとも 48時間実行し、次のパラメーターを(Pandora FMS エージェントを使用して)監視する必要があります。

Number of queued packages:

キューに入っているデータ数:

find /var/spool/pandora/data_in | wc -l

PFMS serverCPU:

Pandora FMS サーバ CPU 使用率:

ps aux | grep "/usr/bin/pandora_server" | grep -v grep | awk '{print $3}'

pandora_server total Memory:

pandora_server トータルメモリ:

 ps aux | grep "/usr/bin/pandora_server" | grep -v grep | awk '{print $4}'

CPU used by mysqld (check syntax of the execution, it depends of the MySQL distro)

mysqld による CPU 使用率(実行の構文を確認してください。MySQL ディストリビューションによって異なります。)

ps aux | grep "sbin/mysqld" | grep -v grep | awk '{print $3}'

Pandora FMS DDBB response average time:

Pandora FMS データベース平均応答時間:

/usr/share/pandora_server/util/pandora_database_check.pl /etc/pandora/pandora_server.conf

Number of monitors in unknown state:

不明状態の監視項目数:

echo "select SUM(unknown_count) FROM tagente;" | mysql -u pandora -p<password> -D pandora | tail -1

(<password> for pandora user.)

(<password>pandora ユーザのパスワードです。)

The first executions should be useful to “tune” the server and the MySQL configuration.

最初の実行は、サーバと MySQL 設定を “調整” するのに役立つはずです。

Use the script /usr/share/pandora_server/util/pandora_count.sh to count (if are XML files pending to process) the rate of package proccessing. The aim is to make possible that all the packages generated (3000) could be processed in an interval below the 80% of the limit time (5 minutes). This implies that 3000 packages should be processed in 4 minutes, so:

スクリプト /usr/share/pandora_server/util/pandora_count.sh を使用して、データの処理速度をカウントします(XML ファイルの処理が保留されている場合)。 目的は、生成されたすべてのデータ(3000)を、制限時間(5分)の 80% 未満の間隔で処理できるようにすることです。これは、3000個のデータを 4分で処理する必要があることを意味します。

3000 / (4x60) = 12.5

It should get a processing rate of 12.5 packages minimum to be reasonably sure that Pandora FMS could process this information.

Pandora FMS がこの情報を処理できることを合理的に確認するには、最低 12.5 個のデータ処理速度が必要です。

Elements for adjust:

調整要素:

  • Number of threads.
  • Number maximum of items in intermediate queue (max_queue_files).
  • Of course, all the parameters of MySQL that are applicable (very important).
  • スレッド数
  • 中間キュー内のアイテムの最大数(max_queue_files)
  • もちろん、適用可能な MySQL のすべてのパラメーター(非常に重要)

Importance of this: One Pandora with a GNU/Linux server installed “by default” in a powerful machine, could not exceed from 5-6 packages by second, in a powerful machine well “optimized” and “tuned” it could perfectly reach 30-40 packages by second. It also depends a lot of the number of modules that would be in each agent.

これの重要性:強力なマシンに “デフォルト” でインストールされた GNU/Linux サーバ 1台で、Pandora は、毎秒 5〜6 データを超えることはできませんが、十分に “最適化” および “調整” された強力なマシンでは、毎秒 30-40 データまで処理することができます。また、各エージェントに含まれるモジュールの数にも依存します

Configure the system in order that the DDBB maintenance script at /usr/share/pandora_server/util/pandora_db.pl will be executed every hour instead of every day:

/usr/share/pandora_server/util/pandora_db.pl にあるデータベースメンテナンススクリプトが毎日ではなく 1時間ごとに実行されるように、システムを設定します。

mv /etc/cron.daily/pandora_db /etc/cron.hourly

We leave the system working, with the package generator a minimum of 48 hours. Once this time has passed, we should evaluate the following points:

データジェネレーターを最低 48時間動かして、システムを動作させたままにします。 この時間が経過したら、次の点を評価する必要があります。

  1. Is the system stable?, Is it down? If there are problems, check the logs and graphs of the metrics that we have got (mainly memory).
  2. Evaluate the tendency of time of the metric “Number of monitors in unknown state”. There should be not tendencies neither important peaks. They should be the exception: If they happen with a regularity of one hour, is because there are problems withe the concurrency of the DDBB management process.
  3. Evaluate the metric “Average time of response of the pandora DDBB”. It should not increase with time but remain constant.
  4. Evaluate the metric “pandora_server CPU” , should have many peaks, but with a constant tendency, not rising.
  5. Evaluate the metric “MYSQL server CPU”; should be constant with many peaks, but with a constant tendency , not rising.
  1. システムは安定しているか?、ダウンしていないか? 問題がある場合は、取得したメトリック(主にメモリ)のログとグラフを確認してください。
  2. メトリック “不明な状態の監視項目数” の時間の傾向を評価します。 何らかの傾向やピークもあってはいけません。それがある場合は問題が発生しているはずです。問題が 1時間の規則性で発生する場合、それはデータベース管理プロセスの並行処理に問題があるためです。
  3. メトリック “ Pandora データベースの平均応答時間” を評価します。 時間とともに増加することはありませんが、一定のままである必要があります
  4. メトリック “pandora_server CPU使用率” を評価します。多くのピークがあるはずですが、一定の傾向があり、上昇していないことです。
  5. メトリック “MYSQL サーバ CPU使用率” を評価します。 多くのピークがありますが、一定の傾向で、上昇していないことです。
アラートの影響の評価

If all was right, now will evaluate the impact of the alert execution performance.

すべてが問題なければ、アラート実行パフォーマンスの影響を評価します。

Apply one alert to five specific modules of each agent (generic_data type ), for the CRITICAL condition.Something not really important, like creating an event or writting to syslog (to avoid the impact that something with hight latency could have like for example sending an email message).

障害(CRITICAL) 状態の場合、各エージェントの 5つの特定のモジュール(generic_data タイプ)に 1つのアラートを適用します。イベントの作成や syslogへの書き込みなど、それほど重要ではないもの(高い遅延の影響を回避するため、待ち時間が長いもの、たとえば電子メールメッセージを送信するようなものは避ける)を利用します。

Optionally create one event correlation alert to generate one alert for any critical condition of any agent with one of these five modules.

オプションで、1つのイベント相関アラートを作成して、これら 5つのモジュールのいずれかを使用するエージェントの障害状態に対して 1つのアラートを生成します。

Let the system operating 12 hours under those criteria and evaluate the impact, following the previous criteria.

これらの基準の下でシステムを 12時間稼働させ、前の基準に従って影響を評価します。

データ削除と移動の評価

Supposing the data storage policy was:

データストレージのポリシーが以下の通りであると仮定します。

  • Deleting of events from more than 72 hours.
  • Moving data to history from more than 7 days.
  • 72時間以上経過した古いイベントを削除
  • 7日以上経過したデータをヒストリデータベースへ移動

Should let the system working “only” during at least 10 days to evaluate the long term performance. We could see a “peak” 7 days later due to the moving of data to the history DDBB. This degradation is important to consider. If you can't have so many time available, it is possible to replicate (with less “realism”) changing the purging interval to 2 days in events and 2 days to move data to history, to evaluate this impact.

長期的なパフォーマンスを評価するために、システムを少なくとも 10日間動作させる必要があります。 データがヒストリデータベースに移動される 7日後に “ピーク” が見られます。 このパフォーマンス低下は、重要な考慮点です。確認のための時間がそれほど多くとれない場合は、イベント削除を 2日に、データのヒストリデータベースへの移動を 2日に変更して、この影響を評価できます(“実環境” とは少しことなりますが)。

ICMP サーバ(Enterprise)

This is specifically for the ICMP network server. In case of doing the tests for the Open network server, please see the corresponding section of the network server (generic).

これは、ICMPネットワークサーバ用です。オープンソースのネットワークサーバのテストを行う場合は、ネットワークサーバ(汎用)の対応する章を参照してください。

Supposing that server is already working and configured, some key parameters for its performance:

サーバがすでに設定され動作していると仮定すると、そのパフォーマンスに関するいくつかの重要なパラメーターは次のとおりです。

block_size X

It defines the number of “pings” that the system will do for any execution. If the majority of pings are going to take the same time, you can increase the number to considerably high numberm i.e: 50 to 70

これは、システムが 1回に実行する “ping” の数を定義します。 多くの ping を同時に実行する場合は、数をかなり多く、つまり 50 から 70 に増やすことができます。

On the contrary, the module ping park is heterogeneous and they are in very different networks, with different latency times,it is not convenient for you to put a high number, because the test will take the time that takes the slower one, so you can use a number quite low, such as 15 to 20.

逆に、ping モジュールが少なく、対象のネットワークが大きく異なり遅延時間もそれぞれ異なるような場合は、テストに遅い方の時間を要するため、大きな数値は設定しない方が良いです。15 から 20 などの非常に低い数を使用します。

icmp_threads X

Obviously, the more threads it has, the more checks it could execute. If you make an addition of all the threads that Pandora FMS execute, they will not be more than 30 to 40. You should not use more than 10 threads here, thought it depends a lot of the kind of hardware an GNU/Linux version that you are using.

明らかに、スレッドが多いほど、実行できるチェックも多くなります。 Pandora FMS が実行するすべてのスレッドを追加しても、30〜40 を超えることはありません。利用している GNU/Linux バージョンとハードウェアの種類に大きく依存しますが、ここでは 10 を超えるスレッドは使用するべきではありませn。

Now “create” a fictitious number of modules ping type to test. Assume that you are going to test a total of 3000 modules of ping type. To do this, the best option is to choose a system in the network that would be able to support all pings (any GNU/Linux server would do it)

次に、テストする架空の数の ping モジュールを “作成” します。 ping タイプのモジュール合計 3000個をテストするとします。 これを行うための最良のオプションは、すべての ping をサポートするネットワーク内のシステムを選択することです(GNU/Linux サーバならどれでも大丈夫です)。

Using the Pandora CSV importer (available in the Enterprise version) and create a file with the following format:

Pandora CSV インポーター(Enterprise 版で利用可能)を使用して、次の形式でファイルを作成します。

(Agent name, IP,os_id,Interval,Group_id)

You can use this shellscript to generate this file (changing the destination IP and the group ID)

以下のシェルスクリプトを使用して、ファイルを生成できます(宛先 IP とグループ ID を変更します)。

A=3000
while [ $A -gt 0 ]
do
    echo "AGENT_$A,192.168.50.1,1,300,10"
    A=`expr $A - 1`
done

Before start all this process, the Pandora FMS server must be running and monitoring, measuring the metrics from the previous point: CPU consumption (pandora and mysql), number of modules in unknown state and other interesting monitors.

このすべての処理を開始する前に、Pandora FMS サーバが実行および監視され、前述のメトリック(CPU使用率(pandora および mysql)、不明状態のモジュール数、およびその他の興味深い監視項目)を測定する必要があります。

Import the CSV to create 3000 agents, it will take some minutes. After that go to the first agent (AGENT_3000) and we create a module Type PING.

CSV をインポートして 3000エージェントを作成します。数分かかります。 その後、最初のエージェント(AGENT_3000)に移動し、PING タイプのモジュールを作成します。

Go to the massive operations tool and copy that module to the other 2999 agents.

一括操作ツールに移動し、そのモジュールを他の 2999 エージェントにコピーします。

Pandora FMS should then start to process those modules. Measure with the same metrics from the previous case and evaluate how it goes. The objective is to let an operable system for the number of modules of type ICMP required without any of them reaches the unknown status.

その後、Pandora FMS はそれらのモジュールの処理を開始します。 前のケースと同じメトリックを測定し、それがどのように推移するかを評価します。 目的は、必要な ICMP タイプのモジュールの数に対して、不明状態にならずに処理できかです。

SNMP サーバ(Enterprise)

This is specifically about the SNMP Enterprise network server. In case of testing for the Open network server, see the section on the (generic) network server.

これは SNMP Enterprise ネットワークサーバーに関するものです。 オープンソースのネットワークサーバのテストの場合は、(汎用の)ネットワークサーバの章を参照してください。

Assuming that you have the server already working and configured, we are going to explain some key parameters for its working:

サーバがすでに設定され動作していると仮定して、サーバが機能するためのいくつかの重要なパラメーターについて説明します。

block_size X

It defines the number of SNMP requests that the system will do for each execution. You should consider that the server groups them by destination dir IP, so this block is only indicative. It is recommendable that it wouldn't be large (30 to 40 maximum). When an item of the block fails, an internal counter does that the Enterprise server will try it again, and if after x attempts it doesn't work, then it will pass it to the open server.

これは、システムが 1回に実行する SNMP リクエストの数を定義します。サーバが宛先 IP でグループ化することを考慮するため、このブロックは単なる指標です。 大きくしないことをお勧めします(最大 30〜40)。ブロック内の要素に障害が発生すると、内部カウンターは Enterprise サーバでそれを再試行し、試行回数が x 回を超えても応答がない場合は、オープンソースのサーバに処理を渡します。

snmp_threads X

It should not be too large (30 to 40 maximum). When an element of the block fails, an internal counter makes the Enterprise server retry it, and if after X attempts it does not work, it will be passed to the Open server. You shouldn't user more than 10 threads, though it depends on the kind of hardware and GNU/Linux version that you use.

使用するハードウェアの種類と GNU/Linux のバージョンによって異なりますが、10を超えるスレッドを使用しないでください。

The faster way to test is through a SNMP device, applying all the interfaces, all the serial “basic” monitoring modules.This is done through the application of the Explorer SNMP (Agente → Modo de administracion → SNMP Explorer). Identify the interfaces and apply all the metrics to each interface. In a 24 port switch, this generates 650 modules.

テストのよりすばやく実施する方法は、SNMP デバイスを使用して、すべてのインターフェイス、すべての一連の “基本” 監視モジュールを適用することです。これは、SNMP エクスプローラアプリケーション(SNMP Explorer)を介して行います。 インターフェイスを特定し、すべてのメトリックを各インターフェイスに適用します。 24ポートスイッチでは、これにより 650モジュールが生成されます。

If you generate other agent with other name, but same dir IP, you will have other 650 modules. Another option could be to copy all modules to serial of agents that will have all the same dir IP, so the copied modules works “attacking” the same switch.

他の名前で同じ IP を持つ他のエージェントを作る場合は、さらに 650 モジュールを追加できます。すべてのモジュールを、同じ IP を持つすべてのエージェントにコピーすることにより、コピーされたモジュールは同じスイッチにアクセスします。

Other option is to use an SNMP emulator, as for example the Jalasoft SNMP Device Simulator.

他のオプションとしては、たとえば Jalasoft SNMP Device Simulator のような SNMP エミュレータを使用することです。

The objective of this point is to be able to monitor in a constant way an SNMP module pool during at least 48 hours, monitoring the infrastructure, to make sure that the modules per second monitoring ratio is constant, and there are not time periods where the server produces modules in unknown status. This situation could be occur because:

ここでの目的は、SNMP モジュールプールを少なくとも 48時間一定の方法で監視し、インフラストラクチャを監視して、1秒あたりのモジュール数の監視率が一定であり、 サーバが不明状態のモジュールを生成しないことです。不明状態は、次の原因で発生する可能性があります。

  • Lack of resources (mem, CPU). It would be possible to see a tendency of these metrics in continual rise, what it is a bad signal.
  • Occasional problems:Re-start of the daily server (for logs rotation), execution of the DDBB scheduled maintenance execution, or other scripts that are executed in the server or in the DDBB server.
  • Network problems, due to not related processes (i.e: backup of a server in the network) that affect the speed and availability of the network at any given time.
  • リソース(メモリ、CPU)の不足。これらのメトリクスの傾向が継続的に上昇していることが確認できた場合、それは悪いシグナルです。
  • 時々発生する問題: 日次サーバの再起動(ログローテーション用)、データベースの定期保守処理の実行、またはサーバまたはデータベースサーバで実行されるその他のスクリプト。
  • 監視処理とは関係ない(ネットワーク内のサーバのバックアップなどの)ネットワークの問題で、ネットワークの速度に影響を与えている場合。

プラグイン、ネットワーク(オープンソース)、HTTP サーバ

Here is applied the same concept that above, but in a more simplified way. You should check:

前述と同じ概念を適用しますが、より単純化された方法です。 以下を確認する必要があります。

  • Number of threads.
  • スレッド数
  • Timeouts (to calculate the incidence in the worst case).
  • タイムアウト(最悪の場合の発生率を計算するため)
  • Check average time.
  • 平均時間の確認

Scaling with these data a test group and check that the server capacity is constant over time.

これらのデータを使用してテストグループをスケーリングし、サーバ容量が時間の経過とともに一定であることを確認します。

トラップ受信

Here, the case is more simple: ssume that the system is not going to receive traps in a constant way, but that it is about evaluating the response to a traps flood, from which some of them will generate alerts.

このケースはより単純です。システムが一定量のトラップを受信するのではなく、一時的に大量のトラップが来た場合の応答を評価し、そこからアラートを生成することを想定します。

To do this, you will only have to do a simple script that generates traps in a controlled way and at hight speed:

それには、制御された方法で高速でトラップを生成する単純なスクリプトを実行するだけで済みます。

#!/bin/bash
TARGET=192.168.1.1
while [ 1 ]
do
   snmptrap -v 1 -c public $TARGET .1.3.6.1.4.1.2789.2005 192.168.5.2 6 666 1233433 .1.3.6.1.4.1.2789.2005.1 s "$RANDOM"
done

Note: stop it with the CTRL+C key after a few seconds, as it will generate hundreds of traps quickly.

注: 数百のトラップがすばやく生成されるため、数秒後に CTRL+C キーで停止してください。

Once the environment is set up we need to validate the following things:

環境をセットアップしたら、次のことを検証する必要があります。

  1. Traps injection to a constant rate(just put one sleep 1 to the previous script inside the loop while, to generate 1 trap/sec. Let the system operating 48 hours and evaluate the impact in the server.
  2. Traps Storm. Evaluate moments before, during and the recovery if a traps storm occurs.
  3. Effects of the system on a huge traps table ( more than 50 thounsand). This includes the effect of passing the DDBB maintenance.
  1. 一定速度のトラップを受信します(前述のスクリプトの while ループ内に sleep 1 を設定するだけで、1トラップ/秒を生成します)。システムを 48時間稼働させ、サーバへの影響を評価します。
  2. 大量トラップ。大量のトラップ受信が発生した場合の、その前後、発生中の評価をします。
  3. 巨大なトラップテーブル(5万以上)に対するシステム影響の確認。 これには、データベースメンテナンスへの影響も含みます。

イベント

In a similar way as with the SNMP, evaluate the PFMS system's events in two cases:

SNMP の場合と同様に、次の 2つの場合の Pandora FMS システムのイベントを評価します。

1. Normal range of event reception. This has been already tested in the data server, so in each status change, an event will be generated.

1. イベント受信の通常の範囲。 これはデータサーバですでにテストされているため、ステータスが変更されるたびにイベントが生成されます。

2. Event generation Storm. To do this, we force the generation of evets via CLI. Using the following command (with a created “TestingGroup”):

2. 大量のイベント生成。これを行うには、CLI を介してイベントの生成を強制します。 次のコマンドを使用します(作成された “TestingGroup” を使用)。

/usr/share/pandora_server/util/pandora_manage.pl \
  /etc/pandora/pandora_server.conf --create_event "Event test" system TestingGroup

This command, used un a loop as the one used to generate traps, it can be used to generate tens of events by second. It could be parallelize in one script with several instances to get a higher number of insertions. This will be useful to simulate the performance of the system if an event storm happens. This way we could check the system, before, during and after the event storm.

このコマンドは、トラップの生成に使用したものと同様にループを使用し、1秒ごとに数十のイベントを生成するために使用します。発生数を増やすために、複数のインスタンスを使用して 1つのスクリプトを並列化することができます。 これは、大量のイベントが発生した場合にシステムのパフォーマンスをシミュレートするのに役立ちます。 このようにして、大量イベントの前後、最中にシステムをチェックできます。

ユーザの同時アクセス

For this use another server, independent from Pandora FMS, using the WEB monitoring functionality. Do a user session where we have to do the following tasks in this order, and see how long they take.

こにには、WEB 監視機能を使用して、Pandora FMS から独立した別のサーバを使用します。 次のタスクをこの順序で実行するユーザセッションを実行し、それらにかかる時間を確認します。

  1. Login in the console
  2. See events.
  3. Go to the group view.
  4. Go to the agent detail view.
  5. Visualize a report (in HTML). This report should contain a pair of graphs and a pair of modules with report type SUM or AVERAGE. The interval of each item should be of one week or five days.
  6. Visualization of a combined graph (24 hours).
  7. Generation of report in PDF (another different report).
  1. コンソールへのログイン。
  2. インベントの参照。
  3. グループ表示へ行く。
  4. エージェント詳細表示へ行く。
  5. サポートの参照(HTML にて)。このレポートには、レポートタイプが合計または平均のグラフのペアとモジュールのペアが含まれている必要があります。各項目の間隔は、1週間または 5日である必要があります。
  6. 組み合わせグラフの参照(24時間)。
  7. PDF でのレポート生成(他のレポートにて)。

This test is done with at least three different users. This task could be parallelize to execute it every minute, so as if there are 5 tasks (each one with their user) we would be simulating the navigation of 5 simultaneous users.Once the environment is set up, we should consider this:

このテストは、少なくとも 3人の異なるユーザを使用して行います。このタスクは並列化して毎分実行することができるため、5つのタスク(それぞれがユーザを含む)があるのであれば、5人のユーザの同時ナビゲーションをシミュレートします。環境をセットアップしたら、次のことを考慮する必要があります。

  1. The average velocity of each module is relevant facing to identify “ bottle necks” relating with other parallel activities, such as the execution of the maintenance script, etc.
  2. The impact of CPU and memory will be measured in the server for each concurrent session.
  3. The impact of each user session simulated referred to the average time of the rest of sessions will be measured. This is, you should estimate how many seconds of delay adds each simultaneous extra session.
  1. 各モジュールの平均速度で、メンテナンススクリプトの実行など、他の平行して行われる処理に関連した “ボトルネック” を特定します。
  2. CPU とメモリの影響は、同時セッションごとにサーバで測定します。
  3. 残りのセッションの平均時間を確認してシミュレートされた各ユーザセッションの影響を測定します。つまり、同時の追加セッションごとに何秒の遅延が追加されるかを見積もる必要があります。

Pandora FMS ドキュメント一覧に戻る

  • ja/documentation/pandorafms/technical_annexes/03_capacity_planning.txt
  • 最終更新: 2024/02/06 07:24
  • by junichi