ja:documentation:pandorafms:monitoring:20_gis

GIS 監視

A GIS map is a visual representation of the geographical location of the agents of the Pandora FMS installation. With this map you can observe the current position, as well as a small historical summary of the agents' positions.

GIS マップは、Pandora FMS のエージェントの地理的な場所を視覚的に表現したものです。このマップで、エージェントの現在の位置と、これまでの位置履歴の概要を見ることができます。

In order to use the GIS maps, the agents, the server and the console must be configured.

GIS マップを利用できるようにするには、エージェント、サーバ、コンソールの設定が必要です。

The pandora_agent.conf file of the Software agent has parameters to configure the device's positioning:

ソフトウエアエージェントpandora_agent.conf ファイルには、デバイスの位置を設定するパラメータがあります。

  • Longitude.
  • Latitude.
  • Altitude.
  • Item description.
  • 経度
  • 緯度
  • 高度
  • 説明

You can also use the gis_exec parameter to indicate the path of a script that returns the device coordinates in a string with the format “latitude, logitude, altitude”.

別途 gis_exec パラメータで、座標を返すスクリプトのパスを指定することもできます。スクリプトは “緯度,経度,高度” というフォーマットの文字列で座標を返す必要があります。

Example:

例:

# Agent position parameters
# Those parameters define the geographical position of the agent

# gis_exec: Call a script that returns a string with "latitude,longitude,altitude"
# i.e.: 41.377,-5.105,2.365

#gis_exec /tmp/gis.sh

# latitude
latitude 40.37346827
# longitude
longitude -3.6418548
# altitude
altitude 637

# Position description
position_description Madrid, Vallecas

The GIS functionalities should be enabled in the server with the parameter activate_gis . When this flag is set to 1, the server will process all GIS information received from the agents.

GIS 機能はサーバの activate_gis パラメータで有効化できます。このフラグを 1 に設定することにより、サーバがエージェントから受け取った GIS 情報を処理するようになります。

With the data positioning there is the possibility of storing agent positions in Pandora FMS, but this data comes from a source that is not completely reliable, and can cause an agent without significant position changes to send location change information. To avoid this, the parameter location_errorsets the distance that is considered as the same position. This is an error tolerance on the position threshold, and as long as the agent's location remains at that threshold it will be considered to be in the same position.

位置情報により Pandora FMS にエージェントの位置を保存することができますが、このデータは完全には信頼できないソースから届くため、大きく移動していないのにエージェントが場所移動の情報を送信する可能性があります。これを避けるために、location_error パラメータに同じ位置であるとみなす距離を設定します。これは閾値によるエラー許容であり、エージェントの位置が閾値内にとどまっていれば同じ位置であると認識します。

自動検出サーバと位置情報

Using an inverse geolocation algorithm and a database with IP addresses and positional information, the Discovery server can calculate the position of the discovered agents. This can be done either by using a formatted **MaxMind GeoIP GeoLiteCity** file, or a couple of tables in the database with that information.

逆ジオロケーションアルゴリズム(位置情報からの住所検索)と IP アドレスおよび位置情報のデータベースを利用することにより、自動検出サーバは検出したエージェントの位置を推測することができます。利用のためにはMaxMind GeoIP GeoLiteCity フォーマットか、データベース内の IP アドレスと位置情報のテーブルの組み合わせを利用します。

There are two parameters that define this behavior of the Discovery server: the recon_reverse_geolocation_file, used to point to the file with the reverse geolocation information (using the MaxMind GPL 'GeoLiteCity.dat'), and the parameter recon_location_scatter_radius. The algorithm will calculate an approximated position for the agents and they will be randomly arranged around the calculated positions, taking into account the radius indicated in recon_location_scatter_radius.

自動検出サーバの動作を定義する、2つのパラメータがあります。recon_reverse_geolocation_file は、MaxMind GeoLiteCity.dat を用いた逆ジオロケーションを含むファイルを指定するのに使われます。recon_location_scatter_radius は、検出したエージェントのおおよその位置をアルゴリズムで推測する際、推測位置から recon_location_scatter_radius のパラメータによって定義される半径(メートル単位)の中でランダムに配置するために利用されます。

The reverse geolocation serivce provided by the Google API® and OpenStreetMaps® (OSM) can also be used.

