2 Windows Zabbixエージェント
概要
Windows Zabbix エージェントのアイテムは、以下の 2 つのリストに表示されます。
- 共有アイテム - UNIX Zabbix エージェントと共有されるアイテムキー
- Windows 固有アイテム - Windows でのみサポートされるアイテムキー
Windows 版 Zabbix エージェントでサポートされているすべてのアイテムキーは、新世代の Zabbix エージェント 2 でもサポートされていることに注意してください。エージェント 2 でのみ使用できる 追加のアイテムキー を参照してください。
Windows アイテムの最小権限 も参照してください。
Shared items
The table below lists Zabbix agent items that are supported on Windows and are shared with the UNIX Zabbix agent:
- The item key is a link to full details of the UNIX Zabbix agent item
- Windows-relevant item comments are included
| Item key | Description | Item group |
|---|---|---|
| log | The monitoring of a log file. This item is not supported for Windows Event Log.<br>The persistent_dir parameter is not supported on Windows. |
Log monitoring |
| log.count | The count of matched lines in a monitored log file. This item is not supported for Windows Event Log.<br>The persistent_dir parameter is not supported on Windows. |
|
| logrt | The monitoring of a log file that is rotated. This item is not supported for Windows Event Log.<br>The persistent_dir parameter is not supported on Windows. |
|
| logrt.count | The count of matched lines in a monitored log file that is rotated. This item is not supported for Windows Event Log.<br>The persistent_dir parameter is not supported on Windows. |
|
| modbus.get | Reads Modbus data. | Modbus |
| net.dns | Checks if the DNS service is up.<br>The ip, timeout and count parameters are ignored on Windows unless using Zabbix agent 2. |
Network |
| net.dns.perf | Checks the performance of a DNS service.<br>The ip, timeout and count parameters are ignored on Windows unless using Zabbix agent 2. |
|
| net.dns.record | Performs a DNS query.<br>The ip, timeout and count parameters are ignored on Windows unless using Zabbix agent 2. |
|
| net.if.discovery | The list of network interfaces.<br>Some Windows versions (for example, Server 2008) might require the latest updates installed to support non-ASCII characters in interface names. | |
| net.if.in | The incoming traffic statistics on a network interface.<br>On Windows, the item gets values from 64-bit counters if available. 64-bit interface statistic counters were introduced in Windows Vista and Windows Server 2008. If 64-bit counters are not available, the agent uses 32-bit counters.<br>Multi-byte interface names on Windows are supported.<br>You may obtain network interface descriptions on Windows with net.if.discovery or net.if.list items. | |
| net.if.out | The outgoing traffic statistics on a network interface.<br>On Windows, the item gets values from 64-bit counters if available. 64-bit interface statistic counters were introduced in Windows Vista and Windows Server 2008. If 64-bit counters are not available, the agent uses 32-bit counters.<br>Multi-byte interface names on Windows are supported.<br>You may obtain network interface descriptions on Windows with net.if.discovery or net.if.list items. | |
| net.if.total | The sum of incoming and outgoing traffic statistics on a network interface.<br>On Windows, the item gets values from 64-bit counters if available. 64-bit interface statistic counters were introduced in Windows Vista and Windows Server 2008. If 64-bit counters are not available, the agent uses 32-bit counters.<br>You may obtain network interface descriptions on Windows with net.if.discovery or net.if.list items. | |
| net.tcp.listen | Checks if this TCP port is in LISTEN state. | |
| net.tcp.port | Checks if it is possible to make a TCP connection to the specified port. | |
| net.tcp.service | Checks if a service is running and accepting TCP connections.<br>Checking of LDAP and HTTPS on Windows is only supported by Zabbix agent 2. | |
| net.tcp.service.perf | Checks the performance of a TCP service.<br>Checking of LDAP and HTTPS on Windows is only supported by Zabbix agent 2. | |
| net.tcp.socket.count | Returns the number of TCP sockets that match parameters.<br>This item is supported on Linux by Zabbix agent, but on Windows it is supported only by Zabbix agent 2 on 64-bit Windows. | |
| net.udp.service | Checks if a service is running and responding to UDP requests. | |
| net.udp.service.perf | Checks the performance of a UDP service. | |
| net.udp.socket.count | Returns the number of UDP sockets that match parameters.<br>This item is supported on Linux by Zabbix agent, but on Windows it is supported only by Zabbix agent 2 on 64-bit Windows. | |
| proc.get | The list of OS processes and their parameters.<br>The cmdline parameter is not supported on Windows. |
Processes |
| proc.num | The number of processes.<br>On Windows, only the name and user parameters are supported. |
|
| system.cpu.discovery | The list of detected CPUs/CPU cores. | System |
| system.cpu.load | The CPU load.<br>When a collector process is started on Zabbix agent, the following performance counters are initialized and later used for this item: \System\Processor Queue Length |
|
| system.cpu.num | The number of CPUs. | |
| system.cpu.util | The CPU utilization percentage.<br>The value is acquired using the Processor Time performance counter. Note that since Windows 8 its Task Manager shows CPU utilization based on the Processor Utility performance counter, while in previous versions it was the Processor Time counter (see more details).<br>system is the only type parameter supported on Windows. |
|
| system.hostname | The system host name.<br>The value is acquired by either GetComputerName() (for netbios), GetComputerNameExA() (for fqdn), or gethostname() (for host) functions on Windows.<br>See also a more detailed description. | |
| system.localtime | The system time. | |
| system.run | Run the specified command on the host. | |
| system.sw.arch | The software architecture information. | |
| system.swap.size | The swap space size in bytes or in percentage from total.<br>The pused type parameter is supported on Linux by Zabbix agent, but on Windows it is supported only by Zabbix agent 2.<br>Note that this key might report incorrect swap space size/percentage on virtualized (VMware ESXi, VirtualBox) Windows platforms. In this case you may use the perf_counter[\700(_Total)\702] key to obtain correct swap space percentage. |
|
| system.uname | Identification of the system.<br>On Windows the value for this item is obtained from Win32_OperatingSystem and Win32_Processor WMI classes. The OS name (including edition) might be translated to the user's display language. On some versions of Windows it contains trademark symbols and extra spaces. | |
| system.uptime | The system uptime in seconds. | |
| vfs.dir.count | The directory entry count.<br>On Windows, directory symlinks are skipped and hard links are counted only once. | Virtual file systems |
| vfs.dir.get | The directory entry list.<br>On Windows, directory symlinks are skipped and hard links are counted only once. | |
| vfs.dir.size | The directory size.<br>On Windows any symlink is skipped and hard links are taken into account only once. | |
| vfs.file.cksum | The file checksum, calculated by the UNIX cksum algorithm. | |
| vfs.file.contents | Retrieving the contents of a file. | |
| vfs.file.exists | Checks if the file exists.<br>On Windows the double quotes have to be backslash '\' escaped and the whole item key enclosed in double quotes when using the command line utility for calling zabbix_get.exe or agent2.<br>Note that the item may turn unsupported on Windows if a directory is searched within a non-existing directory, e.g. vfs.file.exists[C:\no\dir,dir] (where 'no' does not exist). |
|
| vfs.file.get | Returns information about a file.<br>Supported file types on Windows: regular file, directory, symbolic link | |
| vfs.file.md5sum | The MD5 checksum of file. | |
| vfs.file.owner | Retrieves the owner of a file. | |
| vfs.file.regexp | Retrieve a string in the file. | |
| vfs.file.regmatch | Find a string in the file. | |
| vfs.file.size | The file size. | |
| vfs.file.time | The file time information.<br>On Windows XP vfs.file.time[file,change] may be equal to vfs.file.time[file,access]. |
|
| vfs.fs.discovery | The list of mounted filesystems with their type and mount options.<br>The {#FSLABEL} macro is supported on Windows. | |
| vfs.fs.get | The list of mounted filesystems with their type, available disk space, inode statistics and mount options.<br>The {#FSLABEL} macro is supported on Windows. | |
| vfs.fs.size | The disk space in bytes or in percentage from total. | |
| vm.memory.size | The memory size in bytes or in percentage from total. | Virtual memory |
| web.page.get | Get the content of a web page. | Web monitoring |
| web.page.perf | The loading time of a full web page. | |
| web.page.regexp | Find a string on the web page. | |
| agent.hostmetadata | The agent host metadata. | Zabbix |
| agent.hostname | The agent host name. | |
| agent.ping | The agent availability check. | |
| agent.variant | The variant of Zabbix agent (Zabbix agent or Zabbix agent 2). | |
| agent.version | The version of Zabbix agent. | |
| zabbix.stats | Returns a set of Zabbix server or proxy internal metrics remotely. | |
| zabbix.stats | Returns the number of monitored items in the queue which are delayed on Zabbix server or proxy remotely. |
Windows 固有のアイテム
この表は、Windows Zabbix エージェントでのみサポートされているアイテムキーの詳細を示しています。
Windows 固有のアイテムは、類似のエージェントアイテムとほぼ対応する場合があります。例えば、Windows でサポートされている proc_info は、Windows ではサポートされていない proc.mem アイテムとほぼ対応しています。
アイテムキーは、アイテムキーの詳細へのリンクです。
| アイテムキー | 説明 | アイテムグループ |
|---|---|---|
| eventlog | Windows イベントログの監視 | ログ監視 |
| eventlog.count | Windows イベントログの行数 | |
| net.if.list | ネットワークインターフェースリスト(インターフェースの種類、ステータス、IPv4 アドレス、説明を含む) | ネットワーク |
| perf_counter | 任意の Windows パフォーマンス カウンターの値 | パフォーマンス カウンター |
| perf_counter_en | 任意の Windows パフォーマンス カウンターの値(英語) | |
| perf_instance.discovery | Windows パフォーマンス カウンターのオブジェクト インスタンスのリスト | |
| perf_instance_en.discovery | 英語のオブジェクト名を使用して検出された Windows パフォーマンス カウンターのオブジェクト インスタンスのリスト | |
| proc_info | 特定のプロセスに関するさまざまな情報 | プロセス |
| registry.data | Windows レジストリ キー内の指定された値名のデータを返します | レジストリ |
| registry.get | 指定されたキーにある Windows レジストリ値またはキーのリスト | |
| service.discovery | Windows サービスのリスト | サービス |
| service.info | サービスに関する情報 | |
| services | サービスのリスト | |
| vm.vmemory.size | 仮想メモリのサイズ(バイト単位、または合計に対する割合) | 仮想メモリ |
| wmi.get | WMI クエリを実行し、最初に選択されたオブジェクトを返します | WMI |
| wmi.getall | WMI クエリを実行し、応答全体を返します |
アイテムキーの詳細
山括弧のないパラメータは必須です。山括弧 < > でマークされたパラメータはオプションです。
eventlog[name,<regexp>,<severity>,<source>,<eventid>,<maxlines>,<mode>]
イベントログの監視
戻り値: Log
パラメーター:
- name - イベントログチャネルの名前 (イベントビューアーGUIでは「Log Name*」)
- regexp - 必要なパターンを表す正規表現 (大文字と小文字が区別されます)
- severity - 深刻度を表す正規表現 (大文字と小文字は区別されません)このパラメータは、以下の値に基づく正規表現を受け入れます:「Information」、「Warning」、「Error」、「Critical」、「Verbose」(Windows Vista以降で実行)
- source - ソースを表す正規表現(大文字と小文字は区別されません)
- eventid - イベントIDを表す正規表現(大文字と小文字は区別されます)
- maxlines - エージェントがZabbixサーバーまたはプロキシに送信する1秒あたりの最大新規行数。このパラメータは、zabbix_agentd.confの「MaxLinesPerSecond」の値を上書きします。
- mode - 指定可能な値:all(デフォルト)またはskip - 古いデータの処理をスキップします(新しく作成されたアイテムのみに影響します)
コメント:
- このアイテムは アクティブチェック として設定する必要があります。
- エージェントは「転送されたイベント」ログからイベントを送信できません。
- Windows Eventing 6.0 がサポートされています。
- このアイテムにログ以外の 情報の種類 を選択すると、ローカルタイム、ログの深刻度、およびソースが失われます。
- ログ監視 に関する追加情報も参照してください。
例:
eventlog[Application]
eventlog[Microsoft-Windows-Application-Experience/Program-Compatibility-Assistant]
eventlog[Security,,"Failure Audit",,^(529|680)$]
eventlog[System,,"Warning|Error"]
eventlog[System,,,,^1$]
eventlog[Windows PowerShell,,,,,,,skip]
eventlog[System,,,,@TWOSHORT] #ここでは、`TWOSHORT` というカスタム正規表現が参照されています (*Result is TRUE* 型として定義され、式自体は `^1$|^70$` です)
eventlog.count[name,<regexp>,<severity>,<source>,<eventid>,<maxproclines>,<mode>]
Windows イベントログの行数
戻り値: Integer
パラメーター:
- name - イベントログチャネルの名前 (イベントビューアー GUI では「ログ名」)
- regexp - 必要なパターンを表す正規表現 (大文字と小文字が区別されます)
- severity - 深刻度を表す正規表現 (大文字と小文字は区別されません)このパラメータには、以下の値に基づく正規表現を指定できます: 「Information」、「Warning」、「Error」、「Critical」、「Verbose」(Windows Vista以降で実行)
- source - ソースを表す正規表現(大文字と小文字は区別されません)
- eventid - イベントIDを表す正規表現(大文字と小文字は区別されます)
- maxproclines - エージェントが1秒あたりに分析する新規行の最大数(10000を超えることはできません)デフォルト値は、zabbix_agentd.conf の 10*'MaxLinesPerSecond' です。
- mode - 指定可能な値: all (デフォルト) または skip - 古いデータの処理をスキップします(新しく作成されたアイテムのみに影響します)
コメント:
- このアイテムは アクティブチェック として設定する必要があります。
- エージェントは「転送されたイベント」ログからイベントを送信できません。
- Windows Eventing 6.0 がサポートされています。
- このアイテムにログ以外の 情報の種類 を選択すると、ローカルタイム、ログの深刻度、およびソースが失われます。
- ログ監視 に関する追加情報も参照してください。
例:
eventlog.count[System,,"Warning|Error"]
eventlog.count[Windows PowerShell,,,,,,skip]
net.if.list
ネットワークインターフェースのリスト(インターフェースの種類、ステータス、IPv4 アドレス、説明が含まれます)
戻り値: Text
コメント:
- マルチバイトのインターフェース名がサポートされています。
- 無効なインターフェースはリストに表示されません。
- 一部のコンポーネントを有効化/無効化すると、Windows インターフェース名における順序が変更される場合があります。
- 一部の Windows バージョン(Server 2008 など)では、インターフェース名で非 ASCII 文字をサポートするために最新の更新プログラムのインストールが必要になる場合があります。
perf_counter[counter,<interval>]
任意の Windows パフォーマンスカウンタの値
戻り値: Integer、float、string、または text (リクエストによって異なります)
パラメーター:
- counter - カウンタへのパス
- interval - 平均値を格納する最後の N 秒間。
intervalは 1 秒から 900 秒 (900 秒を含む) の範囲で指定する必要があり、デフォルト値は 1 です。
コメント:
intervalは、CPU 使用率など、複数のサンプルを必要とするカウンタに使用されます。そのため、チェックは毎回、最後の "interval" 秒間の平均値を返します。- パフォーマンスモニターを使用して、使用可能なカウンタの一覧を取得できます。
- 参照: Windows パフォーマンスカウンタ
perf_counter_en[counter,<interval>]
任意の Windows パフォーマンスカウンタの値(英語)
戻り値: Integer、float、string、または text(リクエストによって異なります)
パラメーター:
- counter - カウンタへのパス(英語)
- interval - 平均値を保存する最後の N 秒間。
intervalは 1 秒から 900 秒(900 秒を含む)の範囲で指定する必要があり、デフォルト値は 1 です。
コメント:
intervalは、CPU 使用率など、複数のサンプルを必要とするカウンタに使用されます。そのため、チェックは毎回、最後の "interval" 秒間の平均値を返します。- この項目は Windows Server 2008/Vista 以降でのみサポートされます。
- 次のレジストリ キーを表示すると、英語の文字列のリストを見つけることができます:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\009
perf_instance.discovery[object]
Windows パフォーマンスカウンターのオブジェクトインスタンスのリスト低レベル検出 に使用されます。
戻り値: JSON オブジェクト
パラメーター:
- object - オブジェクト名(ローカライズ済み)
perf_instance_en.discovery[object]
Windowsパフォーマンスカウンターのオブジェクトインスタンスのリスト。英語のオブジェクト名を使用して検出されます。低レベル検出に使用されます。
戻り値: JSONオブジェクト
パラメーター:
- object - オブジェクト名(英語)
proc_info[プロセス,<属性>,<タイプ>]
特定のプロセスに関するさまざまな情報
戻り値: Float
パラメータ:
- process - プロセス名
- attribute - 要求されたプロセス属性
- type - 表現タイプ(同じ名前のプロセスが複数存在する場合に意味を持ちます)
コメント:
- 以下の「属性」がサポートされています:
vmsize (デフォルト) - プロセスの仮想メモリサイズ(KB)
wkset - プロセスのワーキングセットサイズ(プロセスが使用する物理メモリ量)(KB)
pf - ページフォールト数
ktime - プロセスのカーネル時間(ミリ秒)
utime - プロセスのユーザー時間(ミリ秒)
io_read_b - I/O操作中にプロセスが読み取ったバイト数
io_read_op - プロセスが実行した読み取り操作の数
io_write_b - I/O操作中にプロセスが書き込んだバイト数操作
io_write_op - プロセスによって実行された書き込み操作の数
io_other_b - 読み取りおよび書き込み操作以外の操作中にプロセスによって転送されたバイト数
io_other_op - 読み取りおよび書き込み操作以外の、プロセスによって実行された I/O 操作の数
gdiobj - プロセスによって使用される GDI オブジェクトの数
userobj - プロセスによって使用される USER オブジェクトの数 - 有効な
typesは次のとおりです:
avg (デフォルト) - <process> という名前のすべてのプロセスの平均値
min - <process> という名前のすべてのプロセスの中での最小値
max - <process> という名前のすべてのプロセスの中での最大値
sum - <process> という名前のすべてのプロセスの値の合計 - 64ビットシステムでは、この項目を正しく動作させるには64ビット版のZabbixエージェントが必要です。
例:
proc_info[iexplore.exe,wkset,sum] #すべてのInternet Explorerプロセスが使用している物理メモリの量を取得します。
proc_info[iexplore.exe,pf,avg] #Internet Explorerプロセスのページフォールトの平均数を取得します。
registry.data[key,<値名>]
Windowsレジストリキー内の指定された値名のデータを返します。
戻り値: Integer、string、またはtext (値の型によって異なります)
パラメーター:
- key - ルートキーを含むレジストリキー。ルートの省略形 (例: HKLM) も使用できます。
- value name - キー内のレジストリ値名 (デフォルトは空文字列 "")。値名が指定されていない場合は、デフォルト値が返されます。
コメント:
- サポートされているルートの略語:
HKCR - HKEY_CLASSES_ROOT
HKCC - HKEY_CURRENT_CONFIG
HKCU - HKEY_CURRENT_USER
HKCULS - HKEY_CURRENT_USER_LOCAL_SETTINGS
HKLM - HKEY_LOCAL_MACHINE
HKPD - HKEY_PERFORMANCE_DATA
HKPN - HKEY_PERFORMANCE_NLSTEXT
HKPT - HKEY_PERFORMANCE_TEXT
HKU - HKEY_USERS - スペースを含むキーは二重引用符で囲む必要があります。
例:
registry.data["HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting"] # このキーのデフォルト値のデータを返します。
registry.data["HKLM\SOFTWARE\Microsoft\Windows\Windows Error Reporting","EnableZip"] # このキーの「Enable Zip」という値のデータを返します。
registry.get[key,<mode>,<name regexp>]
指定されたキーにある Windows レジストリ値またはキーのリスト
戻り値: JSON オブジェクト
パラメーター:
- key - ルートキーを含むレジストリキー。ルートの略語 (例: HKLM) を使用できます (略語の全リストについては、registry.data[] のコメントを参照してください)
- mode - 指定可能な値:
values (デフォルト) または keys - name regexp - 正規表現に一致する名前の値のみを検出します (デフォルト: すべての値を検出します)
modeとして values を指定した場合のみ使用できます。
スペースを含むキーは二重引用符で囲む必要があります。
例:
registry.get[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall,values,"^DisplayName|DisplayVersion$"] # このキー内の「DisplayName」または「DisplayValue」という名前の値のデータを返します。JSONには、キー、最後のサブキー、値の名前、値の型、および値のデータの詳細が含まれます。
registry.get[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall,values] # このキー内のすべての値のデータを返します。JSONには、キー、最後のサブキー、値の名前、値の型、および値のデータの詳細が含まれます。
registry.get[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall,keys] # このキーのすべてのサブキーを返します。JSONには、キーと最後のサブキーの詳細が含まれます。
service.discovery
Windows サービスのリスト。低レベル検出 に使用されます。
戻り値: JSON オブジェクト
service.info[service,<param>]
サービスに関する情報
戻り値: Integer - param として state、startup を指定。 String - param として displayname、path、user を指定。 テキスト - param を description として使用します。
state の場合: 0 - 実行中、1 - 一時停止中、2 - 開始保留中、3 - 一時停止保留中、4 - 続行保留中、5 - 停止保留中、6 - 停止中、7 - 不明、255 - そのようなサービスはありません。
startup の場合: 0 - 自動、1 - 自動遅延、2 - 手動、3 - 無効、4 - 不明、5 - 自動トリガー開始、6 - 自動遅延トリガー開始、7 - 手動トリガー開始
パラメーター:
- service - 実際のサービス名、または MMC サービス スナップインに表示される表示名
- param - state (既定値)、displayname、path、user、startup、または description
コメント:
service.info[service,state]やservice.info[service]のような項目は同じ情報を返します。paramが state の場合のみ、この項目は存在しないサービスに対して値 (255) を返します。
例:
service.info[SNMPTRAP] - SNMPTRAP サービスの状態
service.info[SNMP Trap] - 同じサービスの状態ですが、表示名が指定されています。
service.info[EventLog,startup] - EventLog サービスのスタートアップの種類
services[<type>,<state>,<exclude>]
サービスの一覧
戻り値: 0 - 空の場合。Text - 改行で区切られたサービスの一覧。
パラメーター:
- type - all (デフォルト)、automatic、manual、または disabled
- state - all (デフォルト)、stopped、started、start_pending、stop_pending、running、continue_pending、pause_pending、または paused
- exclude - 結果から除外するサービス。除外するサービスは、スペースを入れずに、二重引用符で囲み、カンマで区切って列挙する必要があります。
例:
services[,started] # 開始済みのサービスの一覧を返します。
services[automatic, stopped] # 実行されるべき停止中のサービスのリストを返します。
services[automatic, stopped, "service1,service2,service3"] # 実行されるべき停止中のサービスのリストを返します。ただし、"service1"、"service2"、"service3" という名前のサービスは除きます。
vm.vmemory.size[<type>]
仮想メモリのサイズ(バイト単位、または合計に対する割合)
戻り値:Integer(バイト単位)、float(割合)
パラメーター:
- type - 可能な値:available(使用可能な仮想メモリ)、pavailable(使用可能な仮想メモリ、割合)、pused(使用済み仮想メモリ、割合)、total(合計仮想メモリ、デフォルト)、またはused(使用済み仮想メモリ)
コメント:
- 仮想メモリ統計の監視は、以下の情報に基づきます。
- Windows 上の合計仮想メモリ(物理メモリの合計サイズ + ページファイルサイズ)
- Zabbix エージェントがコミットできる最大メモリ量
- システムまたは Zabbix エージェントの現在のコミットメモリ制限(どちらか小さい方)
例:
vm.vmemory.size[pavailable] # 利用可能な仮想メモリをパーセンテージで返す。
wmi.get[<namespace>,<query>]
WMIクエリを実行し、選択された最初のオブジェクトを返します。
戻り値: Integer、float、string、またはtext (リクエストによって異なります)
パラメーター:
- namespace - WMI名前空間
- query - 単一のオブジェクトを返すWMIクエリ
WMIクエリはWQLを使用して実行されます。
例:
wmi.get[root\cimv2,select status from Win32_DiskDrive where Name like '%PHYSICALDRIVE0%'] #最初の物理ディスクのステータスを返します。
wmi.getall[<namespace>,<query>]
WMIクエリを実行し、レスポンス全体を返します。低レベル検出に使用できます。
戻り値: JSONオブジェクト
パラメーター:
- namespace - WMI名前空間
- query - WMIクエリ
コメント:
- WMIクエリはWQLを使用して実行されます。
- JSONPath preprocessingを使用すると、返されるJSON内のより具体的な値を指定できます。
例:
wmi.getall[root\cimv2,select * from Win32_DiskDrive where Name like '%PHYSICALDRIVE%'] # 物理ディスクのステータス情報を返します。
Windows サービスの監視
このチュートリアルでは、Windows サービスの監視を設定するためのステップバイステップの手順を説明します。 Zabbix server と agent が設定され、動作していることを前提としています。
Step 1
サービス名を取得します。
この名前は、MMCサービススナップインを開き、サービスのプロパティを表示することで取得できます。
General タブに 'Service name' というフィールドがあります。
この後の値は、監視のための項目を設定する際に使用する名前です。
例えば、"workstation" サービスを監視する場合、次のようになります。
lanmanworkstation
Step 2
サービスを監視するための item の設定 [Configure an item] (/manual/config/items/item)を行います。
service.info[service,<param>]は、特定のサービスの情報を取得する item です。
必要な情報に応じて、次の値を受け付ける param オプションを指定します:
displayname、state、path、user、startup または description
service.info[service] の paramが指定されない場合、デフォルト値はstateです。
戻り値のタイプは選択された param に依存します:
state と startup の場合は整数値、displayname, path, user は文字列、description はテキスト。
説明(description)には文字列を指定します。
例
- Key: service.info[lanmanworkstation]
- Type of information:Numeric (符号なし)
- Show value: Windows service state 値のマッピングを選択します。
Windows service state と Windows service startup type の2つのバリューマップがあり、
フロントエンドで数値からテキスト表現にマッピングすることができます。
Windowsサービスの検出
Low-level discoveryは、コンピュータ上のさまざまなエンティティに対して、
item 、trigger 、およびグラフを自動的に作成する方法を提供します。
Zabbix は自動的にマシンの Windows サービスの監視を開始します。
サービス名を正確に把握したり、各サービス用の item を手動で作成する必要はありません。
フィルタを使用することで、監視したいサービスのみに対して実際の item、trigger 、グラフを生成することができます。