ja:documentation:04_using:04_inventory

インベントリ

Pandora FMS allows you to keep an inventory of the devices monitored by Pandora FMS. Thanks to this inventory, it is possible to keep a list (reports are availables in Enterprise Version) which contains the CPU, expansion cards, memory, patches, software, etc. or the company's servers.

Pandora FMS を使用すると、Pandora FMS によって監視されているデバイスのインベントリを保持できます。このインベントリにより、CPU、拡張カード、メモリ、パッチ、ソフトウェアなどを含む 一覧 を保持できます。(レポートは Enterprise 版で利用可能)

The inventory is independent from the monitoring and could be obtained either locally (by Pandora FMS Software Agents) or remotely.

インベントリは、監視とは独立しており、データはローカル (Pandora FMS ソフトウエアエージェントを通して) およびリモートから取得することができます。

  • Processor model and speed (MS Windows®, GNU/Linux®).
  • Storage and filesystems.
  • Firmware version (network hardware).
  • Device configuration (network hardware).
  • Serial numbers and licenses (e.g. MS Office®, MS Windows®).
  • Applications installed on the computer (MS Windows®, Android Linux®, GNU/Linux®).
  • Network cards and their MAC associated with IP addresses.
  • RAM modules and their capacity (MS Windows®, GNU/Linux®).
  • Installed routes.
  • Services in progress.
  • Storage devices (MS Windows®, GNU/Linux®).
  • System users.
  • CPU モデルと速度 (MS Windows®, GNU/Linux®)
  • ストレージとファイルシステム
  • ファームウエアバージョン (ネットワークハードウエア)
  • デバイス設定 (ネットワークハードウエア)
  • シリアル番号およびライセンス (例: MS Office®, MS Windows®).
  • コンピュータにインストールされたアプリケーション (MS Windows®, Android Linux®, GNU/Linux®).
  • ネットワークカードおよび IP アドレスに関連付けられた MAC
  • RAM モジュールおよび容量 (MS Windows®, GNU/Linux®)
  • ルーティング
  • 実行中サービス
  • ストレージデバイス (MS Windows®, GNU/Linux®)
  • システムユーザ

Data collection for system inventory is carried out in two different ways:

システムインベントリのデータ収集には、次の 2つの方法があります。

Remotely through inventory modules, through scripts integrated within Pandora FMS which perform WMI queries or through scripts executed by means of SSH along with Expect or similar methods.

インベントリモジュールを介して、Pandora FMS に統合されたスクリプトで、リモートから WMI クエリを実行したり、または Expect または同様の方法で SSH を実行する方法。

Locally using the Pandora FMS Agent, through agent plugins.

エージェントプラグインを介してローカルで Pandora FMS エージェントを利用する方法。

インベントリモジュール

インベントリモジュールは、リモートのマシンにコマンドを実行するリモートモジュールです。これらのモジュールは、プラグインと同じように動作します。エージェントを通してデータを取得するローカルモジュールと同じものを定義することができます。

In the User and Password parameters the following macros can be used: _agentcustomfield_n_ (agent number n custom field).

ユーザおよびパスワードでは、_agentcustomfield_n_ (エージェントのカスタムフィールド番号 n) マクロが利用できます。

リモートインベントリ

リモートモジュールの作成

The creation of a remote inventory module by an administrator is seen as unusual. These inventory modules are already 'preconfigured' in Pandora FMS Enterprise. Pandora FMS also allows you to create your own inventory modules or modify the already existing ones by using the Inventory Module Editor.

管理者がリモートインベントリモジュールを作成する必要は通常はありません。Pandora FMS エンタープライズ版では事前に定義されています。しかしながら、Pandora FMS では、独自のインベントリモジュールを作成したり、すでに定義されているものをインベントリモジュールエディタで修正することができます。

In order to create a remote module, go to ConfigurationInventory Modules where all created inventory modules appear.