また、Google API® および OpenStreetMaps® により提供される位置情報変換 (リバースジオロケーション) サービスを利用することもできます。

  • Google® reverse geolocation can be enabled by setting the parameter google_maps_description, to 1.
  • You can activate the reverse geolocation of OpenstreetMaps® by setting the parameter openstreetmaps_description, to 1.
  • This functionality decreases the performance of the Pandora FMS server.
  • Internet access is required to use Google® or OpenstreetMaps® API and that, of course, this functionality depends on the availability of the providers of these services.
  • Google® のジオロケーションを有効にするには、google_maps_description1 に設定します。
  • OpenstreetMaps® のリバースジオロケーションを有効にするには、openstreetmaps_description1 に設定します。
  • この機能は Pandora FMS サーバのパフォーマンスを低下させます
  • Google® や Openstreet Maps® の API を利用するためにはインターネット接続が必要 であり、もちろん本機能はこれらのサービス提供者の可用性に依存しています。
# Flag to activate GIS (positional information for agents and maps) by default it is deactivated
activate_gis 1

# Radius of the Error in meters to consider two gis locations as the same location.
location_error 10

# Recon reverse geolocation file (databases with the reverse geolocation information using
# MaxMind GPL GeoLiteCity.dat format).
# Comment it to disable the IP geolocation on agent creation.

recon_reverse_geolocation_file /usr/local/share/GeoIP/GeoLiteCity.dat

# Radius (in meters) of the circle in where the agents will be place randomly when found by a recon task
# The center of the cicle is guessed by geolocating the IP address.
recon_location_scatter_radius 1000

# This enables realtime reverse geocoding using Google Maps public API.
# This requires internet access, and could have performance penalties processing GIS
# information due the connection needed to resolve all GIS input.

google_maps_description 1

# This enables realtime reverse geocoding using OpenStreetMaps public API.
# This requires internet access, and could have performance penalties processing GIS
# information due the connection needed to resolve all GIS input.
# You can alter the code to use a local (your own) OpenStreetMaps server.

openstreetmaps_description 1

In the Web console, to use the GIS functionality, it must first be enabled in the main configuration.

コンソールで GIS 機能を利用するには、最初にメインの設定で有効にする必要があります。

Menu Management → Setup → Setup → General Setup → Enable GIS features → Update.

管理(Management) → 設定(Setup) → システム設定(Setup) → 基本設定(General Setup) → GIS 機能の有効化(Enable GIS features) → 更新(Update) へ進みます。

This will make available some new sections of the user interface.

すると、ユーザインタフェースに新たなメニューが追加されます。

基本設定

In Setup → Setup → GIS map connection you will define the connections that can be used with map servers to provide maps for GIS functionalities.

設定(Setup) → システム設定(Setup) → 利用 GIS マップ(GIS map connection) にて、GIS で利用するマップを提供する地図サーバへの接続を定義する必要があります。

  • Group: The group to which the connection belongs. Even if the user who is creating the GIS map connection does not explicitly belong to the ALL group (ALL), you can still assign the ALL group as the group to which the connection belongs.
  • Number of zoom levels: The zoom number defined on the map.
  • Default zoom level: The default magnification level recommended for the map (which can be redefined on the map) and is the zoom level used when the map is displayed.
  • グループ(Group) は所属するグループです。GIS 接続マップを作成しようとしているユーザが明示的に “すべて” グループに属していない場合 でも、接続として"すべて"グループを割り当てることができます。
  • 選択可能な拡大率の数(Number of zoom levels) はマップ上に定義される拡大率の数です。
  • デフォルト拡大レベル(Default zoom level) はデフォルトのマップのズーム倍率です。(マップ上で再定義できます)

Once the basic parameters are configured, the administrator must select a connection type and, depending on the type, there will be different options.

基本パラメータを設定したら、利用マップのタイプを選択する必要があります。タイプによりオプションが異なります。

Open Street マップ

The default installation of Pandora FMS has a predefined connection with OpenStreetMap®, so users can directly test and view the GIS functionalities.

Pandora FMS のデフォルトインストール状態では、OpenStreet マップ を利用するようになっています。これを使って直接 GIS 機能を確認することができます。

To use an OpenStreet® map type, the only parameter needed is the URL of the title server:

マップに OpenStreet マップを利用するのに必要なパラメータは タイルサーバの URL のみです。

http://tiles.example.com/${z}/${x}/${y}.png

http://tile.example.com/${z}/${x}/${y}.png

You can consult the official list of servers on OpenStreetMap® web site with instructions on naming and accreditation.

サーバの名前と認定についての説明はOpenStreetMap® の公式サーバ一覧サイトを確認してください。

