Zabbix Documentation 3.0

2.23.04.04.2 (current)In development:4.4 (devel)Unsupported:1.82.02.43.23.4

User Tools

Site Tools


manual:config:items:itemtypes:zabbix_agent

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
manual:config:items:itemtypes:zabbix_agent [2018/10/19 06:01]
martins-v following items are supported only on AIX LPAR of type Shared
manual:config:items:itemtypes:zabbix_agent [2019/07/15 08:50] (current)
martins-v web.page.* changes regarding failed checks
Line 18: Line 18:
   * [[manual:​appendix:​items:​supported_by_platform|Items supported by platform]]   * [[manual:​appendix:​items:​supported_by_platform|Items supported by platform]]
   * [[manual:​config:​items:​itemtypes:​zabbix_agent:​win_keys|Item keys specific for Windows agent]]   * [[manual:​config:​items:​itemtypes:​zabbix_agent:​win_keys|Item keys specific for Windows agent]]
 +  * [[:​manual/​appendix/​items/​win_permissions|Minimum permission level for Windows agent items]]
  
 ** Mandatory and optional parameters ** ** Mandatory and optional parameters **
Line 42: Line 43:
 | ||||| | |||||
 ^log[file,<​regexp>,<​encoding>,<​maxlines>,<​mode>,<​output>​] ​ ^^^^^ ^log[file,<​regexp>,<​encoding>,<​maxlines>,<​mode>,<​output>​] ​ ^^^^^