リモートモジュールを作成するには、設定(Configuration)インベントリモジュール(Inventory modules) をクリックします。定義済みの全インベントリモジュールが表示されます。

新たなモジュールを作成するには、“作成(Create)” をクリックします。

OS: The operative system the module is created for.

OS: モジュールを作成するオペレーティングシステムを選択します。

Interpreter: Field featuring the command interpreter to be used within the module. It can be Shell Script, Perl or any other valid interpreter for the Inventory Server which is executed on a Linux system. Leave blank if it is a local module.

インタープリタ(Interpreter): モジュールで使われるコマンドインタープリタを入力するフィールドです。シェルスクリプト、Perl、その他インベントリサーバで実行できるスクリプト言語を利用できます。

Block mode: It shows and detects configuration changes.

ブロックモード(Block mode): 設定変更を表示・検出します。

Format: It shows the fields returned by the module separated by the ; character.

フォーマット(Format): モジュールが返す値を “;” で分割したフィールドを入力します。

Be sure to place each and every field separated by semicolons. If you omit this field you will not be able to create or save an inventory module and you will lose the changes you have made.

すべてのフィールドをセミコロンで区切って配置してください。 このフィールドを省略すると、インベントリモジュールを作成または保存できなくなり、行った変更が失われます

Code: Leave blank if it is a local module. Module code: It is usually Perl or Shell Script. If you intend to use binary code here, it will require a different loading procedure which is required to be entered by peripheral scripts.

コード(Code): ローカルモジュールの場合は空にします。 Perl やシェルスクリプトなどのプログラムを設定します。バイナリの実行ファイルの場合、別途それを呼び出すスクリプトが必要です。

It is very important to choose the operative system correctly, because when adding inventory modules to an agent, only those whose module operating system and agent operating system match will appear.

インベントリモジュールをエージェントに追加すると、モジュールのオペレーティングシステムとエージェントのオペレーティングシステムが一致するもののみが表示されるため、オペレーティングシステムを正しく選択することが非常に重要です。

Once the module is created, click on Create:

モジュールの定義が完了したら、作成(Create) をクリックします。

リモートモジュールの編集

In order to edit a remote module, go to ConfigurationInventory Modules where all the inventory modules created so far are listed. Click on the module you intend to edit or on the wrench from the Action column.

リモートモジュールを編集するには、設定(Configuration)インベントリモジュール(Inventory modules) をクリックします。作成済みの全インベントリモジュールが表示されます。編集したいモジュール名をクリックするか、右のスパナアイコンをクリックします。

モジュール作成ページが表示されます。

変更したいフィールドを修正し、“更新(Update)” をクリックします。

リモートモジュールの削除

In order to delete a remote module, go to ConfigurationInventory Modules, where all the inventory modules created so far are listed. Click on the trash icon located in the Action column of the module you intend to delete.

リモートモジュールを削除するには、設定(Configuration)インベントリモジュール(Inventory module) をクリックします。作成済みの全インベントリモジュールが表示されます。削除したいモジュールの右にある、ゴミ箱アイコンをクリックします。

リモートモジュールの割当

エージェントへのインベントリモジュールの割り当ては、エージェント管理タブから行います。

“インベントリ(Inventory)” タブをクリックします。

インベントリモジュールを追加する画面になります。

インベントリモジュールを追加するのに必要なフィールド設定を以下に説明します。

  • モジュール(Module): 追加したいインベントリモジュールを選択します。エージェントのオペレーティングシステムに合うモジュールのみが表示されます。
  • 対象(Target): インベントリを取得する対象の IP アドレスもしくはホスト名を設定します。
  • 間隔(Interval): インベントリモジュールの実行間隔を設定します。
  • ユーザ名(Username): インベントリモジュールを実行するユーザを設定します。
  • パスワード(Password): インベントリモジュールを実行するユーザのパスワードを設定します。

設定が完了したら、インベントリモジュールを追加するために “追加(Add)” をクリックします。

