Windows Zabbix エージェントのアイテムは、以下の 2 つのリストに表示されます。
Windows 版 Zabbix エージェントでサポートされているすべてのアイテムキーは、新世代の Zabbix エージェント 2 でもサポートされていることに注意してください。エージェント 2 でのみ使用できる 追加のアイテムキー を参照してください。
Windows アイテムの最小権限 も参照してください。
The table below lists Zabbix agent items that are supported on Windows:
Key | Comments |
---|---|
agent.hostmetadata | |
agent.hostname | |
agent.ping | |
agent.variant | |
agent.version | |
log[file,<regexp>,<encoding>,<maxlines>,<mode>,<output>,<maxdelay>,<options>] | This item is not supported for Windows Event Log. The persistent_dir parameter is not supported on Windows. |
log.count[file,<regexp>,<encoding>,<maxproclines>,<mode>,<maxdelay>,<options>] | This item is not supported for Windows Event Log. The persistent_dir parameter is not supported on Windows. |
logrt[file_regexp,<regexp>,<encoding>,<maxlines>,<mode>,<output>,<maxdelay>,<options>] | This item is not supported for Windows Event Log. The persistent_dir parameter is not supported on Windows. |
logrt.count[file_regexp,<regexp>,<encoding>,<maxproclines>,<mode>,<maxdelay>,<options>] | This item is not supported for Windows Event Log. The persistent_dir parameter is not supported on Windows. |
modbus.get[endpoint,<slave id>,<function>,<address>,<count>,<type>,<endianness>,<offset>] | |
net.dns[<ip>,name,<type>,<timeout>,<count>,<protocol>] | The ip , timeout and count parameters are ignored on Windows. |
net.dns.record[<ip>,name,<type>,<timeout>,<count>,<protocol>] | The ip , timeout and count parameters are ignored on Windows. |
net.if.discovery | Some Windows versions (for example, Server 2008) might require the latest updates installed to support non-ASCII characters in interface names. |
net.if.in[if,<mode>] | 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. Multi-byte interface names on Windows are supported. You may obtain network interface descriptions on Windows with net.if.discovery or net.if.list items. |
net.if.out[if,<mode>] | 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. Multi-byte interface names on Windows are supported. You may obtain network interface descriptions on Windows with net.if.discovery or net.if.list items. |
net.if.total[if,<mode>] | 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. You may obtain network interface descriptions on Windows with net.if.discovery or net.if.list items. |
net.tcp.listen[port] | |
net.tcp.port[<ip>,port] | |
net.tcp.service[service,<ip>,<port>] | Checking of LDAP and HTTPS on Windows is only supported by Zabbix agent 2. |
net.tcp.service.perf[service,<ip>,<port>] | Checking of LDAP and HTTPS on Windows is only supported by Zabbix agent 2. |
net.tcp.socket.count[<laddr>,<lport>,<raddr>,<rport>,<state>] | 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[service,<ip>,<port>] | |
net.udp.service.perf[service,<ip>,<port>] | |
net.udp.socket.count[<laddr>,<lport>,<raddr>,<rport>,<state>] | 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.num[<name>,<user>] | On Windows, only the name and user parameters are supported. |
system.cpu.discovery | |
system.cpu.load[<cpu>,<mode>] | |
system.cpu.num[<type>] | |
system.cpu.util[<cpu>,<type>,<mode>] | system is the only type parameter supported on Windows. |
system.hostname[<type>, <transform>] | The value is acquired by either GetComputerName() (for netbios) or gethostname() (for host) functions on Windows. Examples of returned values: => system.hostname → WIN-SERV2008-I6 => system.hostname[host] → Win-Serv2008-I6LonG => system.hostname[host,lower] → win-serv2008-i6long See also a more detailed description. |
system.localtime[<type>] | |
system.run[command,<mode>] | |
system.sw.arch | |
system.swap.size[<device>,<type>] | The pused type parameter is supported on Linux by Zabbix agent, but on Windows it is supported only by Zabbix agent 2.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 | Example of returned value: Windows ZABBIX-WIN 6.0.6001 Microsoft® Windows Server® 2008 Standard Service Pack 1 x86 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 | |
vfs.dir.count[dir,<regex_incl>,<regex_excl>,<types_incl>,<types_excl>,<max_depth>,<min_size>,<max_size>,<min_age>,<max_age>,<regex_excl_dir>] | On Windows, directory symlinks are skipped and hard links are counted only once. Example: ⇒ vfs.dir.count["C:\Users\ADMINI~1\AppData\Local\Temp"] - monitors the number of files in temporary directory |
vfs.dir.get[dir,<regex_incl>,<regex_excl>,<types_incl>,<types_excl>,<max_depth>,<min_size>,<max_size>,<min_age>,<max_age>,<regex_excl_dir>] | On Windows, directory symlinks are skipped and hard links are counted only once. Example: ⇒ vfs.dir.get["C:\Users\ADMINI~1\AppData\Local\Temp"] - retrieves the file list in temporary directory |
vfs.dir.size[dir,<regex_incl>,<regex_excl>,<mode>,<max_depth>,<regex_excl_dir>] | On Windows any symlink is skipped and hard links are taken into account only once. |
vfs.file.cksum[file,<mode>] | |
vfs.file.contents[file,<encoding>] | |
vfs.file.exists[file,<types_incl>,<types_excl>] | 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. 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[file] | Supported file types on Windows: regular file, directory, symbolic link |
vfs.file.md5sum[file] | |
vfs.file.owner[file,<ownertype>,<resulttype>] | |
vfs.file.regexp[,regexp,<encoding>,<start line>,<end line>,<output>] | |
vfs.file.regmatch[file,regexp,<encoding>,<start line>,<end line>] | |
vfs.file.size[file,<mode>] | |
vfs.file.time[file,<mode>] | On Windows XP vfs.file.time[file,change] may be equal to vfs.file.time[file,access]. |
vfs.fs.discovery | The {#FSLABEL} macro is supported on Windows since Zabbix 6.0. |
vfs.fs.get | The {#FSLABEL} macro is supported on Windows since Zabbix 6.0. |
vfs.fs.size[fs,<mode>] | |
vm.memory.size[<mode>] | |
web.page.get[host,<path>,<port>] | |
web.page.perf[host,<path>,<port>] | |
web.page.regexp[host,<path>,<port>,regexp,<length>,<output>] | |
zabbix.stats[<ip>,<port>] | |
zabbix.stats[<ip>,<port>,queue,<from>,<to>] |
この表は、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 クエリを実行し、応答全体を返します |
山括弧のないパラメータは必須です。山括弧 < > でマークされたパラメータはオプションです。
イベントログの監視
戻り値: Log
パラメーター:
コメント:
例:
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$` です)
Windows イベントログの行数
戻り値: Integer
パラメーター:
コメント:
例:
ネットワークインターフェースのリスト(インターフェースの種類、ステータス、IPv4 アドレス、説明が含まれます)
戻り値: Text
コメント:
任意の Windows パフォーマンスカウンタの値
戻り値: Integer、float、string、または text (リクエストによって異なります)
パラメーター:
interval
は 1 秒から 900 秒 (900 秒を含む) の範囲で指定する必要があり、デフォルト値は 1 です。コメント:
interval
は、CPU 使用率など、複数のサンプルを必要とするカウンタに使用されます。そのため、チェックは毎回、最後の "interval" 秒間の平均値を返します。
任意の Windows パフォーマンスカウンタの値(英語)
戻り値: Integer、float、string、または text(リクエストによって異なります)
パラメーター:
interval
は 1 秒から 900 秒(900 秒を含む)の範囲で指定する必要があり、デフォルト値は 1 です。コメント:
interval
は、CPU 使用率など、複数のサンプルを必要とするカウンタに使用されます。そのため、チェックは毎回、最後の "interval" 秒間の平均値を返します。HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\009
Windows パフォーマンスカウンターのオブジェクトインスタンスのリスト低レベル検出 に使用されます。
戻り値: JSON オブジェクト
パラメーター:
Windowsパフォーマンスカウンターのオブジェクトインスタンスのリスト。英語のオブジェクト名を使用して検出されます。低レベル検出に使用されます。
戻り値: JSONオブジェクト
パラメーター:
特定のプロセスに関するさまざまな情報
戻り値: Float
パラメータ:
コメント:
types
は次のとおりです:例:
proc_info[iexplore.exe,wkset,sum] #すべてのInternet Explorerプロセスが使用している物理メモリの量を取得します。
proc_info[iexplore.exe,pf,avg] #Internet Explorerプロセスのページフォールトの平均数を取得します。
Windowsレジストリキー内の指定された値名のデータを返します。
戻り値: Integer、string、またはtext (値の型によって異なります)
パラメーター:
コメント:
例:
registry.data["HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting"] # このキーのデフォルト値のデータを返します。
registry.data["HKLM\SOFTWARE\Microsoft\Windows\Windows Error Reporting","EnableZip"] # このキーの「Enable Zip」という値のデータを返します。
指定されたキーにある Windows レジストリ値またはキーのリスト
戻り値: JSON オブジェクト
パラメーター:
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には、キーと最後のサブキーの詳細が含まれます。
Windows サービスのリスト。低レベル検出 に使用されます。
戻り値: JSON オブジェクト
サービスに関する情報
戻り値: 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.info[service,state]
や service.info[service]
のような項目は同じ情報を返します。param
が state の場合のみ、この項目は存在しないサービスに対して値 (255) を返します。例:
service.info[SNMPTRAP] - SNMPTRAP サービスの状態
service.info[SNMP Trap] - 同じサービスの状態ですが、表示名が指定されています。
service.info[EventLog,startup] - EventLog サービスのスタートアップの種類
サービスの一覧
戻り値: 0 - 空の場合。Text - 改行で区切られたサービスの一覧。
パラメーター:
例:
services[,started] # 開始済みのサービスの一覧を返します。
services[automatic, stopped] # 実行されるべき停止中のサービスのリストを返します。
services[automatic, stopped, "service1,service2,service3"] # 実行されるべき停止中のサービスのリストを返します。ただし、"service1"、"service2"、"service3" という名前のサービスは除きます。
仮想メモリのサイズ(バイト単位、または合計に対する割合)
戻り値:Integer(バイト単位)、float(割合)
パラメーター:
コメント:
例:
WMIクエリを実行し、選択された最初のオブジェクトを返します。
戻り値: Integer、float、string、またはtext (リクエストによって異なります)
パラメーター:
WMIクエリはWQLを使用して実行されます。
例:
wmi.get[root\cimv2,select status from Win32_DiskDrive where Name like '%PHYSICALDRIVE0%'] #最初の物理ディスクのステータスを返します。
WMIクエリを実行し、レスポンス全体を返します。低レベル検出に使用できます。
戻り値: JSONオブジェクト
パラメーター:
コメント:
例:
wmi.getall[root\cimv2,select * from Win32_DiskDrive where Name like '%PHYSICALDRIVE%'] # 物理ディスクのステータス情報を返します。
このチュートリアルでは、Windows サービスの監視を設定するためのステップバイステップの手順を説明します。 Zabbix server と agent が設定され、動作していることを前提としています。
サービス名を取得します。
この名前は、MMCサービススナップインを開き、サービスのプロパティを表示することで取得できます。
General タブに 'Service name' というフィールドがあります。
この後の値は、監視のための項目を設定する際に使用する名前です。
例えば、"workstation" サービスを監視する場合、次のようになります。
lanmanworkstation
サービスを監視するための 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)には文字列を指定します。
例
Windows service state と Windows service startup type の2つのバリューマップがあり、
フロントエンドで数値からテキスト表現にマッピングすることができます。
Low-level discoveryは、コンピュータ上のさまざまなエンティティに対して、
item 、trigger 、およびグラフを自動的に作成する方法を提供します。
Zabbix は自動的にマシンの Windows サービスの監視を開始します。
サービス名を正確に把握したり、各サービス用の item を手動で作成する必要はありません。
フィルタを使用することで、監視したいサービスのみに対して実際の item、trigger 、グラフを生成することができます。