Google マップ

Pandora FMS also includes the connection to Google Maps®. For this, it is necessary that a valid password is obtained from Google® (see Google Maps API policy) and that it is placed in the corresponding field of the connection definition.

また Pandora FMS は Google Maps® もサポートしています。これを利用するには、正しい パスワード を Google から取得し、接続設定の対応するフィールドに入力する必要があります。(詳細は、Google マップ API ポリシー を参照)

With this password it is possible to define several connections using different types of base maps: Hybrid, Physical or Satelite.

このパスワードで、ベースのマップの種類 (航空写真地形地図) を設定することができます。

This password may take several minutes to work after being obtained.

このパスワードは取得してから利用できるまでに数分かかる場合があります。

静的画像

Another type of connection provided is to use a Static Image as a map. To use this type of map, the image must be as EPSG:4326 (WGS84).

ほかには、マップとして静的画像の利用をサポートしています。この種類のマップを利用するには、画像ファイルは、EPSG:4326 である必要があります。

In this case the parameters needed for the map definition are the url of the image, the height and width of the image, and the position limits (longitude and latitude) of the image borders (right, left, top and bottom).

マップの定義に必要なパラメータは、画像の URL高さ および、マップ画像の境界 () の位置情報 (経度緯度) です。

WMS サーバ

A local WMS map server (Web Map Service) can be installed and used when it is impossible to use an online map service. This also allows defining mosaic] types for higher speed.

ローカル WMS マップサーバをインストールし、オンラインマップサービスを利用できない際に使用できます。これは高速処理のために モザイク タイプの定義を行うこともできます。

Since version 723 it is possible to add connections to WMS servers, such as GeoServer. To do this, it is necessary to enter the address where the service is provided and the name or names of the layers to be obtained from it.

バージョン 723 から、GeoServer のような WMS サーバ(Web マップサービス)への接続を追加できるようになりました。それには、サービスが提供されているアドレスを入力し、そこから取得したいレイヤの名前を入力する必要があります。

You can see how to perform a minimal installation and configuration of a GeoServer in this technical annex.

GeoServer サーバの最小限のインストールと設定は、こちら を参照してください。

マップの中心とデフォルトの位置

The last thing to define in a map connection is the map center and default position for agents without positional data. To define these, it is possible to preview the map and click on it to set these parameters, depending on which (Map center or Default position for agents without GIS data) has been selected with the Change in the Map selector.

マップ接続定義の最後は、位置情報を持っていないエージェントに対するマップの中心とデフォルトの位置の定義です。それらを定義するには、マップをプレビューし、マップをクリックして、マップ内での変更(Change in the Map) セレクタで選択されているパラメータ (マップの中心(Map center) もしくは GIS データが無い場合のエージェントのデフォルト位置(Default position for agents without GIS data)) に応じて、このパラメータを設定します。

In this preview map it is possible to scroll using the green arrows at the top left, change the zoom level with icons + or - icons, or use the magnifying glass icon to view it in full zoom.

このプレビューマップでは、左上の緑色の矢印を使用して移動したり、+ または - アイコンでズームレベルを変更したり、虫眼鏡アイコンでフルズームにしたりすることができます。

It is also possible to set the position by entering the values in their corresponding input cells (here the decimal separator is the point).

入力セルに値(小数点はドットです)を入れることによって、位置を設定することもできます。

Once all the connection parameters have been set, it will be possible to save the connection for use in the map configurator by clicking on the Save button.

すべての接続パラメータを設定したら、保存(Save) ボタンをクリックすることにより、マップビルダから利用できるように接続を保存できます。

Once the connections have been defined, they can be used to define maps in the GIS Maps menu.

接続の設定を行うと、GIS マップ(GIS Map) で利用することができるようになります。

The menu takes the user to a screen with defined maps, where it is possible to edit a map, display the map, set the default map or delete a map.

定義済のマップを含む画面が表示されます。ここでは、マップの編集、マップの表示、デフォルトマップの定義、マップの削除ができます。

There is also a button to create new maps (Create button).

新たなマップを作成するボタン(作成(Create) ボタン)もあります。

A default map must be set, which will be the one used in the agent's view to show its position.

デフォルトマップ を設定する必要があります。これはエージェント表示でその位置を表示するために使用されます。

GIS マップの作成

When accessing the map creation page, the first thing to do is to add a name (Map Name) and a map connection (Add Map connection), selecting one of those already available. It is possible to add more than one, which will be available later as a base layer (only one of them can be active at the same time).