バージョン 7.0NG 724 以降では、通常存在するユーザーフィールドとパスワードフィールドの代わりのフィールドを定義することができます。それには、次のチェックボックスを有効化します。

その後、新たなフィールドを追加する画面が表示されます。

ここで、好みの名前を入力します。フィールドがパスワードであると設定した場合は、その値は難読化された方法でデータベースに保存されます。

フィールドを作成したら、値の設定とモジュールへの追加ができます。これらのフィールドは、リモートインベントリスクリプトの実行時に作成順に適用されます。

割り当てられたインベントリモジュールの編集

インベントリモジュールを編集することもできます。作成と同じ画面で編集することができます。

インベントリモジュールを編集するには、モジュール名もしくはスパナアイコンをクリックします。

割り当てられたインベントリモジュールの削除

It is possible to delete inventory modules. This deletion process is carried out on the same page where they have been previously created.

インベントリモジュールを削除することもできます。作成と同じ画面で削除することができます。

In order to delete an inventory module, click on the trash icon located in the module's Action column.

インベントリモジュールを削除するには、モジュールの アクション カラムにあるごみ箱アイコンをクリックします。

リモートインベントリモジュール例

UNIX サーバから物理アドレスの一覧を取得する必要がある場合を想定します。これは、通常 “arp -a -n” コマンドで取得でき、サーバで実行すると次のような出力を得られます。

artica@galaga:~$ arp -a -n
? (192.168.70.74) at 08:00:27:39:BF:6F [ether] on eth2
? (192.168.70.162) at B4:74:9F:94:98:84 [ether] on eth2
? (192.168.50.30) at 08:00:27:10:D1:1A [ether] on eth0
? (192.168.70.90) at 98:0C:82:54:2F:DE [ether] on eth2
? (192.168.50.2) at 08:00:27:EA:B2:FF [ether] on eth0
? (192.168.70.135) at C8:60:00:4B:96:67 [ether] on eth2
? (192.168.60.182) at FE:26:C5:91:B1:DA [ether] on tap0

やりたいことは、IP アドレス、MSC アドレス、ネットワークインタフェース名を抽出することです。

これは、フィールドを “ ”(スペース)で分割して、次のようなシェルスクリプトで実現できます。

arp -a -n | sort | grep -v incomplete | awk '{ print $2,$4,$7 }'

Pandora のリモートインベントリサーバへ、この情報を “インポートする” 必要があるとします。そのためには、“CPU” のリモートインベントリモジュールを元に、それを若干修正します。このスクリプトは、SSH を使って対象のサーバへ接続し、コマンドを実行します。コマンドは、“;” 文字で分割して情報を出力します。

ここで、若干スクリプトのプログラミングの知識が必要になります。リモートインベントリスクリプトには、複雑ではありませんが、多少 perl、シェルスクリプト、その他言語の知識が必要です。モジュールから実行され、データ単位ごとに 1行で、かつフィールドを “;” で区切った形式で値を返すのであれば、java や c++ で記述することもできます。

#!/usr/bin/perl
##########################################################################
# pandora_linux_arptable.pl
##########################################################################
# Copyright (c) 2012 Sancho Lerena <slerena@artica.es>
#           (c) 2012 Artica Soluciones Tecnologicas S.L
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; version 2.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
##########################################################################

use strict;
use warnings;

# Check for ssh
my $ssh_client = "ssh";
if (system("$ssh_client -v> /dev/null 2>&1")>> 8 != 255) {
    print "[error] $ssh_client not found.\n";
    exit 1;
}

if ($#ARGV <1) {
    print "Usage: $0 <target ip> <username>\n";
    exit 1;
}

my $target_ip = $ARGV[0];
my $username = $ARGV[1];

# Retrieve ARP table
my ($ip, $mac, $iface);
my $command = '/usr/sbin/arp -a -n | sort | grep -v incomplete | awk \'{ print \$2,\$4,\$7 }\'';