-^ |Log file monitoring. ​ |Log  |**file** - full path and name of log file\\ **regexp** - regular expression describing the required pattern\\ **encoding** - code page [[:​manual/​config/​items/​itemtypes/​zabbix_agent#​available_encodings|identifier]]\\ **maxlines** - maximum number of new lines per second the agent will send to Zabbix server or proxy. This parameter overrides the value of '​MaxLinesPerSecond'​ in [[manual:​appendix:​config:​zabbix_agentd|zabbix_agentd.conf]]\\ **mode** - possible values:\\ //all// (default), //skip// - skip processing of older data (affects only newly created items).\\ **output** - an optional output formatting template. The **\0** escape sequence is replaced with the matched text while an **\N** (where N=1...9) escape sequence is replaced with Nth matched group (or an empty string if the N exceeds the number of captured groups). ​ |The item must be configured as an [[manual:​appendix:​items:​activepassive#​active_checks|active check]].\\ If file is missing or permissions do not allow access, item turns unsupported.\\ \\ If ''​output''​ is left empty - the whole line containing the matched text is returned. Note that all global regular expression types except '​Result is TRUE' always return the whole matched line and the ''​output''​ parameter is ignored.\\ \\ Content extraction using the ''​output''​ parameter takes place on the agent.\\ \\ Examples:\\ => log[/​var/​log/​syslog]\\ => log[/​var/​log/​syslog,​error]\\ => log[/​home/​zabbix/​logs/​logfile,,,​100]\\ \\ //Example of using ''​output''​ parameter for extracting a number from log record://\\ %%log[/​app1/​app.log,"​task run [0-9.]+ sec, processed ([0-9]+) records, [0-9]+ errors",,,,​\1]%%->​ %%will match a log record "​2015-11-13 10:08:26 task run 6.08 sec, processed 6080 records, 0 errors"​ and send only number 6080 to server. Because a number is being sent, the "Type of information"​ for this log item can be changed from "​Log"​ to "​Numeric (unsigned)"​ and the value can be used in graphs, triggers etc.%% \\ \\ //Example of using ''​output''​ parameter for rewriting log record before sending to server:// \\ %%log[/​app1/​app.log,"​([0-9 :-]+) task run ([0-9.]+) sec, processed ([0-9]+) records, ([0-9]+) errors",,,,"​\1 RECORDS: \3, ERRORS: \4, DURATION: \2"​]%%->​ %%will match a log record "​2015-11-13 10:08:26 task run 6.08 sec, processed 6080 records, 0 errors+^ |Log file monitoring. ​ |Log  |**file** - full path and name of log file\\ **regexp** - regular expression describing the required pattern\\ **encoding** - code page [[:​manual/​config/​items/​itemtypes/​zabbix_agent#​available_encodings|identifier]]\\ **maxlines** - maximum number of new lines per second the agent will send to Zabbix server or proxy. This parameter overrides the value of '​MaxLinesPerSecond'​ in [[manual:​appendix:​config:​zabbix_agentd|zabbix_agentd.conf]]\\ **mode** - possible values:\\ //all// (default), //skip// - skip processing of older data (affects only newly created items).\\ **output** - an optional output formatting template. The **\0** escape sequence is replaced with the matched ​part of text (from the first character where match begins until the character where match ends) while an **\N** (where N=1...9) escape sequence is replaced with Nth matched group (or an empty string if the N exceeds the number of captured groups). ​ |The item must be configured as an [[manual:​appendix:​items:​activepassive#​active_checks|active check]].\\ If file is missing or permissions do not allow access, item turns unsupported.\\ \\ If ''​output''​ is left empty - the whole line containing the matched text is returned. Note that all global regular expression types except '​Result is TRUE' always return the whole matched line and the ''​output''​ parameter is ignored.\\ \\ Content extraction using the ''​output''​ parameter takes place on the agent.\\ \\ Examples:\\ => log[/​var/​log/​syslog]\\ => log[/​var/​log/​syslog,​error]\\ => log[/​home/​zabbix/​logs/​logfile,,,​100]\\ \\ //Example of using ''​output''​ parameter for extracting a number from log record://\\ %%log[/​app1/​app.log,"​task run [0-9.]+ sec, processed ([0-9]+) records, [0-9]+ errors",,,,​\1]%%->​ %%will match a log record "​2015-11-13 10:08:26 task run 6.08 sec, processed 6080 records, 0 errors"​ and send only number 6080 to server. Because a number is being sent, the "Type of information"​ for this log item can be changed from "​Log"​ to "​Numeric (unsigned)"​ and the value can be used in graphs, triggers etc.%% \\ \\ //Example of using ''​output''​ parameter for rewriting log record before sending to server:// \\ %%log[/​app1/​app.log,"​([0-9 :-]+) task run ([0-9.]+) sec, processed ([0-9]+) records, ([0-9]+) errors",,,,"​\1 RECORDS: \3, ERRORS: \4, DURATION: \2"​]%%->​ %%will match a log record "​2015-11-13 10:08:26 task run 6.08 sec, processed 6080 records, 0 errors
 " and send a modified record "​2015-11-13 10:08:26 RECORDS: 6080, ERRORS: 0, DURATION: 6.08" to server.%% \\ \\ The ''​output''​ parameter is supported since Zabbix 2.2.\\ The ''​mode''​ parameter is supported since Zabbix 2.0.\\ \\ See also additional information on [[log_items|log monitoring]]. ​ | " and send a modified record "​2015-11-13 10:08:26 RECORDS: 6080, ERRORS: 0, DURATION: 6.08" to server.%% \\ \\ The ''​output''​ parameter is supported since Zabbix 2.2.\\ The ''​mode''​ parameter is supported since Zabbix 2.0.\\ \\ See also additional information on [[log_items|log monitoring]]. ​ |
 | ||||| | |||||
 ^logrt[file_regexp,<​regexp>,<​encoding>,<​maxlines>,<​mode>,<​output>​] ​ ^^^^^ ^logrt[file_regexp,<​regexp>,<​encoding>,<​maxlines>,<​mode>,<​output>​] ​ ^^^^^
-^ |Log file monitoring with log rotation support. ​ |Log  |**file_regexp** - absolute path to file and regexp describing the file name pattern\\ **regexp** - regular expression describing the required content pattern\\ **encoding** - code page [[:​manual/​config/​items/​itemtypes/​zabbix_agent#​available_encodings|identifier]]\\ **maxlines** - maximum number of new lines per second the agent will send to Zabbix server or proxy. This parameter overrides the value of '​MaxLinesPerSecond'​ in [[manual:​appendix:​config:​zabbix_agentd|zabbix_agentd.conf]]\\ **mode** - possible values:\\ //all// (default), //skip// - skip processing of older data (affects only newly created items).\\ **output** - an optional output formatting template. The **\0** escape sequence is replaced with the matched text while an **\N** (where N=1...9) escape sequence is replaced with Nth matched group (or an empty string if the N exceeds the number of captured groups). ​ |The item must be configured as an [[manual:​appendix:​items:​activepassive#​active_checks|active check]].\\ Log rotation is based on the last modification time of files.\\ \\ If ''​output''​ is left empty - the whole line containing the matched text is returned. Note that all global regular expression types except '​Result is TRUE' always return the whole matched line and the ''​output''​ parameter is ignored.\\ \\ Content extraction using the ''​output''​ parameter takes place on the agent.\\ \\ Examples:\\ => %%logrt["/​home/​zabbix/​logs/​^logfile[0-9]{1,​3}$",,,​100]%% -> %%will match a file like "​logfile1"​ (will not match "​.logfile1"​)%%\\ => %%logrt["/​home/​user/​^logfile_.*_[0-9]{1,​3}$","​pattern_to_match","​UTF-8",​100]%% -> %%will collect data from files such "​logfile_abc_1"​ or "​logfile__001"​.%%\\ \\ //Example of using ''​output''​ parameter for extracting a number from log record://\\ %%logrt[/​app1/​^test.*log$,"​task run [0-9.]+ sec, processed ([0-9]+) records, [0-9]+ errors",,,,​\1]%%->​ %%will match a log record "​2015-11-13 10:08:26 task run 6.08 sec, processed 6080 records, 0 errors"​ and send only number 6080 to server. Because a number is being sent, the "Type of information"​ for this log item can be changed from "​Log"​ to "​Numeric (unsigned)"​ and the value can be used in graphs, triggers etc.%% \\ \\ //Example of using ''​output''​ parameter for rewriting log record before sending to server:// \\ %%logrt[/​app1/​^test.*log$,"​([0-9 :-]+) task run ([0-9.]+) sec, processed ([0-9]+) records, ([0-9]+) errors",,,,"​\1 RECORDS: \3, ERRORS: \4, DURATION: \2"​]%%->​ %%will match a log record "​2015-11-13 10:08:26 task run 6.08 sec, processed 6080 records, 0 errors+^ |Log file monitoring with log rotation support. ​ |Log  |**file_regexp** - absolute path to file and regexp describing the file name pattern\\ **regexp** - regular expression describing the required content pattern\\ **encoding** - code page [[:​manual/​config/​items/​itemtypes/​zabbix_agent#​available_encodings|identifier]]\\ **maxlines** - maximum number of new lines per second the agent will send to Zabbix server or proxy. This parameter overrides the value of '​MaxLinesPerSecond'​ in [[manual:​appendix:​config:​zabbix_agentd|zabbix_agentd.conf]]\\ **mode** - possible values:\\ //all// (default), //skip// - skip processing of older data (affects only newly created items).\\ **output** - an optional output formatting template. The **\0** escape sequence is replaced with the matched ​part of text (from the first character where match begins until the character where match ends) while an **\N** (where N=1...9) escape sequence is replaced with Nth matched group (or an empty string if the N exceeds the number of captured groups). ​ |The item must be configured as an [[manual:​appendix:​items:​activepassive#​active_checks|active check]].\\ Log rotation is based on the last modification time of files.\\ \\ Note that logrt is designed to work with one currently active log file, with several other matching inactive files rotated. If, for example, a directory has many active log files, a separate logrt item should be created for each one. Otherwise if one logrt item picks up too many files it may lead to exhausted memory and a crash of monitoring.\\ \\ If ''​output''​ is left empty - the whole line containing the matched text is returned. Note that all global regular expression types except '​Result is TRUE' always return the whole matched line and the ''​output''​ parameter is ignored.\\ \\ Content extraction using the ''​output''​ parameter takes place on the agent.\\ \\ Examples:\\ => %%logrt["/​home/​zabbix/​logs/​^logfile[0-9]{1,​3}$",,,​100]%% -> %%will match a file like "​logfile1"​ (will not match "​.logfile1"​)%%\\ => %%logrt["/​home/​user/​^logfile_.*_[0-9]{1,​3}$","​pattern_to_match","​UTF-8",​100]%% -> %%will collect data from files such "​logfile_abc_1"​ or "​logfile__001"​.%%\\ \\ //Example of using ''​output''​ parameter for extracting a number from log record://\\ %%logrt[/​app1/​^test.*log$,"​task run [0-9.]+ sec, processed ([0-9]+) records, [0-9]+ errors",,,,​\1]%%->​ %%will match a log record "​2015-11-13 10:08:26 task run 6.08 sec, processed 6080 records, 0 errors"​ and send only number 6080 to server. Because a number is being sent, the "Type of information"​ for this log item can be changed from "​Log"​ to "​Numeric (unsigned)"​ and the value can be used in graphs, triggers etc.%% \\ \\ //Example of using ''​output''​ parameter for rewriting log record before sending to server:// \\ %%logrt[/​app1/​^test.*log$,"​([0-9 :-]+) task run ([0-9.]+) sec, processed ([0-9]+) records, ([0-9]+) errors",,,,"​\1 RECORDS: \3, ERRORS: \4, DURATION: \2"​]%%->​ %%will match a log record "​2015-11-13 10:08:26 task run 6.08 sec, processed 6080 records, 0 errors
 " and send a modified record "​2015-11-13 10:08:26 RECORDS: 6080, ERRORS: 0, DURATION: 6.08" to server.%% \\ \\ The ''​output''​ parameter is supported since Zabbix 2.2.\\ The ''​mode''​ parameter is supported since Zabbix 2.0.\\ \\ See also additional information on [[log_items|log monitoring]]. ​ | " and send a modified record "​2015-11-13 10:08:26 RECORDS: 6080, ERRORS: 0, DURATION: 6.08" to server.%% \\ \\ The ''​output''​ parameter is supported since Zabbix 2.2.\\ The ''​mode''​ parameter is supported since Zabbix 2.0.\\ \\ See also additional information on [[log_items|log monitoring]]. ​ |
 | ||||| | |||||
Line 95: Line 96:
 | ||||| | |||||
 ^proc.mem[<​name>,<​user>,<​mode>,<​cmdline>,<​memtype>​] ​ ^^^^^ ^proc.mem[<​name>,<​user>,<​mode>,<​cmdline>,<​memtype>​] ​ ^^^^^
-^ |Memory used by process in bytes. ​ |Integer ​ |**name** - process name (default is //all processes//​)\\ **user** - user name (default is //all users//)\\ **mode** - possible values:\\ //avg//, //max//, //min//, //sum// (default)\\ **cmdline** - filter by command line (it is a regular expression) \\ **memtype** - [[:​manual/​appendix/​items/​proc_mem_notes|type of memory]] used by process ​ |Examples:​\\ => proc.mem[,​root] -> memory used by all processes running under the "​root"​ user\\ => proc.mem[zabbix_server,​zabbix] -> memory used by all zabbix_server processes running under the zabbix user\\ => proc.mem[,​oracle,​max,​oracleZABBIX] -> memory used by the most memory-hungry process running under oracle having oracleZABBIX in its command line\\ \\ //Note//: When several processes use shared memory, the sum of memory used by processes may result in large, unrealistic values.\\ \\ See [[manual:​appendix:​items:​proc_mem_num_notes|notes]] on selecting processes with ''​name''​ and ''​cmdline''​ parameters (Linux-specific).\\ \\ When this item is invoked from the command line and contains a command line parameter (e.g. using the agent test mode: ''​zabbix_agentd -t proc.num[,,,​apache2]''​),​ one extra process will be counted, as the agent will count itself.\\ \\ The ''​memtype''​ parameter is supported on several [[manual:​appendix:​items:​supported_by_platform|platforms]] since Zabbix 3.0.0. ​ |+^ |Memory used by process in bytes. ​ |Integer ​- with ''​mode''​ as //max//, //min//, //sum//\\ \\ Float - with ''​mode''​ as //​avg// ​ ​|**name** - process name (default is //all processes//​)\\ **user** - user name (default is //all users//)\\ **mode** - possible values:\\ //avg//, //max//, //min//, //sum// (default)\\ **cmdline** - filter by command line (it is a regular expression) \\ **memtype** - [[:​manual/​appendix/​items/​proc_mem_notes|type of memory]] used by process ​ |Examples:​\\ => proc.mem[,​root] -> memory used by all processes running under the "​root"​ user\\ => proc.mem[zabbix_server,​zabbix] -> memory used by all zabbix_server processes running under the zabbix user\\ => proc.mem[,​oracle,​max,​oracleZABBIX] -> memory used by the most memory-hungry process running under oracle having oracleZABBIX in its command line\\ \\ //Note//: When several processes use shared memory, the sum of memory used by processes may result in large, unrealistic values.\\ \\ See [[manual:​appendix:​items:​proc_mem_num_notes|notes]] on selecting processes with ''​name''​ and ''​cmdline''​ parameters (Linux-specific).\\ \\ When this item is invoked from the command line and contains a command line parameter (e.g. using the agent test mode: ''​zabbix_agentd -t proc.num[,,,​apache2]''​),​ one extra process will be counted, as the agent will count itself.\\ \\ The ''​memtype''​ parameter is supported on several [[manual:​appendix:​items:​supported_by_platform|platforms]] since Zabbix 3.0.0. ​ |
 | ||||| | |||||
 ^proc.num[<​name>,<​user>,<​state>,<​cmdline>,<​zone>​] ​ ^^^^^ ^proc.num[<​name>,<​user>,<​state>,<​cmdline>,<​zone>​] ​ ^^^^^
Line 168: Line 169:
 | ||||| | |||||
 ^system.swap.size[<​device>,<​type>​] ​ ^^^^^ ^system.swap.size[<​device>,<​type>​] ​ ^^^^^
-^ |Swap space size in bytes or in percentage from total. ​ |Integer - for bytes\\ \\ Float - for percentage ​ |**device** - device used for swapping (default is //all//)\\ **type** - possible values:\\ //free// (free swap space, default), //pfree// (free swap space, in percent), //pused// (used swap space, in percent), //total// (total swap space), //used// (used swap space) ​ |Example:\\ => system.swap.size[,​pfree] -> free swap space percentage\\ \\ If //device// is not specified Zabbix agent will only take into account swap devices (files), physical memory will be ignored. For example, on Solaris systems //swap -s// command includes a portion of physical memory and swap devices (unlike //swap -l//).\\ \\ Note that this key might report incorrect percentage on virtualized (VMware ESXi, VirtualBox) Windows platforms. In this case use perf_counter[\700(_Total)\702] key to obtain correct swap usage data.\\ \\ Old naming: //​system.swap.free//,​ //​system.swap.total// ​ |+^ |Swap space size in bytes or in percentage from total. ​ |Integer - for bytes\\ \\ Float - for percentage ​ |**device** - device used for swapping (default is //all//)\\ **type** - possible values:\\ //free// (free swap space, default), //pfree// (free swap space, in percent), //pused// (used swap space, in percent), //total// (total swap space), //used// (used swap space) ​ |Example:\\ => system.swap.size[,​pfree] -> free swap space percentage\\ \\ If //device// is not specified Zabbix agent will only take into account swap devices (files), physical memory will be ignored. For example, on Solaris systems //swap -s// command includes a portion of physical memory and swap devices (unlike //swap -l//).\\ \\ 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.\\ \\ Old naming: //​system.swap.free//,​ //​system.swap.total// ​ |
 | ||||| | |||||
 ^system.uname ​ ^^^^^ ^system.uname ​ ^^^^^
Line 180: Line 181:
 | ||||| | |||||
 ^vfs.dev.read[<​device>,<​type>,<​mode>​] ​ ^^^^^ ^vfs.dev.read[<​device>,<​type>,<​mode>​] ​ ^^^^^
-^ |Disk read statistics. ​ |Integer - with ''​type''​ in //​sectors//,​ //​operations//,​ //bytes//\\ \\ Float - with ''​type''​ in //sps//, //ops//, //​bps// ​ |**device** - disk device (default is //all//) \\ **type** - possible values: //​sectors//,​ //​operations//,​ //bytes//, //sps//, //ops//, //bps//\\ This parameter must be specified, since defaults differ under various OSes.\\ //sps//, //ops//, //bps// stand for: sectors, operations, bytes per second, respectively.\\ **mode** - possible values: //avg1// (one-minute average, default), //avg5//, //​avg15//​.\\ This parameter is supported only with ''​type''​ in: sps, ops, bps.  |Default values of '​type'​ parameter for different OSes:\\ AIX - operations\\ FreeBSD - bps\\ Linux - sps\\ OpenBSD - operations\\ Solaris - bytes\\ \\ Example:\\ => vfs.dev.read[,​operations]\\ \\ //sps//, //ops// and //bps// on supported platforms used to be limited to 8 devices (7 individual and one //all//). Since Zabbix 2.0.1 this limit is 1024 devices (1023 individual and one for //all//).\\ \\ If default //all// is used for the first parameter then the key will return summary statistics, including all block devices like sda, sbd and their partitions (sda1, sda2, sdb3...) and multiple devices (MD raid) based on those block devices/​partitions and logical volumes (LVM) based on those block devices/​partitions. In such cases returned values should be considered only as relative value (dynamic in time) but not as absolute values.\\ \\ Supports LVM since Zabbix 1.8.6.\\ \\ Only relative device names could be used (for example, **sda**) until Zabbix 1.8.6. Since then, an optional **/dev/** prefix may be used (for example, **/​dev/​sda**).\\ \\ Old naming: //​io[*]// ​ |+^ |Disk read statistics. ​ |Integer - with ''​type''​ in //​sectors//,​ //​operations//,​ //bytes//\\ \\ Float - with ''​type''​ in //sps//, //ops//, //bps//\\ \\ //Note//: Since 3.0.25, if using an update interval of three hours or more<​sup>​**[[#​footnotes|2]]**</​sup>,​ will always return '​0' ​ ​|**device** - disk device (default is //​all// ​<​sup>​**[[#​footnotes|3]]**</​sup>​) \\ **type** - possible values: //​sectors//,​ //​operations//,​ //bytes//, //sps//, //ops//, //bps//\\ This parameter must be specified, since defaults differ under various OSes.\\ //sps//, //ops//, //bps// stand for: sectors, operations, bytes per second, respectively.\\ **mode** - possible values: //avg1// (one-minute average, default), //avg5//, //​avg15//​.\\ This parameter is supported only with ''​type''​ in: sps, ops, bps.  |You may use relative device names (for example, ''​sda''​) as well as an optional /dev/ prefix (for example, ''/​dev/​sda''​).\\ \\ LVM logical volumes are supported.\\ \\ Default values of '​type'​ parameter for different OSes:\\ AIX - operations\\ FreeBSD - bps\\ Linux - sps\\ OpenBSD - operations\\ Solaris - bytes\\ \\ Example:\\ => vfs.dev.read[,​operations]\\ \\ //sps//, //ops// and //bps// on supported platforms used to be limited to 8 devices (7 individual and one //all//). Since Zabbix 2.0.1 this limit is 1024 devices (1023 individual and one for //all//).\\ \\ Old naming: //​io[*]// ​ |
 | ||||| | |||||
 ^vfs.dev.write[<​device>,<​type>,<​mode>​] ​ ^^^^^ ^vfs.dev.write[<​device>,<​type>,<​mode>​] ​ ^^^^^
-^ |Disk write statistics. ​ |Integer - with ''​type''​ in //​sectors//,​ //​operations//,​ //bytes//\\ \\ Float - with ''​type''​ in //sps//, //ops//, //​bps// ​ |**device** - disk device (default is //all//) \\ **type** - possible values: //​sectors//,​ //​operations//,​ //bytes//, //sps//, //ops//, //bps//\\ This parameter must be specified, since defaults differ under various OSes.\\ //sps//, //ops//, //bps// stand for: sectors, operations, bytes per second, respectively.\\ **mode** - possible values: //avg1// (one-minute average, default), //avg5//, //​avg15//​.\\ This parameter is supported only with ''​type''​ in: sps, ops, bps.  |Default values of '​type'​ parameter for different OSes:\\ AIX - operations\\ FreeBSD - bps\\ Linux - sps\\ OpenBSD - operations\\ Solaris - bytes\\ \\ Example:\\ => vfs.dev.write[,​operations]\\ \\ //sps//, //ops// and //bps// on supported platforms used to be limited to 8 devices (7 individual and one //all//). Since Zabbix 2.0.1 this limit is 1024 (1023 individual and one for //all//).\\ \\ If default //all// is used for the first parameter then the key will return summary statistics, including all block devices like sda, sbd and their partitions (sda1, sda2, sdb3...) and multiple devices (MD raid) based on those block devices/​partitions and logical volumes (LVM) based on those block devices/​partitions. In such cases returned values should be considered only as relative value (dynamic in time) but not as absolute values.\\ \\ Supports LVM since Zabbix 1.8.6.\\ \\ Only relative device names could be used (for example, **sda**) until Zabbix 1.8.6. Since then, an optional **/dev/** prefix may be used (for example, **/​dev/​sda**).\\ \\ Old naming: //​io[*]// ​ |+^ |Disk write statistics. ​ |Integer - with ''​type''​ in //​sectors//,​ //​operations//,​ //bytes//\\ \\ Float - with ''​type''​ in //sps//, //ops//, //bps//\\ \\ //Note//: Since 3.0.25, if using an update interval of three hours or more<​sup>​**[[#​footnotes|2]]**</​sup>,​ will always return '​0' ​ ​|**device** - disk device (default is //​all// ​<​sup>​**[[#​footnotes|3]]**</​sup>​) \\ **type** - possible values: //​sectors//,​ //​operations//,​ //bytes//, //sps//, //ops//, //bps//\\ This parameter must be specified, since defaults differ under various OSes.\\ //sps//, //ops//, //bps// stand for: sectors, operations, bytes per second, respectively.\\ **mode** - possible values: //avg1// (one-minute average, default), //avg5//, //​avg15//​.\\ This parameter is supported only with ''​type''​ in: sps, ops, bps.  |You may use relative device names (for example, ''​sda''​) as well as an optional /dev/ prefix (for example, ''/​dev/​sda''​).\\ \\ LVM logical volumes are supported.\\ \\ Default values of '​type'​ parameter for different OSes:\\ AIX - operations\\ FreeBSD - bps\\ Linux - sps\\ OpenBSD - operations\\ Solaris - bytes\\ \\ Example:\\ => vfs.dev.write[,​operations]\\ \\ //sps//, //ops// and //bps// on supported platforms used to be limited to 8 devices (7 individual and one //all//). Since Zabbix 2.0.1 this limit is 1024 (1023 individual and one for //all//).\\ \\ Old naming: //​io[*]// ​ |
 | ||||| | |||||
 ^vfs.file.cksum[file] ​ ^^^^^ ^vfs.file.cksum[file] ​ ^^^^^
Line 198: Line 199:
 | ||||| | |||||
 ^vfs.file.regexp[file,​regexp,<​encoding>,<​start line>,<​end line>,<​output>​] ​ ^^^^^ ^vfs.file.regexp[file,​regexp,<​encoding>,<​start line>,<​end line>,<​output>​] ​ ^^^^^
-^ |Find string in a file.  |The line containing the matched string, or as specified by the optional ''​output''​ parameter ​ |**file** - full path to file\\ **regexp** - GNU regular expression\\ **encoding** - code page [[:​manual/​config/​items/​itemtypes/​zabbix_agent#​available_encodings|identifier]]\\ **start line** - the number of first line to search (first line of file by default).\\ **end line** - the number of last line to search (last line of file by default).\\ **output** - an optional output formatting template. The **\0** escape sequence is replaced with the matched text while an **\N** (where N=1...9) escape sequence is replaced with Nth matched group (or an empty string if the N exceeds the number of captured groups). ​ |Only the first matching line is returned.\\ An empty string is returned if no line matched the expression.\\ \\ Content extraction using the ''​output''​ parameter takes place on the agent.\\ \\ The ''​start line'',​ ''​end line''​ and ''​output''​ parameters are supported from version 2.2.\\ \\ Examples:\\ => vfs.file.regexp[/​etc/​passwd,​zabbix]\\ => %%vfs.file.regexp[/​path/​to/​some/​file,"​([0-9]+)$",,​3,​5,​\1]%%\\ => %%vfs.file.regexp[/​etc/​passwd,​^zabbix:​.:​([0-9]+),,,,​\1]%% -> getting the ID of user //zabbix// |+^ |Find string in a file.  |The line containing the matched string, or as specified by the optional ''​output''​ parameter ​ |**file** - full path to file\\ **regexp** - GNU regular expression\\ **encoding** - code page [[:​manual/​config/​items/​itemtypes/​zabbix_agent#​available_encodings|identifier]]\\ **start line** - the number of first line to search (first line of file by default).\\ **end line** - the number of last line to search (last line of file by default).\\ **output** - an optional output formatting template. The **\0** escape sequence is replaced with the matched ​part of text (from the first character where match begins until the character where match ends) while an **\N** (where N=1...9) escape sequence is replaced with Nth matched group (or an empty string if the N exceeds the number of captured groups). ​ |Only the first matching line is returned.\\ An empty string is returned if no line matched the expression.\\ \\ Content extraction using the ''​output''​ parameter takes place on the agent.\\ \\ The ''​start line'',​ ''​end line''​ and ''​output''​ parameters are supported from version 2.2.\\ \\ Examples:\\ => vfs.file.regexp[/​etc/​passwd,​zabbix]\\ => %%vfs.file.regexp[/​path/​to/​some/​file,"​([0-9]+)$",,​3,​5,​\1]%%\\ => %%vfs.file.regexp[/​etc/​passwd,​^zabbix:​.:​([0-9]+),,,,​\1]%% -> getting the ID of user //zabbix// |
 | ||||| | |||||
 ^vfs.file.regmatch[file,​regexp,<​encoding>,<​start line>,<​end line>​] ​ ^^^^^ ^vfs.file.regmatch[file,​regexp,<​encoding>,<​start line>,<​end line>​] ​ ^^^^^
Line 222: Line 223:
 | ||||| | |||||
 ^web.page.get[host,<​path>,<​port>​] ​ ^^^^^ ^web.page.get[host,<​path>,<​port>​] ​ ^^^^^
-^ |Get content of web page.  |Web page source as text (including headers) ​ |**host** - hostname\\ **path** - path to HTML document (default is /)\\ **port** - port number (default is 80)  |Returns ​an empty string on fail. \\ \\ Example:\\ => %%web.page.get[www.zabbix.com,​index.php,​80]%% ​ |+^ |Get content of web page.  |Web page source as text (including headers) ​ |**host** - hostname\\ **path** - path to HTML document (default is /)\\ **port** - port number (default is 80)  |This item turns unsupported if the resource specified in ''​host''​ does not exist or is unavailable.\\ //Note// that before version 3.0.17 it would return ​an empty string on fail.\\ \\ Example:\\ => %%web.page.get[www.zabbix.com,​index.php,​80]%% ​ |
 | ||||| | |||||
 ^web.page.perf[host,<​path>,<​port>​] ​ ^^^^^ ^web.page.perf[host,<​path>,<​port>​] ​ ^^^^^
-^ |Loading time of full web page (in seconds). ​ |Float ​ |**host** - hostname\\ **path** - path to HTML document (default is /)\\ **port** - port number (default is 80)  |Returns ​0 on fail. \\ \\ Example:\\ => %%web.page.perf[www.zabbix.com,​index.php,​80]%% |+^ |Loading time of full web page (in seconds). ​ |Float ​ |**host** - hostname\\ **path** - path to HTML document (default is /)\\ **port** - port number (default is 80)  |This item turns unsupported if the resource specified in ''​host''​ does not exist or is unavailable.\\ //Note// that before version 3.0.17 it would return '​0' ​on fail.\\ \\ Example:\\ => %%web.page.perf[www.zabbix.com,​index.php,​80]%% |
 | ||||| | |||||
 ^web.page.regexp[host,<​path>,<​port>,​regexp,<​length>,<​output>​] ​ ^^^^^ ^web.page.regexp[host,<​path>,<​port>,​regexp,<​length>,<​output>​] ​ ^^^^^
-^ |Find string on a web page.  | The matched string, or as specified by the optional ''​output''​ parameter ​ |**host** - hostname\\ **path** - path to HTML document (default is /)\\ **port** - port number (default is 80)\\ **regexp** - GNU regular expression\\ **length** - maximum number of characters to return\\ **output** - an optional output formatting template. The **\0** escape sequence is replaced with the matched text while an **\N** (where N=1...9) escape sequence is replaced with Nth matched group (or an empty string if the N exceeds the number of captured groups). ​ |Returns ​an empty string if no match was found or on fail.\\ \\ Content extraction using the ''​output''​ parameter takes place on the agent.\\ \\ The ''​output''​ parameter is supported from version 2.2. \\ \\  Example:\\ => %%web.page.regexp[www.zabbix.com,​index.php,​80,​OK,​2]%% ​ |+^ |Find string on a web page.  | The matched string, or as specified by the optional ''​output''​ parameter ​ |**host** - hostname\\ **path** - path to HTML document (default is /)\\ **port** - port number (default is 80)\\ **regexp** - GNU regular expression\\ **length** - maximum number of characters to return\\ **output** - an optional output formatting template. The **\0** escape sequence is replaced with the matched ​part of text (from the first character where match begins until the character where match ends) while an **\N** (where N=1...9) escape sequence is replaced with Nth matched group (or an empty string if the N exceeds the number of captured groups). ​ |This item turns unsupported if the resource specified in ''​host''​ does not exist or is unavailable.\\ //Note// that before version 3.0.17 it would return ​an empty string if no match was found or on fail.\\ \\ Content extraction using the ''​output''​ parameter takes place on the agent.\\ \\ The ''​output''​ parameter is supported from version 2.2. \\ \\  Example:\\ => %%web.page.regexp[www.zabbix.com,​index.php,​80,​OK,​2]%% ​ |
  
-<note>A Linux-specific note. Zabbix agent must have read-only access to filesystem ///proc//. Kernel patches from www.grsecurity.org limit access rights of non-privileged users.</note>+== Footnotes == 
 + 
 +<sup>​**1**</​sup>A Linux-specific note. Zabbix agent must have read-only access to filesystem ///proc//. Kernel patches from www.grsecurity.org limit access rights of non-privileged users. 
 + 
 +<​sup>​**2**</sup''​vfs.dev.read[]'',​ ''​vfs.dev.write[]'':​ Starting with Zabbix 3.0.25 Zabbix agent will terminate %%"​%%stale%%"​%% device connections if the item values are not accessed for more than 3 hours. This may happen if a system has devices with dynamically changing paths or if a device gets manually removed. Note also that these items, if using an update interval of 3 hours or more, will always return '​0'​.  
 + 
 +<​sup>​**3**</​sup>​ ''​vfs.dev.read[]'',​ ''​vfs.dev.write[]'': ​ If default //all// is used for the first parameter then the key will return summary statistics, including all block devices like sda, sbd and their partitions (sda1, sda2, sdb3...) and multiple devices (MD raid) based on those block devices/​partitions and logical volumes (LVM) based on those block devices/​partitions. In such cases returned values should be considered only as relative value (dynamic in time) but not as absolute values. ​
  
 === Available encodings === === Available encodings ===
Line 240: Line 247:
 === Troubleshooting agent items === === Troubleshooting agent items ===
  
-  ​If used with passive agent, //Timeout// value in server configuration may need to be higher than //Timeout// in the agent configuration file. Otherwise the item may not get any value because the server request to agent timed out first.+  ​If used with the passive agent, //Timeout// value in server configuration may need to be higher than //Timeout// in the agent configuration file. Otherwise the item may not get any value because the server request to agent timed out first.