マップ作成ページにアクセスして最初に行うことは、マップ名(Map Name)利用マップの追加(Add Map connection) を既に利用可能なものの中から追加することです。一つ以上を追加することができますが、これらは後ほどベースレイヤーとして利用可能になります。(同時には一つのみが有効です)

After selecting the connection (or when the default connection of the map is changed) the Pandora FMS console will ask if you want to use the default data of the connection for the map. If yes, the console will fill (or update) all positioning data with the ones already defined in the connection, and the user will have to set only the default zoom level. If the use of the default values is rejected, no change will be made and the connection will simply be added.

利用マップを選択すると (またはデフォルトの利用マップを変更すると) 、Pandora FMS コンソールが利用マップのデフォルトデータを利用したいかどうかを尋ねてきます。それを'受け入れる'と、コンソールは 全ての位置データ を利用マップに設定されている値に設定 (更新) します。ユーザは デフォルトの拡大率 のみ設定する必要があります。キャンセルすると、これらのフィールドの変更は行われず 、利用マップの設定のみが追加されます。

レイヤ定義

When the basic parameters of the map have been set, it is time to define the layers (LAYERS) of the map that will be used to select which elements to display on the map. If it is the default map it is unnecessary to define any layer because it will be used to show the agent's position in the agent view.

基本的なマップのパラメータを設定したら、どのエレメントをマップに表示するかを選択するための、マップのレイヤ を定義します。ただし、デフォルトマップでは レイヤを定義する必要がありません。なぜならエージェントビューにおいて、エージェントの位置を表示するのに利用されるためです。

Each map has one or more layers to display agents. Each layer can display the agents of a group, a list of agents and/or a group with an agent as a replesentative. In this way it is easy to set the agents to be displayed in each layer.

それぞれのマップは、エージェントを表示するための一つ以上のレイヤを持っています。それぞれのレイヤは、グループに属するエージェントエージェント一覧代表エージェント付きのグループ を表示することができます。これにより、それぞれのレイヤに表示するエージェントを簡単に設定できます。

Layers can be configured as visible or hidden, and it is possible:

レイヤは、'表示' または '非表示' を定義できます。また、

  • Select the group with the selector to add your agents.
  • Add agents with the cell individually.
  • Add a group with single agent as representative.
  • エージェント追加のためにグループを選択できます。
  • エージェントを個別に追加できます。
  • 代表の一エージェントが添えられたグループを追加できます。

Once a group has been created in a layer with its representative agent, it is not possible to generate another group with another agent.

代表エージェントを持つレイヤにグループを作成したら、他のエージェントで別のグループを作成することはできません。

Once the layer is set (it will be completely saved, with the complete map is, by clicking on the Save map) it will be moved to the left column of the defined layers, where it is possible to sort them (move up or down), delete or edit them again.

レイヤが定義されると(マップの保存 をクリックするまで、完全には保存されません)、定義されたレイヤーの左の列に移動します。ここでレイヤの並び替えやレイヤの削除、または編集が再度可能になります。

Once you have finished defining the map layers, you can save them all with the Save map button (Update map button in the case of editing a map).

マップのレイヤ定義が完了したら、マップの保存(Save Map) ボタンで全てを保存することができます。マップを編集する場合は、マップの更新(Update Map) ボタンが表示されます。

The GIS map menu displays all defined maps. Each one can be viewed by displaying the map with the parameters defined in the map. In turn, once opened, each map can be edited by clicking on the Setup button located at the top edge.

GIS マップメニューは、すべての定義済マップを表示します。それぞれマップに定義されたパラメータでマップを表示できます。また、開いたマップは上端にある 設定(Setup) ボタンをクリックして編集できます。

マップの移動

The controls for the map include four green arrows in the upper left corner that allow you to scroll the map in each derection. With + and - icons to increase and decrease the zoom level, and a zoom bar to directly select the desired level.

左上にマップ操作のための4つの緑の矢印があり、それぞれの方向へマップを動かすことができます。+- は拡大率を増減させるアイコンで、ズームバーで直接設定したい拡大率を選択することができます。

By dragging the map it is also possible to move around.

マップをドラッグすることによっても、動かすことができます。

Agents shown on the map can be clicked on to get more information about the agent (and once the balloon with the extra information is displayed, the agent name is a link to the agent view).

マップ上に表示されているエージェントをクリックすると、そのエージェントに関する詳細情報を表示できます。追加情報のバルーンが表示される場合、エージェントの名前はエージェント表示へのリンクになっています。