my @info = `$ssh_client $username\@$target_ip "$command" 2> /dev/null`;
foreach my $line (@info) {
    if ($line =~ /^(.+)\s(.+)\s(.+)/) {
        $ip = $1;
        $mac = $2;
        $iface = $3;
        print "$ip;$mac;$iface\n";
    }
}

exit 0;

SSH 接続を自動実行できるようにするためには、対象のサーバに pandora サーバの root ユーザの公開鍵をコピーする必要があります。このコマンドを 192.168.50.10 のサーバで実行することを想定した場合、次のようになります。

1. pandora サーバで root にて鍵を生成します。

ssh-keygen

2. ssh-copy-id コマンドを使って、公開鍵を対象のサーバ(192.168.50.10)の対象ユーザ(例では artica)へコピーします。

ssh-copy-id -i /root/.ssh/id_rsa.pub artica@192.168.50.10

(対象のユーザに公開鍵をインストールするために、一度 “artica” ユーザのパスワードを入力する必要があります。)

3. 接続を試します。パスワードを聞かれずに接続できる必要があります。

ssh artica@192.168.50.10

4. 処理が成功したら、インベントリモジュールが実行するのと同じ処理をコマンドラインから実行してみます。前述のスクリプト(temporal.pl)を IP アドレスとユーザをパラメータに指定して実行します。

perl temporal.pl 192.168.50.10 artica
(192.168.50.1);00:0f:ea:27:ba:f0;eth0
(192.168.50.3);08:00:27:98:f8:48;eth0

スクリプトは、リモートで /usr/sbin/arp を実行していることに注意してください。コマンドが指定のパスにある必要があります。パスが違う場合はスクリプトを修正します。また、スクリプトは “perl” から呼び出します。通常は、/usr/bin/perl です。モジュール定義はつぎのようになります。

これをエージェントに適用する場合は、OS が同じであるか確認することに注意が必要です。異なる OS の場合は、同一のコードは動かないため、それぞれに異なるモジュールを作成する必要があります。

モジュールが実行されると、次のように表示されます。

ソフトウエアエージェントによるローカルインベントリ

It is also possible to obtain the inventory data from a machine by using Software agents. Just apply the appropriate inventory modules within the software agent's configuration.

ソフトウエアエージェントを通してインベントリデータを取得することができます。ソフトウエアエージェントの設定に、必要なインベントリモジュールを適用すれば良いだけです。

How to install a Windows Agent in Pandora FMS?

Like in remote modules, it is also necessary to add these modules as an inventory module under ConfigurationInventory modules.

リモートモジュールと同様に、これらのモジュールは、設定(Configuration)インベントリモジュール(Inventory modules) でインベントリモジュールとして追加する必要があります。

ローカルモジュールの作成

In order to create a local module, go to ConfigurationInventory modules where all inventory modules created so far are listed. Create all modules to be defined within the agent setup. The OS assigned to the console agent must match that of the created module.

ローカルモジュールを作成するには、設定(Configuration)インベントリモジュール(Inventory modules) へ行きます。作成済みの全インベントリモジュールが表示されます。エージェント設定内で定義されるすべてのモジュールを作成します。 コンソール上でエージェントに割り当てられた OS は、作成されたモジュールの OS と一致する必要があります。

新たなモジュールを作成するには、“作成(Create)” をクリックします。

The procedure is the same one used for the remote case, except for filling in the fields Interpreter and Code. In this example, for the OS field, you can define your own operating systems.

手順は、インタプリター(Interpreter) および コード(Code) フィールドを設定すること以外、リモートの場合と同じです。この例では、OS フィールドにOS を定義できます

設定が完了したら、“作成(Create)” をクリックします。

ソフトウエアエージェントによる Windows のインベントリモジュール

ソフトウェアエージェントでローカルインベントリを設定する方法を以下に示します。