レイヤ

Clicking on the + icon on the right will open the layer controls. It displays a green box where it is possible to select the base layer (the connection to the map server, if more than one has been defined for the map), and display which layers are visible.

+ アイコンをクリックすると、レイヤの操作パネルが開きます。緑色のボックスが表示され、ベースのレイヤ (マップが一つ以上定義されている場合は利用マップ) および、表示するレイヤを選択することができます。

There is also a special layer defined by the system called Agent Hierarchy. If this layer is visible, it will show red dotted lines connecting an agent to its parent agent (if both are visible).

エージェントの階層(Agents Hierarchy) と呼ばれる特別なシステム定義レイヤもあります。 このレイヤーが表示されている場合は、エージェントとその親要素をつなぐ赤い点線が表示されます。(両方が表示されている場合のみ)

フィルタ

Above the map there are filtering options by agent status:

マップ上には、エージェントの状態のフィルタオプションがあります。

  • OK.
  • Critical.
  • Warning.
  • Other.
  • 正常(Ok)
  • 障害(Critical)
  • 警告(Warning)
  • その他(Other)

マップの更新

Next to the filter buttons there is a list box named Refresh to select the map refresh range. The map uses AJAX calls to refresh the agents on the map using the chosen period.

フィルタボタンの隣に、マップの更新間隔を設定する 更新(Refresh) というコンボボックスがあります。マップは、指定した間隔でエージェントを更新するために AJAX を呼び出します。

The agent view of the Pandora FMS console also has GIS features. The first thing that appears in the main view is the agent's location in terms of longitude, latitude and altitude.

Pandora FMS コンソールのエージェント表示にもまた GIS 機能があります。その1つはメイン画面でのエージェントの経度、緯度、高度の表示です。

GIS 履歴表示

There is a button on the top bar (provided that GIS is enabled) that displays the GIS view of the agent.

トップバーに、エージェントの GISビュー を表示するためのボタンがあります。(GIS が有効な場合)

This view shows the agent's position on the default map, in a table with all the information reported by the agent, including a reverse geolocation system that shows the agent's address with the street, city and country where it is located.

ここでデフォルトマップ でのエージェントの位置が表示されます。エージェントから届いた全情報が、国名、町名、通り名の逆ジオロケーション情報と共に表形式で表示されます。

Among the agent management tabs, there is an option to manually set the agent position. Also the Agent manage tab has some parameters that affect the GIS functionalities.

エージェント管理タブの中に、新たにエージェントの位置を手動で設定する項目があります。また、GIS 機能に関連するいくつかのタブがあります。

GIS データの更新

In the Agent manage tab there is an option called Update new GIS data.

エージェント管理 メニューに、新たな GIS データを更新(Update new GIS data) というオプションがあります。

  • If enabled, the server will update all position information received from the agent and will stop using the last valid values for this agent.
  • When this option is inactive, it is useful in case an agent is reporting an erroneous position or needs to be placed in a fixed location.
  • 有効にするとサーバはエージェントから受信した全ての位置情報を更新し、最後に設定された位置は使用しなくなります。
  • エージェントが間違った位置情報を送信してくる場合や、位置が固定されている場合には無効とすると便利です。

エージェントの手動での位置決め

The GIS Data tab shows the default map. It is possible to click on it to define the new agent position, or set it using the form at the bottom of the map.

GIS データ(GIS Data) タブでデフォルトのマップを表示します。クリックすることによりエージェントの新たな位置を設定することができます。また、位置情報を下部のボックスから入力することもできます。

Setting manually the agent's position will also activate the option to ignore new GIS data (Ignore new GIS data - which will then take the opposite value in the “Update new GIS data” option. - ), thus preventing the next data packet with positional information from the agent from resetting the position again.

If this is not the desired behavior, remember to uncheck the Ignore new GIS data option before clicking the Update button.

エージェントの位置を手動で設定すると、同時に GISデータを無視 オプションが有効になります。(新たな GIS データを更新(Update new GIS data) と逆の値です) そのため、エージェントから次の位置情報データが来ても、エージェントの位置情報をリセットしなくなります。

これが望む動作でない場合は、更新(Update) をクリックする前に GISデータを無視する(Ignore new GIS data) オプションを無効にすることをお勧めします。

  • ja/documentation/pandorafms/monitoring/20_gis.txt
  • 最終更新: 2024/07/17 10:53
  • by kanayama