1. Deploy the script collection (download it from Pandora FMS library) through the collections.

1. スクリプトコレクションを展開します。(Pandora FMS ライブラリ からダウンロードします)

バージョン 7 以降では、これらのプラグインは、デフォルトでエージェントインストール時に入りますが、設定ファイルでコメントアウトされています。

2. ローカルインベントリ用スクリプトを構成し、pandora_agent.conf ファイルの最後に設定を追加します。

バージョン 7 以降では、追加する必要はありません。エージェント設定ファイルのプラグイン実行のコメントを外すだけです。

Example for MS Windows®:

MS Windows® の例:

#module_begin
#module_plugin cscript.exe //B //t:20 "%PROGRAMFILES%\Pandora_Agent\util\cpuinfo.vbs"
#module_crontab * 12-15 * * 1
#module_end

#module_begin
#module_plugin cscript.exe //B //t:20 "%PROGRAMFILES%\Pandora_Agent\util\moboinfo.vbs"
#module_crontab * 12-15 * * 1
#module_end

#module_begin
#module_plugin cscript.exe //B //t:20 "%PROGRAMFILES%\Pandora_Agent\util\diskdrives.vbs"
#module_crontab * 12-15 * * 1
#module_end

#module_begin
#module_plugin cscript.exe //B //t:20 "%PROGRAMFILES%\Pandora_Agent\util\cdromdrives.vbs"
#module_crontab * 12-15 * * 1
#module_end

#module_begin
#module_plugin cscript.exe //B //t:20 "%PROGRAMFILES%\Pandora_Agent\util\videocardinfo.vbs"
#module_crontab * 12-15 * * 1
#module_end

#module_begin
#module_plugin cscript.exe //B //t:20 "%PROGRAMFILES%\Pandora_Agent\util\ifaces.vbs"
#module_crontab * 12-15 * * 1
#module_end

#module_begin
#module_plugin cscript.exe //B //t:20 "%PROGRAMFILES%\Pandora_Agent\util\monitors.vbs"
#module_crontab * 12-15 * * 1
#module_end

#module_begin
#module_plugin cscript.exe //B //t:20 "%PROGRAMFILES%\Pandora_Agent\util\printers.vbs"
#module_crontab * 12-15 * * 1
#module_end

#module_begin
#module_plugin cscript.exe //B //t:20 "%PROGRAMFILES%\Pandora_Agent\util\raminfo.vbs"
#module_crontab * 12-15 * * 1
#module_end

#module_begin
#module_plugin cscript.exe //B //t:20 "%PROGRAMFILES%\Pandora_Agent\util\software_installed.vbs"
#module_crontab * 12-15 * * 1
#module_end

#module_begin
#module_plugin cscript.exe //B //t:20 "%PROGRAMFILES%\Pandora_Agent\util\userslogged.vbs"
#module_crontab * 12-15 * * 1
#module_end

#module_begin
#module_plugin cscript.exe //B //t:20 "%PROGRAMFILES%\Pandora_Agent\util\productkey.vbs"
#module_crontab * 12-15 * * 1
#module_end

#module_begin
#module_plugin cscript.exe //B //t:20 "%PROGRAMFILES%\Pandora_Agent\util\productID.vbs"
#module_crontab * 12-15 * * 1
#module_end
ソフトウエアエージェントによる UNIX のインベントリモジュール

Unix のソフトウエアエージェントのモジュールは、マシンのソフトウエアおよびハードウエア情報を取得するためにローカルで定義されたプラグインを利用します。

モジュールの書式は次の通りです。

module_plugin inventory 1 cpu ram video nic hd cdrom software init_services filesystem users route

モジュールは、次のパラメータを一行で設定します。

  • モジュールの有効化
"module_plugin inventory" 1 cpu ram video nic hd cdrom software init_services filesystem users route
  • モジュールの実行間隔 (日単位) の設定。値が 0 の場合は、エージェントの実行時にインベントリ情報が送信されます。
module_plugin inventory " 1 " cpu ram video nic hd cdrom software init_services filesystem users route
  • 収集するインベントリの対象の設定
module_plugin inventory 1 " cpu ram video nic hd cdrom software init_services filesystem users route "

Windows エージェントと同様に、次の対象を設定できます。

  • CPU: CPU の情報を取得します。
  • cdrom: CDROM ドライブの情報を取得します。
  • video: ビデオカードの情報を取得します。
  • hd: ハードディスクドライブの情報を取得します。
  • nic:ネットワークインタフェースカードの情報を取得します。
  • patches: インストールされているパッチ情報を取得します。
  • software: インストールされているソフトウエア情報を取得します。
  • ram: メモリモジュールの情報を取得します。
  • filesystem: システムパーティション情報を取得します。
  • users: ユーザ情報を取得します。
  • init_services: initサービスの情報を取得します。
  • Route: ルーティングテーブル情報を取得します。

インベントリ情報を収集するプラグインは、'/etc/pandora/plugins' にあります。

利用可能なすべての情報を収集するためのプラグインを設定することも可能です。この例では、プラグインは、インベントリのすべての日々の情報を取得します。

# Plugin for inventory on the agent (Only Enterprise)
module_plugin inventory 1

インベントリモジュールを有効化するには、上記の設定をソフトウエアエージェントの 'pandora_agent.conf' に記述するだけです。この設定はローカルもしくはエージェントのリモート設定で行えます。

ローカルモジュールの割当

It is not necessary to activate the modules in the agents defined within the console. If the modules have been created in ConfigurationInventory modules, the OS matches and the execution is defined in the software agent configuration file, the collected data will appear directly on the ViewInventory section of the console agent.

エージェントで定義したモジュールはコンソールで有効化する必要はありません。設定(Configuration)インベントリモジュール(Inventory modules) をクリックしてモジュールが作成され、ソフトウエアエージェントに設定され、OS が一致すればコンソール上のエージェントの 表示(view)インベントリ(inventory) に現れます。

ローカルインベントリモジュールの作成(エージェントでの実行)

エージェントに “デフォルトで” 備わっているインベントリシステムでは、Unix および Windows のシステムでインベントリモジュールを簡単に作成することができます(リモートモジュールよりも簡単です)。次の構造の XML を生成するスクリプトを作成します。

<inventory>
<inventory_module>
<name>INVENTORY_MODULE_NAME</name>
<type>generic_data_string</type>
<datalist>
    <data>DATA1;DATA2;DATA3....</data>
</datalist>
</inventory_module>
</inventory>

ここで、“INVENTORY_MODULE_NAME” には、pandora で設定したモジュール名と同じものを記載します。また、DATA1;DATA2… には、取得したいデータを記載します。

ARP テーブル、IPアドレス、ネットワークインタフェース名を取得したいと仮定します(前掲のリモートインベントリモジュールの例も参照ください)。これは、基本的に arp -a の出力結果で、若干修正を加えています。

ここでは、Windows で実現することを考えます。小さなスクリプトが必要で、次のようなものを “C:\tmp\windows_arp_inventory.bat” として保存します。

@echo off
echo ^<inventory^>
echo ^<inventory_module^>
echo ^<name^>ARP_Table^</name^>
echo ^<type^>generic_data_string^</type^>
echo ^<datalist^>
arp -a | sort | grep "[0-9]"  | grep -v ":" | gawk "{ print \"^<data^>\" $1\";\"$2\";\"$3 \"^</data^>\" }"
echo ^</datalist^>
echo ^</inventory_module^>
echo ^</inventory^>

ここで、pandora_agent.conf を修正し、次の行を加える必要があります。

module_plugin cmd.exe /C C:\tmp\windows_arp_inventory.bat

このスクリプトは、5分ごとに実行されます(デフォルトのエージェント実行間隔)。任意の X 単位時間ごとに実行したい場合は、そのロジックをスクリプト内に実装するか、指定時間モニタリング を利用する必要があります。

ローカルスクリプトの実行でインベントリ情報を保存するには、コンソールに定義されたインベントリモジュールがあり、OS、モジュール名、および保存するデータを “;” で区切って指定する必要があります。 Pandora FMS エージェントを再起動する前に、Pandora FMS でインベントリモジュールを作成して、変更を継承することを忘れないでください。

これは、ローカルモジュールとして動作することに注意してください。“インタープリター(Interpreter)“および、”コード(Code)” フィールドには何も入力せず、OS フィールドを指定しています。

結果として、Linux でのリモートモジュールと同じように、情報を取得できます。

There are a lot more local and remote inventory modules available for download within the Pandora FMS Module Library. You may also easily develop your own, as seen throughout this chapter.

Pandora FMS モジュールライブラリ には、リモートおよびローカルの多くのインベントリモジュールがあります。また、この章で示したように、自分でも簡単に開発することができます。

ローカルまたはリモートでシステムから収集されたインベントリデータは、エージェントもしくはコンソールのインベントリメニューから参照することができます。

インベントリメニューでのインベントリデータ表示

'モニタリング(Monitoring)' → 'インベントリ(Inventory)' をクリックすることにより、エージェントのインベントリデータの参照、検索、データの CSV へのエクスポートができます。

検索に使うフィールドは次の通りです。

  • グループ(Group): フィルタしたいエージェントグループを選択します。ユーザは、"すべて" グループ に属していない場合、自身が属するグループのみ参照することができます。
  • モジュール(Module): フィルタしたいインベントリモジュールを選択します。
  • エージェント(Agent): フィルタしたいエージェント名を入力します。
  • 検索(Search): すべてのインベントリフィールドで検索したいテキストを入力します。

検索オプション内で 'すべて' を選択し、'検索' をクリックすることにより、インベントリ情報があるすべてのモジュールエージェントを表示することもできます。

または、モジュールを選択して '検索' をクリックすることにより、インベントリを持つすべてのエージェントの特定のモジュールを表示できます。

インベントリの日付変更

インベントリエージェントの詳細表示では、選択メニューから特定のインベントリレポートの日付を選択できます。

日付が欠落している場合は、最後のインベントリ実行に関するデータの変更が原因である可能性があります。Pandora FMS は、前回の実行と比較して変更があった場合にのみインベントリデータを保存しているためです。

インベントリデータの CSV エクスポート

From Monitoring > Inventory it is possible to export inventory data which are the result of a filtering to a CSV file.

モニタリング(Monitoring) > インベントリ(Inventory) をクリックすると、フィルタリングしたあとのインベントリデータを CSV ファイルへエクスポートすることができます。

フィルタを選択し、“CSV へのエクスポート(Export CSV)” をクリックします。

セミコロンで分割されたインベントリデータが書かれたファイルが生成されます。

インベントリ差分

ブロックモード

Pandora FMS バージョン 5.1 から、インベントリ情報は差分が解りやすいように 2つのカラムで表示できるようになりました。 ブロックモードでは、モジュールの全情報を、サーバのパッケージのように個別に一覧するのではなく、ひとかたまりでレポートするのに利用します。一行一エントリーで処理するのではなく、全体レポートを一つとして処理します。

ブロックモードは、リモートまたはローカルインベントリモジュールを定義するときに設定されます。

ブロックモードが有効なモジュールがある場合、分割されたビューで見ることができます(変更を視覚的に見るため):

2カラム表示では、あるインベントリのバージョンと他のバージョンの差分を表示します。日付を設定することもできます。

インベントリモジュールの変更が検出されるたびに、新しいイベントが生成されることに注意してください。

Version 751 NG or later. (Dec/2020)

バージョン 751 (2020年12月) 以上

Enterprise versionInventory alerts help launch specific alerts on the inventory content of an agent group. Similarly to SNMP alerts or event alerts, they are not applied agent by agent but rather they are global, in this case, they are applied by groups.

Enterprise 版インベントリアラートは、エージェントグループのインベントリコンテンツに関して特定のアラートを発報するのに役立ちます。SNMPアラートやイベントアラートと同様に、エージェントごとに適用されるのではなく、グローバルに適用されます。この場合、グループごとに適用されます。

これを設定するには、アラート(Alerts) → インベントリアラート(Inventory alerts) へ行きます。

Inventory alerts have fields similar to other alerts such as name, description, time threshold and action, as indicated in Pandora FMS alert chapter. We will focus on what makes them different.

インベントリアラートには、名前、説明、時間しきい値 、アクションなど、Pandora FMS アラートと似たフィールドがあります。そのため、他のアラートとの違いに焦点を当てます。

  • The group in this case works as alert term, so alerts will be evaluated for any data that comes from an agent of said group.
  • These alerts also have the option of disabling event to not generate an alert event when the alert is triggered. It is useful since it is possible that with the inventory alert application many alerts might get triggered with a single execution.
  • グループ はアラート条件として機能するため、アラートは、そのグループのエージェントからのデータについて評価されます。
  • これらのアラートには、アラートが発報されたときにアラートイベントを生成しないようにするための イベントの無効化 オプションもあります。インベントリアラートアプリケーションでは、1回の実行で多くのアラートが発報されることがあるため便利です。

アラート発報条件

インベントリアラートは、単純一致、ホワイトリスト、ブラックリストの 3つの異なるモードで適用されます。

文字列マッチ

特定のインベントリモジュール内の特定のテキスト文字列(“software” など)を受信すると、設定されたアクションが実行されます。インベントリモジュールには 動的フィールド があることに注意する必要があります。 例えば ソフトウェアインベントリモジュールには、名前、バージョン、および説明のフィールドがあります。

これにより、特定のパッケージまたは特定のバージョンのパッケージを探すのに最適な、3つの動的フィールドのいずれかにアラートを設定できます。

すべてのインベントリモジュールフィールドが表示されます。これらのフィールドに正規表現を追加して、より複雑な検索を行うことができます。フィールドが空の場合、.* として扱われます(任意の値に 一致 します)。

制限リスト

In this case, specify just one field of the inventory module type, and specify a string list (one by line), so that if the agent contains an element from that list, the alert will fire. Think for example, in terms of software, that this restricted list (Black list) is a software package list that must NOT be installed in the machine. If there is any from said list, the alert will fire.

この場合、インベントリモジュールタイプのフィールドを 1つだけ指定し、文字列リスト(1行ずつ)を指定して、エージェントにそのリストの要素が含まれている場合にアラートが発生するようにします。 たとえば、ソフトウェアであれば、この制限リスト(ブラックリスト)はマシンにインストールしてはならないソフトウェアパッケージリストであると考えてください。 上記のリストにあるものがある場合、アラートが発生します。

許可リスト

Similar to the previous case. Specify a list of elements, for one of the inventory fields, except this time, the inventory module value must be on one of the elements of the list, otherwise the alert will fire.

前述のものと似ています。 インベントリフィールドの 1つに要素のリストを指定します。ただし、今回は、インベントリモジュールの値がリストの要素の 1つにある必要があります。そうでない場合、アラートが発生します。

インベントリアラートの利用

Enterprise versionThis feature is perfect for detecting device vulnerable versions, non-authorized users in machines or non-authorized software in computers.

Enterprise 版この機能は、デバイスの脆弱なバージョン、マシン内の許可されていないユーザ、またはコンピューター内の許可されていないソフトウェアを検出するのに最適です。

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

  • ja/documentation/04_using/04_inventory.txt
  • 最終更新: 2023/05/24 04:50
  • by junichi